Mirroring volumes before migration

Status
Not open for further replies.

Todd Nine

Dabbler
Joined
Nov 16, 2013
Messages
37
Hey guys,
I built my FreeNAS installation initially out of some spare USB drives and an old tower I had lying around as a proof of concept. I've been using it for a few months and love it, so I've invested in some real hardware. I now have 2 volumes in my new system.

/mnt/origdisk <- old usb drives with JBOD config

/mnt/internal <- new HDD's with RaidZ in the tower

I want to transfer all of my data from /mnt/origdisk to /mnt/internal and retain all the permissions. I was thinking of running the following process.

  1. Run rsync to copy all the data to the new volume, while services are online
  2. Shut off all shares and jails,
  3. Rsync one last time to bring the system current
  4. Change my jail mount points and shares to point to the new /mnt/internal mount point with the same directories
  5. Remove all the USB drives and the old volume.
Is there a better FreeNAS way to accomplish this or will this be sufficient?

Thanks!
Todd
 
Last edited:

Todd Nine

Dabbler
Joined
Nov 16, 2013
Messages
37
Hey dlavigne,
I'm working on it now. I've had some issues, but I'm getting through them. Here is a thread on those problems.

https://forums.freenas.org/index.ph...nc-not-working-as-expected.26715/#post-170592

I'm in the process of trying this again, and I've done this, which appears to work. This requires downtime, I'm sure this can be limited by performing these steps 2x and performing a full then incremental migration.

Source root volume name = "origdisk"
Target root volume name= "internal"


  1. Stop shares services and jails via the gui
  2. SSH into the terminal
  3. Create a snapshot of the root volume.
    Code:
    zfs snapshot -r origdisk@migration
  4. Transfer the snapshot to the new volume
    Code:
    nohup /bin/sh -c "zfs send -R -v origdisk@migration | zfs recv -v -F internal"  > & /mnt/origdisk/move.log & 
  5. You can track progress by viewing the verbose output in the terminal
    Code:
     less/mnt/origdisk/move.log 
  6. Wait for the transfer to finish (in my case, about 5 hours), then log in to UI
  7. System->System Dataset, set to Internal
  8. Jails -> Configuration change Jail Root from /mnt/origdisk to /mnt/internal
  9. Jails -> Jails change drive mounts from /mnt/origdisk to /mnt/internal
  10. Sharing -> (All) and change the mounts from /mnt/origdisk to /mnt/internal
This is currently running, I'm on step 4. I'll let you know how it goes!
 
Last edited:

Todd Nine

Dabbler
Joined
Nov 16, 2013
Messages
37
Just to follow up for anyone else reading the thread. These steps worked great. As I said earlier, if you can't afford the day of downtime, you can sync the first snapshot, then you can sync an incremental snapshot with little downtime.
 
Status
Not open for further replies.
Top