Solved Upgrade disks on a mirrored ZFS-on-root install possible?

Hey guys :D

Is it possible to upgrade disks on a mirrored ZFS-on-root install? If it is possible, then is it risky?

In my case I want to upgrade my 2x 250GB SSD's with 2x 500GB SSD's.

Thanks in advance :)
 
Attach new disks to make it a 4-way mirror.
zpool attach <pool name> <250GB SSD 1> <500GB SSD 1>
zpool attach <pool name> <250GB SSD 1> <500GB SSD 2>

Remove old disks after it resilvers.
zpool detach <pool name> <250GB SSD 1>
zpool detach <pool name> <250GB SSD 2>

Expand pool to take advantage of new space.
zpool online -e <pool name> <500GB SSD 1>
zpool online -e <pool name> <500GB SSD 2>


Should be 100% safe because you never lose redundancy.
 
  • Thanks
Reactions: jdb
Fairly straight forward. It could be considered slightly risky if you replace the disks one at a time as your mirror will be down to a single disk during the replacement, but that's only the same as replacing a failed disk.

If you have an extra sata port available you can attach a third disk to the mirror, then remove one of the originals. That way you never lose redundancy.

2 disk method
Code:
# zpool offline pool disk1 (then physically replace that disk)
# zpool replace pool disk1 newdisk1 (wait for resilver)
# zpool offline pool disk2 (then physically replace)
# zpool replace pool disk2 newdisk2

3 disk method
Code:
# zpool attach pool disk1 newdisk1 (wait for resilver)
# zpool detach pool disk1 (remove disk1 and add newdisk2)
# zpool attach pool disk2 newdisk2
# zpool detach pool disk2 (then remove disk2)
 
  • Thanks
Reactions: jdb
Don't forget to partition the new disks first.
And definitely don't forget to install the boot code onto them before the next reboot. :)
 
  • Thanks
Reactions: jdb
When you click to edit the thread there is an dropdown menu at the left side of it where you can set a flag to solved (green). Please, use that instead of writing "SOLVED". ;)
 
  • Thanks
Reactions: jdb
Back
Top