I have a dedicated host currently running 7.2-RELEASE with its disks partitioned using the traditional slice+bsdlabel+UFS scheme. I'd like to non-destructively migrate the system to GPT+ZFS scheme with mirrored disks, doing as much of the work as possible remotely via ssh.
I think I should be able to do all of this without having to call up the hosting company to enable remote console access or have them put a livefs cd in. I'd like to run my plan past the people here to see if there's anything obvious I've missed or gotten wrong. I've done manual installs of 8.0-RC2 with GPT and ZFS before so I'm familiar with all the steps in the process.
The machine originally had a single 160GB SATA disk (ad4) and 1GB RAM. I've just had the hosting company install a second identical disk (ad6) and another gigabyte of RAM.
My plan is:
Job done.
Can anyone see any glaring flaws in my plan?
I think I should be able to do all of this without having to call up the hosting company to enable remote console access or have them put a livefs cd in. I'd like to run my plan past the people here to see if there's anything obvious I've missed or gotten wrong. I've done manual installs of 8.0-RC2 with GPT and ZFS before so I'm familiar with all the steps in the process.
The machine originally had a single 160GB SATA disk (ad4) and 1GB RAM. I've just had the hosting company install a second identical disk (ad6) and another gigabyte of RAM.
My plan is:
- Rebuild my world from 7.2-RELEASE to 7.2-STABLE to pull in ZFS v13 and boot support and reboot into the newer version.
- Prepare the new disk (ad6) with GPT and ZFS:
a) Use gpart to GPT partition the disk similarly to this:
Code:=> 34 312499933 ad6 GPT (149G) 34 128 1 freebsd-boot (64K) 162 312499805 2 freebsd-zfs (149G)
c) Create zpool from ad6p2
d) Create seperate ZFS filesystems as needed
- Build a ZFS-aware /boot/loader and install it in the existing UFS root filesystem.
- Copy existing installation from ad4 to ad6. I'm not sure about the best way to do this. I've always used dump|restore to move live installations between disks in the past, but that's not an option for UFS->ZFS. I'm thinking I'll take snapshots of my live UFS filesytems, mount the snapshots, and use tar or rsync to copy their contents to the new ZFS filesystems.
- Configure /boot/loader.conf on ad4 to load the kernel and mount the ZFS filesystems from ad6.
- Cross fingers and reboot. At this point, hopefully the system will come back up and be fully running from ZFS filesystems on ad6.
- Now I can trash the contents of ad4 and set it up to mirror ad6:
a) Replicate the GPT partitioning from ad6
b) Install pmbr into block 0 and gptzfsboot image into ad4p1
c) zpool attach ad4p2
Job done.
Can anyone see any glaring flaws in my plan?