This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Remove disk from mirrored vdev?

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
Gwindor
NewUser
NewUser
Posts: 2
Joined: 05 Sep 2012 23:43
Status: Offline

Remove disk from mirrored vdev?

Post by Gwindor »

Hi,
I have 1 zpool with 1 vdev having 2 HDDs in mirror configuration.
My question is, how can I remove the mirror configuration (I'm running out of space and decided I really do not need the mirror redundancy), with data preserved?
Basically I think a disk should be removed from the existing vdev and added to a new vdev, which should then be added to the existing zpool, but I'm completely new to this so not sure I would experiment without asking first.

Thanks.

User avatar
misterredman
Forum Moderator
Forum Moderator
Posts: 184
Joined: 25 Jun 2012 13:31
Location: Switzerland
Status: Offline

Re: Remove disk from mirrored vdev?

Post by misterredman »

The command to remove a disk from a mirror is the following:

Code: Select all

zpool detach POOLNAME DISKNAME
The pool will remain online.

You may have to erase the disk you removed before adding it back.

Then you can add it to the pool with:

Code: Select all

zpool add POOLNAME NEWDISKNAME
reference: http://docs.oracle.com/cd/E19253-01/819 ... index.html

:!: Important: in NAS4Free you have this commands in the webgui, under Disks|ZFS|Pools|Tools.
NAS1: Pentium E6300 - Abit IP35Pro - 4GB RAM - Backup of NAS2
NAS2: Core 2 Quad Q9300 - Asus P5Q-EM - 8GB RAM
pyload - flexget - tvnamer - subsonic - owncloud - crashplan - plex media server

Gwindor
NewUser
NewUser
Posts: 2
Joined: 05 Sep 2012 23:43
Status: Offline

Re: Remove disk from mirrored vdev?

Post by Gwindor »

Thanks!

It worked, first I created a new zpool just to see in what state is the detached drive. It was empty. It seems detaching wipes out the drive.
So it was no problem to add it back to the original zpool.

Post Reply

Return to “ZFS (only!)”