Professional Documents
Culture Documents
Disk Cloning in Solaris
Disk Cloning in Solaris
A few assumptions:
master disk: c0t0d0
\--> disk already configured and in use
alternate: c0t1d0
\--> disk not configured and will become a clone of master
configured slices: 0 1 3 4
\--> 0=/, 1=swap, 3=/usr, 4=/var
your path: PATH=/usr/sbin:/usr/bin
\--> your path must contain at least the above
disk geometry:
\--> the disk geometry of both devices should be the same or
you should be aware of the potential issues otherwise
3) mount up the root slice, etc, of the alternate disk under /mnt
cd / ; umount /mnt
fsck /dev/rdsk/c0t1d0s0
fsck /dev/rdsk/c0t1d0s3
fsck /dev/rdsk/c0t1d0s4
8) reboot your box and boot from your alternate disk... enjoy
step 1) prtvtoc will print out the disk's partition table for use
in creating the slices for the alternate disk
step 3) mounting the alternate disk so that the master disk can be
mirrored to it
step 4) ufsdump will dump the contents of the specified device out to
the file specified prior to the device being dumped (in this
case, STDIN); the options are specified in BSD styling, not
requiring a hyphen preceding; option 0 states to dump the
entire file system, u updates /etc/dumpdates with relevant
dump information, f states to dump to a specific file which
is seen above as - (STDIN)
step 5) the vfstab on the new device needs to be updated so that the
appropriate filesystems are mounted relative to the alternate
disk (failure to do so will cause the box not to boot if one
tries to boot from this device); the sed command is simply
changing any instances of c0t0d0 (master disk) to c0t1d0
(the alternate disk) on the copy of vfstab on the new disk
step 6) fsck is run to simply check to make sure the filesystems are
sane and usable on the alternate disk
step 7) installboot will install a bootblock to the specified slice
so that one may boot the system from it; the option
"/usr/platform/`uname -i`/lib/fs/ufs/bootblk contains the
bootblock code for the master disk; this step must be
completed otherwise the system will not boot from the
alternate disk
(Addition by colleague (Bill))
Sol10 x86 (and prev): Grub is used. These two, "stages",
one to load grub, and the other to load the OS boot code,
are stored in the MBR by installgrub.