Replace hard drive
990261Feb 10 2013 — edited Apr 4 2013I need to replace a hard drive on a Sun Fire X2200. It is giving a bad sector error. The problem is I do not know what is the best method to replace the hard drive. Our UNIX admin had a stroke so I am left to take over the administration until he is back. There are two hard drives that are in the server. I have never replaced a hard drive in a UNIX system. I usually use ghost to backup Windows machines. Below are some commands I ran to gather some information. For some reason I cannot run the format command right now. I will have to try it at the console tomorrow. The hard drive that needs replaced is c2d0. I am not sure if I need to copy the data to another hard drive or restore it from a backup? Do I need to boot into single user mode to do the backup and restore? The system is being backed up using Legato Networker on a regular basis, but I have never used the software until now. I have been just changing the tapes out. Also, I ordered an identical server so I can do some testing on it. Thanks in advance.
mil3%dmesg
Feb 8 14:04:55 mil3 Error for command 'read sector' Error Level: Fatal
Feb 8 14:04:55 mil3 gda: [ID 107833 kern.notice] Requested Block 813460600, Error Block: 813460615
Feb 8 14:04:55 mil3 gda: [ID 107833 kern.notice] Sense Key: uncorrectable data error
Feb 8 14:04:55 mil3 gda: [ID 107833 kern.notice] Vendor 'Gen-ATA ' error code: 0x7
Feb 8 14:04:57 mil3 gda: [ID 107833 kern.warning] WARNING: /pci@0,0/pci-ide@5/ide@1/cmdk@0,0 (Disk1):
mil3% iostat -en
---- errors ---
s/w h/w trn tot device
0 0 0 0 c1d0
0 5736 0 5736 c2d0
6 2 0 8 c0t0d0
mil3% more /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1d0s1 - - swap - no -
/dev/dsk/c1d0s0 /dev/rdsk/c1d0s0 / ufs 1 no -
/dev/dsk/c1d0s6 /dev/rdsk/c1d0s6 /disk1 ufs 2 yes -
/dev/dsk/c2d0s7 /dev/rdsk/c2d0s7 /disk2 ufs 2 yes -
/devices - /devices devfs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
mil3% df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c1d0s0 79G 17G 61G 22% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 4.7G 904K 4.7G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
/usr/lib/libc/libc_hwcap2.so.1
79G 17G 61G 22% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 4.7G 84K 4.7G 1% /tmp
swap 4.7G 32K 4.7G 1% /var/run
/dev/dsk/c2d0s7 688G 453G 228G 67% /disk2
/dev/dsk/c1d0s6 835G 656G 170G 80% /disk1
/view 79G 17G 61G 22% /view