[OpenIndiana-discuss] Moving an OI install to a new hard drive?

Mark Humphreys saskaloon at gmail.com
Mon May 16 18:55:25 UTC 2011


Hi Dan,

Generally speaking, new systems should have new installations done on them
to deploy a customized driver set specific to the target system.  However,
if you're looking at using the same 'rpool' on new hardware, I will trust
that you have sorted-through potential hardware / driver issues.  If so, you
could also try the simple process of mirroring the existing disk, to the new
disk, in the old machine.  Then just install the new disk in the new
machine.

The only limitations to this process are:
- As mentioned, the hardware has to be very similar to the original system,
so that device names aren't changed, and video works, etc.
- The new disk has to be the same size as, or larger than, the original.
- There is some debate as to whole disk installations, versus
partition-based installations.

(Reference:
http://darkstar-solaris.blogspot.com/2008/09/zfs-root-mirror.html

1. Use "format" and your BIOS to identify the disks in the machine, before
installing the new disk.  (Let's assume it's on c4t0d0)

2. Power-off; install the new disk; and, power-up again.

3. Re-run "format" to identify the new disk location.  (Let's assume c4t1d0)

4. While in "format", actually format the "new" disk 100% as type "solaris
2".

5. Install the old disk geometry descriptors, into the new disk, by
exporting them from the old and into the new.

# prtvtoc /dev/rdsk/c4t0d0s0 | pfexec fmthard -s - /dev/rdsk/c4t1d0s0


6. Add the new hard-disk to ZFS mirror of the rpool.

pfexec zpool attach -f rpool c4t0d0s0 c4t1d0s0

(Wait for mirror process to finish silvering by checking with "zpool
status".)


7. Install the GRUB boot-loader to the new hard disk.

pfexec installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c4t1d0s0


8. Test that the new hard drive, is a valid stand-in boot device by
shutting-down; swapping the connectors on the hard drives; and, booting
back-up.

9. If the new hard drive passes the boot test, you should generally be
fine.  Shutdown and swap the hard drive connections back-to their original
position.

10. Pull the hard-drive and install it in the new system.  Try booting.  If
the hardware (ie. video, hard drive controllers, etc.) is similar enough,
you should be good-to-go!

If it doesn't boot, you may need a rescue disk to go in and change the
device references; and, re-install GRUB, etc.

>From here, you should only have dangling missing devices on both systems,
which should be easy to clean-up (ie. remove), or at least disable.  Heck,
leave the device reference around for when you're ready to permanently
mirror root!

Try testing this procedure-out; but, be aware that virtual machines present
identical hardware, which make it hard to rule-out / easy to be blind-sided
by hardware and there requisite device changes.

Regards,

-- 
.\\ark


More information about the OpenIndiana-discuss mailing list