I use XgimaNAS, an open source FreeBSD bases NAS appliance with 6x Western Digital 3TB (WD30EFRX) HDD's with a Areca ARC-1320-4i4x SAS HBA. Four of the drives are connected to a SansDigital 4-bay external enclosure, the other two are attached internally. Two drives are setup as a ZFS mirror and the remaining 4 in a RAIDZ2 configuration. It's been several years, and in that time I've had HDDs fail and replaced. The enclosure's power supply also failed at one point in history for which I had to replace the whole enclosure. The ZFS pools manage to survive all this turmoil very well.
I recently got a replacement the power supply on the damaged enclosure, I also happen to have an extra ARC-1320-8x SAS HBA. I figured that it would make some sense to add some more storage. XigmaNAS makes setting up the new ZFS volumes very easy using a web GUI
Unfortunately there is no way to migrate data from one pool to another using the GUI. Normally one would just use something like rsync to copy over the data, but with ZFS it's so much easier.
The first step is to create a snapshot of the volume (or dataset) you want to move to a new pool:
storage: ~# zfs snap internal/More\ Movies@migrate
storage: ~# zfs list -t snap
NAME USED AVAIL REFER MOUNTPOINT
internal/More Movies@migrate 0 - 704G -
Now use ZFS send/receive to copy you data from one pool to the other.
storage: ~# zfs send -R internal/More\ Movies@migrate | zfs receive external2/More\ Movies
If you have a busy filesystem you'll need to do a incremental snapshot and send/receive it when the initial copy it complete.
storage: ~# zfs snap internal/More\ Movies@migrate2
storage: ~# zfs send -Ri internal/More\ Movies@migrate internal/More\ Movies@migrate2 | zfs receive external2/More\ Movies
Stop all service that use the filesystem and perform one final copy:
storage: ~# zfs snap internal/More\ Movies@migrate3
storage: ~# zfs send -Ri internal/More\ Movies@migrate2 internal/More\ Movies@migrate3 | zfs receive external2/More\ Movies
If you are using XigmaNAS, you'll have to go into the web GUI, manually synchronize the config, and adjust the paths of all your shares (Samba, NFS, etc.). Then restart those services. Once you are satisfied with the migration you can delete the snapshots and when you are 100% sure the data is safely at it's new location you can delete the dataset/volume.
- Log in to post comments