I have a storage pool at home with a single vdev, 3 disks in raidz1. As I've found myself needing more space, I'm going to replace the existing disks with new ones, but this leaves two options:
I also will be doing the same on several servers at work, where uptime is a bigger concern, and I will be transferring both root & storage pools. I assume the only option there that doesn't involve any downtime is the latter, but I'm thinking of ways to perform the former that minimize downtime. So far the best way I can think of is:
Edit: Actually, looking at my backups, even one made fresh with zfs send/recv with no incremental snapshots transferred, shows a huge amount of fragmentation. Perhaps it's no better than simply resilvering...
- Remove the existing pool, create it again with the new disks, restore from backup via another zfs send/recv
- Replace each disk one at a time, and resilver between each replacement.
I also will be doing the same on several servers at work, where uptime is a bigger concern, and I will be transferring both root & storage pools. I assume the only option there that doesn't involve any downtime is the latter, but I'm thinking of ways to perform the former that minimize downtime. So far the best way I can think of is:
- Snapshot and transfer the full pool to a new pool.
- Do an incremental snapshot and transfer between the original pool and the new one to cover the time between the last snapshot and now
- Repeat step 2 as many times as necessary to asymptotically reduce the time to transfer incremental snapshots. (Edit: I'm guessing this might negate the defragmentation benefits of this method?)
- Shutdown the machine, boot from other media, do one final snapshot and send it as an incremental snapshot.
- Tweak all the necessary configs to make the new pool bootable, remove the old one, and boot.
Edit: Actually, looking at my backups, even one made fresh with zfs send/recv with no incremental snapshots transferred, shows a huge amount of fragmentation. Perhaps it's no better than simply resilvering...