SUMMARY: cloning boot drive

From: Grant Lowe (glowe@sbcglobal.net)
Date: Wed Nov 10 2004 - 17:15:54 EST


Hi gurus.
 
Another problem solved. First thanks to the following for their help:
 
Drew Skinner
Michael Horton
Darren Dunham
list-unixexpert@adelphia.net
No Spam (nouce@mighty.co.za)
Alex Theodore
Thomas M. Payerle
Frederick Hughes
Bruce Kirkland
 
Everybody gave got lots of good advice. Some mentioned why I would use dd. I thought dd might help because of SDS's screwiness. Others suggest using a flash archive. Drew Skinner gave me just about everything I need, which I include here as it includes the way I went forward. I add to it something at the end.
 
Assume the following layout and adjust for your site (# devices, etc):

Primary Mirror Subdevices Disk
d0 d10, d20 /dev/dsk/c0t0d0s0 /dev/dsk/c0t1d0s0
d1 d11, d21 /dev/dsk/c0t0d0s1 /dev/dsk/c0t1d0s1
d3 d13, d23 /dev/dsk/c0t0d0s3 /dev/dsk/c0t1d0s3
metadb databases /dev/dsk/c0t0d0s7 /dev/dsk/c0t1d0s7

Then issue:

metadetach d0 d20
metadetach d1 d21
metadetach d3 d23
metadb -d /dev/dsk/c0t1d0s7
metaclear d20
metaclear d21
metaclear d23

-- This second disk will boot the new server. ( /dev/dsk/c0t1d0s0 will
become /dev/dsk/c0t0d0s0 on the new 220 ). Next steps:

mkdir /a
mount /dev/dsk/c0t1d0s0 /a
vi /a/etc/vfstab <== Change all references of /dev/md/dsk/d? to the
logical disk eg: /dev/dsk/c0t0d0s0 and /dev/rdsk/c0t0d0s0
Close the file.
vi /a/etc/system <== Verify that a metaroot is not specified.
Close the file.

When ready issue an "init 0" -- there is now way to offline a standard
SCSI device in a 220 that I'm aware of (or have tried to use). Once at
the OK prompt pull the drive and put it in the correct slot of the new
220; at the same time replacing the donor drive with one from the other
unit.

Issue a "boot" to the old system. Down time can be as low as 3 mins.
Issue a "boot -r" to the new 220. If the new 220 doesn't come up try
switching the slot the disk is in.

On System #1 run format, matching the partitions to the old disks.
Then add back the metadevice databases:
metadb -a -c3 /dev/dsk/c0t1d0s7
Then:
metainit d20 1 1 /dev/dsk/c0t1d0s0
metainit d21 1 1 /dev/dsk/c0t1d0s1
metainit d23 1 1 /dev/dsk/c0t1d0s3
Finally:
metattach d0 d20
metattach d1 d21
metattach d3 d23

==> Allow the system time to resync before rebooting any further.

On the new system: Recreate all the mirrors from scratch as a new SDS
install. First run format to match the donated drives partition sizes.

Then:

metadb -a -f -c3 /dev/dsk/c0t0d0s7
metadb -a -c3 /dev/dsk/c0t1d0s7
metainit d10 1 1 /dev/dsk/c0t0d0s0
metainit d11 1 1 /dev/dsk/c0t0d0s1
metainit d13 1 1 /dev/dsk/c0t0d0s3
metainit d0 -m d10
metainit d1 -m d11
metainit d3 -m d13
vi /etc/vfstab <== Change all mount points **Except root** to
/dev/md/dsk/d1 (etc) and /dev/md/rdsk/d1 ....
Save the file.
metaroot d0 <== Assuming the root filesystem
lockfs -fa
reboot

After reboot create the other half of the mirrors (per the first server
above).
 
I would like to add that the 220 does have hot-swappable capabilities, so there was no downtime for the original machine.
 
Grant
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:29:41 EDT