My old desktop (with SCSI disks) died, and I''d been limping along on a loaner until the new one (with SATA disks) arrived, which happened yesterday. The steps needed to migrate the data from one to the other turned out to be remarkably simple, so I thought I would share them in case anyone else ever runs into this. The old box had a single pool: NAME SIZE USED AVAIL CAP HEALTH ALTROOT space 68G 16.6G 51.4G 24% ONLINE - with two file-systems therein: NAME USED AVAIL REFER MOUNTPOINT space 16.6G 50.3G 99K /export/home space/jbeck 12.2G 50.3G 12.2G /export/home/jbeck space/local 4.25G 50.3G 4.25G /usr/local First, on the new box, I ran: % zpool create space mirror c2d0 c3d0 Then I temporarily tweaked /etc/ssh/sshd_config and /.ssh/authorized_keys to allow root from the old box to ssh to the new without being prompted for a password (not sure if this step was needed or not), then on the old box I ran: % zfs snapshot -r space at today % zfs send space/jbeck at today | ssh newbox zfs recv -d space % zfs send space/local at today | ssh newbox zfs recv -d space The two send/recv runs took roughly 30 and 10 minutes respectively, much less than the almost two hours that the back-to-back tar method used to take to do this. Finally, on the new box, I ran: % zfs set mountpoint=/export/home space % zfs set mountpoint=/usr/local space/local % zfs set sharenfs=on space/jbeck space/local And that was it! Another happy ZFS user... -- John http://blogs.sun.com/jbeck
John Beck wrote:> % zfs snapshot -r space at today > % zfs send space/jbeck at today | ssh newbox zfs recv -d space > % zfs send space/local at today | ssh newbox zfs recv -d space...> % zfs set mountpoint=/export/home space > % zfs set mountpoint=/usr/local space/local > % zfs set sharenfs=on space/jbeck space/localI''m working on some enhancements to zfs send/recv that will simplify this even further, especially in cases where you have many filesystems, snapshots, or changed properties. In particular, you''ll be able to simply do: # zfs snapshot -r space at today # zfs send -r -b space at today | ssh newbox zfs recv -p -d newpool The "send -b" flag means to send from the beginning. This will send a full stream of the oldest snapshot, and incrementals up to the named snapshot (eg, from @a to @b, from @b to @c, ... @j to @today). This way your new pool will have all of the snapshots from your old pool. The "send -r" flag means to do this for all the filesystem''s descendants as well (in this case, space/jbeck and space/local). The "recv -p" flag means to preserve locally set properties (in this case, the mountpoint and sharenfs settings). For more information, see RFEs 6421959 and 6421958, and watch for a forthcoming formal interface proposal. --matt