We had a hard drive (FC) mismatch and had to rebuild the path_to_inst file and /dev/rdsk/*, /dev/dsk/* and /dev/rmt/* directories. We had two drives (but the backup drive was inoperable), so instead of booting off the backup, we had to recover via cdrom. That part was a little trickier than expected. After a little web searching, a handy disaster discovery procedure (hardware mismatch) was found on the Sun BigAdmin site.
Method 1 (towards the bottom of the Sun page)
Here is what was done.
Boot from CDROM
ok boot cdrom -s
# mount /dev/dsk/c1t#d#s0 /mnt
Rename path_to_inst
# mv /mnt/etc/path_to_inst /mnt/etc/path_to_inst.org
Remove all old device links
# rm /mnt/dev/rdsk/c1*; rm /mnt/dev/dsk/c1*; rm /mnt/dev/rmt/*
Rebuild path_to_inst and devices (this (syntax) was the part we were missing)
# devfsadm -r /mnt -p /mnt/etc/path_to_inst
**Note: Suspect corrupted bootblock? - reinstall it.
# cd /mnt/usr/platform/`uname -i`/lib/fs/ufs
# /mnt/usr/sbin/installboot bootblk /dev/rdsk/c1t#d#s0
Unmount root slice and reboot
# cd /
# umount /mnt; init 6
By the way, we tried method two (boot -rav) prior to performing the web search but each attempt failed.
4 comments:
FYI -- renaming path_to_inst to "path_to_inst.orig" or "path_to_inst.save" doesn't always work!
Certain kernel patch versions of Solaris 9 will look for the *first* file in /etc that *starts* with the 12 characters "path_to_inst" if it can't find "/etc/path_to_inst".
We found this out the hard way! :-)
We had a similar problem where we needed to rebuild some hosed drive mappings, renamed path_to_inst to path_to_inst.orig, and every time we rebooted, the drives were still mapped completely strangely. We finally got word from Sun to rename path_to_inst.orig to orig.path_to_inst and it worked!!!
hmmm...Good FYI Mark. It's a handy thing to know. Btw, we were working on a Solaris 8 platform.
Your comment: "We found this out the hard way! :-)" This is usually the best teacher. It burns the "image" into your brain. :)
Here's a clean and elegant way to clean up and rebuild the /devices and /dev directories:
devfsadm -Cv -r /mnt
Appreciate the tip ux-admin.
Post a Comment