Replace faulted disk in Z3 Raid

CelticWebs

Dabbler
Joined
Dec 4, 2023
Messages
18
I've done a bit of searching on the forum and believe that I can actually just pull the drive and replace it. I just wanted some confirmation and direction before doing it.

I have Truenas 13 with 8GB memory and 8 x 4TB Drives in a Z3 raid, I only have 8 bays. The pool is showing as degraded. When looking at the pool, a single disk is showing as FAULTED. I've attempted to take the disk offline, unfortunately this fails with an error

Code:
[EFAULT] Command swapoff /dev/mirror/swap0.eli failed (code 1): swapoff: /dev/mirror/swap0.eli: Cannot allocate memory


Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 139, in call_method
    result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self)
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1235, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 975, in nf
    return await f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/pool.py", line 1156, in offline
    await self.middleware.call('disk.swaps_remove_disks', [disk])
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1278, in call
    return await self._call(
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1235, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/local/lib/python3.9/site-packages/middlewared/service.py", line 44, in l_fn
    return await fn(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 975, in nf
    return await f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/disk_/swap_remove.py", line 28, in swaps_remove_disks
    return await self.swaps_remove_disks_unlocked(disks, options, part_xml)
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/disk_/swap_remove.py", line 56, in swaps_remove_disks_unlocked
    await run('swapoff', devname)
  File "/usr/local/lib/python3.9/site-packages/middlewared/utils/__init__.py", line 62, in run
    cp.check_returncode()
  File "/usr/local/lib/python3.9/subprocess.py", line 460, in check_returncode
    raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '('swapoff', '/dev/mirror/swap0.eli')' returned non-zero exit status 1.


I can't add any more memory and I don't have a spare slot to insert another disk to use the replace function. I've had a search across the forum and the consensus seems to be that I can just pull the faulted drive, insert a new one and then use the replace function.

The thing that concerns me is that the others with similar issue have not mentioned the memory issue, what my best course of action from here please?
 

CelticWebs

Dabbler
Joined
Dec 4, 2023
Messages
18
Anyone had an experience of this? I don't want to go pulling a disk if it's somehow using it as swap, is it likely to be using a faulted disk?
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977

CelticWebs

Dabbler
Joined
Dec 4, 2023
Messages
18
If the disk is faulted then it's already offline. Remove the faulted disk and insert your replacement and continue the replacement procedure. This is all outlined in the documentation linked at the top of the page.

https://www.truenas.com/docs/core/13.0/coretutorials/storage/disks/diskreplace/
Thanks for your response, I had already read that. It was saying that faulted disks needed to be taken offline, then it stated “This removes the device from the pool and can prevent swap issues”. I couldn’t take it offline, it failed with the error shown above, this error is not mentioned on that page, only a different error that suggested a fix but still needed to be taken offline after the fix. I was concerned about the swap issue it mentions.

From what I gather, you’re confirming some other threads I’ve read that appear to suggest that I just go ahead and pull the faulted disk anyway, correct?

Sorry to ask the same question again, I just don’t want to mess up the pool.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Yes, pull the faulty disk and proceed with the replacement.
 
Top