Swap out defective HDD

Dellyjoe

Explorer
Joined
Jun 12, 2020
Messages
80
Hello everyone,

I'm in the process of trying to replace a failing hard drive and I'm currently following https://www.truenas.com/docs/hub/tasks/advanced/disk-replace/

After Scrubing the pool and putting the defected hhd to offline I get this error

[EFAULT] Command swapoff /dev/mirror/swap0.eli failed (code 1): swapoff: /dev/mirror/swap0.eli: Cannot allocate memory
Code:
Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 137, in call_method
    result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self,
  File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1191, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 973, in nf
    return await f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/pool.py", line 1070, in offline
    await self.middleware.call('disk.swaps_remove_disks', [disk])
  File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1233, in call
    return await self._call(
  File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1191, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/local/lib/python3.8/site-packages/middlewared/service.py", line 42, in l_fn
    return await fn(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 973, in nf
    return await f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/disk_/swap_remove.py", line 27, in swaps_remove_disks
    return await self.swaps_remove_disks_unlocked(disks, options)
  File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/disk_/swap_remove.py", line 54, in swaps_remove_disks_unlocked
    await run('swapoff', devname)
  File "/usr/local/lib/python3.8/site-packages/middlewared/utils/__init__.py", line 62, in run
    cp.check_returncode()
  File "/usr/local/lib/python3.8/subprocess.py", line 444, 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.


Does anyone know what the issue is?

Thank you for reading,
Joe
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,471
That sounds like a bug... Can you please make a ticket on jira.ixsystems.com so we can investigate? We'll be able to troubleshoot with you there and perhaps find a work-around.
 

Dellyjoe

Explorer
Joined
Jun 12, 2020
Messages
80
That sounds like a bug... Can you please make a ticket on jira.ixsystems.com so we can investigate? We'll be able to troubleshoot with you there and perhaps find a work-around.
Yes no problem, I use Jira at work so I should be able to figure this out.


NAS-108270 Is the ticket number

Thank you again,

Dellyjoe
 
Last edited:

fillg1

Dabbler
Joined
Dec 14, 2014
Messages
34
I´m getting the same error message "Command swapoff /dev/mirror/swap0.eli failed (code 1): swapoff: /dev/mirror/swap0.eli: Cannot allocate memory" when unmounting a ZFS formatted USB-Disk. This seems to be reproducable.
The only way for a clean unmount seems to be rebooting :-(

Any hints?
 
Top