Replacing disk in TrueNAS Scale

m0t0rh3ad

Dabbler
Joined
Jul 13, 2020
Messages
32
Hello, I''m using TrueNAS-SCALE-20.12-ALPHA

The system shows me that one of the Disks has 60 read errors and 2 write errors. I made the faulted disk offline, removed it, and place a new one.
old disk sdn
new disk sdo

But I can't make Replace procedure:

Try to replace disk without force option:

Error Replacing Disk
[EINVAL] options.force: Disk is not clean, partitions were found.
Error: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 372, in run
await self.future
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 408, in __run_body
rv = await self.method(*([self] + args))
File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1021, in nf
return await f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/middlewared/plugins/pool_/replace_disk.py", line 81, in replace
raise verrors
middlewared.service_exception.ValidationErrors: [EINVAL] options.force: Disk is not clean, partitions were found.

With force option:

Error Replacing Disk
Could not replace disk.
Error: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 372, in run
await self.future
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 408, in __run_body
rv = await self.method(*([self] + args))
File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1021, in nf
return await f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/middlewared/plugins/pool_/replace_disk.py", line 104, in replace
await self.middleware.call('disk.swaps_remove_disks', swap_disks)
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1258, in call
return await self._call(
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1215, in _call
return await methodobj(*prepared_call.args)
File "/usr/lib/python3/dist-packages/middlewared/service.py", line 44, in l_fn
return await fn(*args, **kwargs)
File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1021, in nf
return await f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/middlewared/plugins/disk_/swap_remove.py", line 27, in swaps_remove_disks
return await self.swaps_remove_disks_unlocked(disks, options)
File "/usr/lib/python3/dist-packages/middlewared/plugins/disk_/swap_remove.py", line 51, in swaps_remove_disks_unlocked
for mirror in await self.middleware.call('disk.get_swap_mirrors'):
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1258, in call
return await self._call(
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1226, in _call
return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1130, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
File "/usr/lib/python3/dist-packages/middlewared/utils/io_thread_pool_executor.py", line 25, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1025, in nf
return f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/middlewared/plugins/disk_/swap_mirror_linux.py", line 53, in get_swap_mirrors
with open(os.path.join('/sys/class/block', provider, 'partition'), 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/block/sdn1/partition'


When I've tried to wipe disk I've got this:

Wipe Disk sdo
Error: [Errno 2] No such file or directory: '/sys/class/block/sdn1/partition'

Please help
 

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
Just use the ZFS commandline and save your data first ;-)
 

m0t0rh3ad

Dabbler
Joined
Jul 13, 2020
Messages
32

m0t0rh3ad

Dabbler
Joined
Jul 13, 2020
Messages
32
I've rebooted the system and the disk name became - sdn, I can wipe the new disk. and replace it. But can see in console message: "request not aligned to logical block size".
 

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
To be frank:
You shouldn't use an Alpha of a ZFS-middleware like TrueNAS, if you don't even know how to replace a drive using OpenZFS using the CLI.
It should be somewhere in the OpenZFS manual or in 10000 other locations on the internet how to replace a drive on openzfs.

You should however file a bugreport in Jira for these issues, because they shouldn't happen.
But it's an alpha for these things to be found-out and get reported.
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,691
Please report it as a bug... its how we fix these field issues.
 
Top