In an attempt to move my files onto a ZFS pool whilst maintaining a minimum of two copies, I did two things that I have learned are not considered best practice:
- Added a third mirror vdev to an already populated zpool, resulting in very unbalanced disk usage. And I was planning on adding a fourth.
- Removed a single disk vdev from the same already-populated pool, resulting in a lot of indirection metadata, which I have learned persists throughout the life of the pool.
My proposed solution is below, but the main question I have is: will a zfs-send/receive command include redirection metadata from a removed device? (I hope not)
Current ZFS pool:
array
mirror-0
disk-0-0 (14TB)
disk-0-1 (14TB)
mirror-1
disk-1-0 (14TB)
disk-1-1 (14TB)
mirror-2 # unbalanced; added to pool after 14TB drives populated
disk-2-0 (16TB)
disk-2-1 (16TB)
# additional smaller disk removed, resulting in "removed device mappings" message
Desired pool:
array
mirror-0
disk-0-0 (14TB)
disk-0-1 (14TB)
mirror-1
disk-1-0 (14TB)
disk-1-1 (14TB)
mirror-2
disk-2-0 (16TB)
disk-2-1 (16TB)
mirror-3
disk-3-0 (12TB)
disk-3-1 (12TB)
My plan:
- Split my mirrored pool, destroy the second zpool, create a new zpool of single devices with those drives (plus the additional 12TB disk).
- zfs-send/receive from the old pool to the new pool, for each dataset
- zfs export/import to rename the old zpool, then then new zpool to the original zpool name.
- Destroy the old zpool, then start to zpool-attach the drives to the new zpool, wait for resilver.
Does this sound reasonable? I have a backup of all data on these drives elsewhere. Also, uptime of the zpool is important but not required. Thanks for any help!