[SOLVED] How to remove vdev from zpool?

I accidentally created a zpool of mirrors with 1 extra mirror making it 11 instead of 10.

I just finished setting up Samba, Permissions, about 40 datasets, and already copied a few terabytes of data when I noticed.

Is there a way to remove one mirror vdev?

I thought something like this was being worked on, and I saw it’s possible for Special (metadata) devices, so I’m wondering if it’s possible in the latest TrueNAS 13.

Edit, TrueNAS does stuff on the GUI, not the CLI.

I would destroy and start from scratch…

Never tried it, instructions look like it should work.

Run the command with the -n flag, and it should show the new layout with a mirror removed.

If you run it for real, allow it to fully re-allocate before physically removing disks.

You could copy the base dataset elsewhere to a non-mounted pool, as a backup, as you don’t have any actual data saved? If target is not mounted, the children should maintain values, like mountponts?

When using the CLI, it will error with invalid commands, but iften let you force bad changes.

TrueNAS does all sorts of silly stuff to help users

VDEV device removal exists in the Solaris version of ZFS. Not sure if it has made it to TrueNAS or not.

https://blogs.oracle.com/solaris/post/oracle-solaris-zfs-device-removal

1 Like

Looks like a simple zpool remove tank mirror-X worked fine! Wow, I worried about this for nothing :smiley:.

root@nas[~]# zpool remove AllStore mirror-10
root@nas[~]# zpool status AllStore
  pool: AllStore
 state: ONLINE
remove: Evacuation of mirror in progress since Tue Dec 15 21:40:17 2022
        54.9G copied out of 426G at 233M/s, 12.89% done, 0h27m to go
3 Likes