ZFS: Howto dump & restore filesystem in the incremental way

As I have done in the past with UFS, and as already explained here in the “Migrate partition with minimal downtime…” article, I’ll explain how to migrate a ZFS volume with minimum downtime.

What could be done during working hours without impact on the mounted filesystem:

  • Take a snapshot of the volume to copy:

zfs snapshot vs4f8-pool/test@v1

  • Send this snapshot accross the new ZFS volume:

zfs send vs4f8-pool/test@v1 | zfs receive vs4f8-pool/newtest

When the outage time has come, just issue following commands:

zfs snapshot vs4f8-pool/test@v2
zfs send -I vs4f8-pool/test@v1 vs4f8-pool/test@v2 | zfs receive vs4f8-pool/newtest

The last command should be as quick as hell… As your downtime. You could now restore the option on the “newtest” volume and start ot use it.

This same procedure could also be used to migrate volume across network, as the zfs send and receive commands could be piped with ssh.

This entry was posted in Solaris. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *