Tuesday, August 21, 2007

Recovering from a hard disk crash on Sun servers

A server was setup with a mirror of 2 internal disk. This mirror was created using Solaris 9 built-in disk tools : disksuite.
Following a reboot, one of the 2 disks died and it was the primary boot disk ( of course ! ). So the server was not able to boot. We had to find a way of booting from the second disk.
At the ok prompt we created a new alias :
nvalias disk2 /pci@1f,4000/scsi@3/disk@0,0
then
boot disk2
and the server booted. The challenge here was to find the correct syntax for the device. So we typed in :
show-devs
We saw 2 disks. From another identical server, we typed in /usr/sbin/prtconf -vp :
Node 0xf002ce38
screen: /pci@1f,2000/TSI,gfxp@1
net: /pci@1f,4000/network@1,1
disk: /pci@1f,4000/scsi@3/disk@0,0
cdrom: /pci@1f,4000/scsi@3/disk@6,0:f
tape: /pci@1f,4000/scsi@3,1/tape@4,0
tape1: /pci@1f,4000/scsi@3,1/tape@5,0
tape0: /pci@1f,4000/scsi@3,1/tape@4,0
disk6: /pci@1f,4000/scsi@3/disk@6,0
disk5: /pci@1f,4000/scsi@3/disk@5,0
disk4: /pci@1f,4000/scsi@3/disk@4,0
disk3: /pci@1f,4000/scsi@3/disk@3,0
disk2: /pci@1f,4000/scsi@3/disk@2,0
disk1: /pci@1f,4000/scsi@3/disk@1,0
disk0: /pci@1f,4000/scsi@3/disk@0,0
scsi: /pci@1f,4000/scsi@3
floppy: /pci@1f,4000/ebus@1/fdthree
ttyb: /pci@1f,4000/ebus@1/se:b
ttya: /pci@1f,4000/ebus@1/se:a
keyboard!: /pci@1f,4000/ebus@1/su@14,3083f8:forcemode
keyboard: /pci@1f,4000/ebus@1/su@14,3083f8
mouse: /pci@1f,4000/ebus@1/su@14,3062f8
name: 'aliases'

This is where we found the string for the nvalias command.

A nice link for all openboot command is : http://www.adminschoice.com/docs/open_boot.htm