*New 12.1 series Release:
2019-11-08: XigmaNAS 12.1.0.4.7091 - released!

*New 11.3 series Release:
2019-10-19: XigmaNAS 11.3.0.4.7014 - released


We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

Delete Disk from pool

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
User avatar
gomario
experienced User
experienced User
Posts: 78
Joined: 17 Dec 2016 08:45
Status: Offline

Delete Disk from pool

#1

Post by gomario » 20 Aug 2019 19:06

How can I delete a disc from a ZFS pool? The disc has been removed without going thru the proper steps. (The disc died completely!) I tried to replace the dead/non-existant disc with a new one but that command does not work. Afterall you can not replace a non existent disc. Therefore I want to delete the disc completely and resilver the new disc afresh. How can I do that? The ZFS system keeps on "seing" the previous commands and wants me to first bring online the broken disc :shock:
Delete OffLine device from Pool.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
ms49434
Developer
Developer
Posts: 746
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: Delete Disk from pool

#2

Post by ms49434 » 23 Aug 2019 15:39

The "error" will disappear once the pool is healthy again. There's no 'forget disk' command in ZFS.
In order to replace a disk you need to provide the GUID of the former disk, i.e. zpool replace My16TbZFS_Pool 5960994339084961882 /dev/da2.
1) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, SLOG: Samsung 850 Pro, L2ARC: Samsung 850 Pro, Pool 2: 1x Samsung 860 EVO 1TB , services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

User avatar
gomario
experienced User
experienced User
Posts: 78
Joined: 17 Dec 2016 08:45
Status: Offline

Re: Delete Disk from pool

#3

Post by gomario » 23 Aug 2019 17:58

Thank you for the reply. Yes, but for the pool to be healthy again, I have to replace the faulty disc in the first place. Is there a way to "Cancel" the replacing command? The Disc with which I wanted to replace as well as the new disc, are both faulty and OFFLINE!!! The replace command can't not be completed . I have a third 4TB disc which is functioning and I want to use it but the system does not allow me. It keeps on asking to complete the initial replace.
If somehow I could tell the system to "forget" about the offline discs and resilver the new disc using the info from the other 4, functioning ones.

User avatar
ms49434
Developer
Developer
Posts: 746
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: Delete Disk from pool

#4

Post by ms49434 » 23 Aug 2019 19:41

gomario wrote:
23 Aug 2019 17:58
Thank you for the reply. Yes, but for the pool to be healthy again, I have to replace the faulty disc in the first place. Is there a way to "Cancel" the replacing command? The Disc with which I wanted to replace as well as the new disc, are both faulty and OFFLINE!!! The replace command can't not be completed . I have a third 4TB disc which is functioning and I want to use it but the system does not allow me. It keeps on asking to complete the initial replace.
If somehow I could tell the system to "forget" about the offline discs and resilver the new disc using the info from the other 4, functioning ones.
I don't know what the original disk was before you started to replace it.
Try to gather the original disk GUID by running

Code: Select all

zdb -C My16TbZFS_Pool
Then run

Code: Select all

zpool replace My16TbZFS_Pool [original.disk.guid] [dev.of.new.disk]
if this doesn't work you could try to detach the other disk with

Code: Select all

zpool detach My16TbZFS_Pool [replacement.disk.guid]
and try to replace the (originally) faulted disk using the replace command from above.
1) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, SLOG: Samsung 850 Pro, L2ARC: Samsung 850 Pro, Pool 2: 1x Samsung 860 EVO 1TB , services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

User avatar
gomario
experienced User
experienced User
Posts: 78
Joined: 17 Dec 2016 08:45
Status: Offline

Re: Delete Disk from pool

#5

Post by gomario » 24 Aug 2019 09:35

Thank you very much. The second advice worked 100%. If someone else ever runs into the same issue: "zpool detach" is the magic command.

Post Reply

Return to “ZFS (only!)”