Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Mirror a Hard Disk without using Disksuite/VXVM

Administration

How to Mirror a Hard Disk without using Disksuite/VXVM

by  coffeysm  Posted    (Edited  )
Disksuite can be kind of Quirky to in the fact lets say you change a file and you did it wrong opps both disks now have the same copy, not to mention if the mirror ever breaks it can be a real hassle to break the mirror and reboot if your not that experienced. Also the DD command can take forever since it copies everything on the disk block for block. So here comes a common solution. The UFSDUMP and UFSRESTORE command.

# Step 1 Setup the partition info the same

# prtvtoc /dev/rdsk/cAtBdCsD | fmthard -s - /dev/rdsk/cWtXdYsZ
# Step 2 Create a newfs on all NEW partitions

# newfs /dev/rdsk/cWtXdYsZ (You can probably script this but I have not done that here)

# Step 3 Mount up new partition /mnt is good for our purpose and do a level 0 dump for every partition

# mount /dev/dsk/cWtXdYsZ /mnt
# ufsdump 0f - /dev/dsk/cAtBdCsD | (cd /mnt ; ufsrestore xf -)

# Now create a boot block on S0

#installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/cWtXdYs0

# Mount up slice 0 again

# mount /dev/dsk/cWtXdYs0 /mnt
# vi /mnt/etc/vfstab (change the controller, target, slice,info,etc..)
# vi /etc/dumpadm.conf (change the dump device to the new swap slice)

# You should now be able to boot of this second hard drive

Note: The new Sun Fire Servers this process has a few additional steps since they now use WWN's also to access to their drives.

# cp /mnt/etc/path_to_inst /mnt/etc/path_to_inst.ORIG
# rm /mnt/etc/path_to_inst
# rm -rf /mnt/dev/dsk/* /mnt/dev/rdsk/*
# init 0
# Swap hard drives
# boot cdrom -s
# devfsadm -r /mnt -p /mnt/etc/path_to_inst
# reboot -- -r
# System should now boot up

# After that when you reboot off the second disk do a boot -ar to rebuild the device tree and /etc/path_to_inst.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top