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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Solaris 10 replacing boot drive

Status
Not open for further replies.

johntla

IS-IT--Management
Mar 26, 2009
1
US
I have Sunfire V440R with 4 X 73 Gig drives. Unfortunately my engineering department requires all the space on drives that never been able to setup mirror ( loosing one drive when mirrored).
I have drive 0 (boot/system drive) having some bad sector problem and has been crashing every so often. So i am thinking to take drive 1 out and insert a new drive to see if I can mirror it with drive 0 and 1. shutdown and take the bad drive 0 out and replace it with the new mirrored drive and put back the drive that i had taken out (drive 1) without loosing any data and reboot from the new boot drive. Is this possible? Anyone have suggestion or step by step document it will be appreciated. Thank you all in advance, johntla
 
Yes, it is possible. There have been many 'threads' on this forum about mirroring and replacing disks, etc. Try using the 'search' facility.

As this sounds like a 'one off' job, if it were me, I would probably not go down the mirroring route:
- there may not be spare partition(s) for the metadevice state databases
- once mirrored, it leaves a 'footprint' on the disk(s)
- it might cause confusion to other Sys Admins if mirroring is setup on only one disk

So, here is a suggestion of how I would resolve the situation:
- edit /etc/vfstab - comment out all but the existing 'boot disk' filesystems
- shutdown and remove your drive 1, insert new disk to be the 'new boot disk'
- boot into Single User Mode
Drive 0 = old (failing) 'boot disk' (eg c1t0d0)
Drive 1 = 'new boot disk' (eg c1t1d0)
- copy 'partition table to 'new boot disk' with:
prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s /dev/rdsk/c1t1d0s2
- create filesystems on each partition of 'new boot disk' with:
newfs /dev/c1t1d0s0 (repeat for other partitions that require filesystems)
- install a boot block on 'new boot disk' with:
/usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t1d0s0
- copy over each partition (from old to new) with:
mount /dev/dsk/c1t1d0s0 /mnt
ufsdump 0f - /dev/dsk/c1t0d0s0 | (cd /mnt; ufsrestore rf - )
rm /mnt/restoresymtable
umount /mnt
# that did s0, so repeat for the other partitions that have filesystems

- shutdown the system, remove drive 0 (store for safe-keeping), put drive 1 into drive 0 and replace drive 1 with the 'good data disk' from earlier
- boot
- edit /etc/vfstab and un-comment references to other disks partitons (reverse what was done earlier)
- mount -a (check all filesystems have mounted Ok)
- reboot if necessary

I have typed this from my notes (and memory), so it is untested for your situation. Please feel free to get other advice.

I hope it helps.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top