0 * * * * OUTPUT="`/dcs/bin/metachk`"; if [ "$OUTPUT" = "" ]; then : ; else echo "$OUTPUT" | /bin/mailx -s 'meter metachk' strombrg@dcs.nac.uci.edu dcs@dcs.nac.uci.edu dmelzer@uci.edu; fi
hostname bingy.nac.uci.edu - configs/SVM_c0t0+use_0 after
install_type initial_install system_type standalone partitioning explicit usedisk c0t0d0 filesys c0t0d0s7 10 /rm-me filesys c0t0d0s6 200 /var filesys c0t0d0s1 200 swap filesys c0t0d0s0 free / usedisk c0t0d0This will create a 10 megabyte partition called /rm-me. After the install, umount /rm-me and then comment out the partition in /etc/vfstab, and use it for your metadb's. 5 meg is supposedly all that's really necessary, but autoinstall didn't want to create something smaller than 10 meg - and, when I tried to create 3 metadb's in a 10M partition, SVM said there wasn't enough room. Creating 2 metadb's in a 10M partition worked though.
bingy-root> metadb
flags first blk block count
a m pc luo 16 1034 /dev/dsk/c0t2d0s7
W pc l 16 1034 /dev/dsk/c0t3d0s7
a pc luo 16 1034 /dev/dsk/c0t4d0s7
bingy-root> metadb -d /dev/dsk/c0t3d0s7
bingy-root> metadb -a /dev/dsk/c0t3d0s7
bingy-root> metadb
flags first blk block count
a m pc luo 16 1034 /dev/dsk/c0t2d0s7
a u 16 1034 /dev/dsk/c0t3d0s7
a pc luo 16 1034 /dev/dsk/c0t4d0s7
Tue Mar 22 18:04:13
bingy-root>
bingy-root> metastat
d6: RAID
State: Needs Maintenance
Invoke: metareplace -f d6 c0t2d0s6 <new device>
Interlace: 32 blocks
Size: 4184856 blocks
Original device:
Size: 4185408 blocks
Device Start Block Dbase State Hot Spare
c0t2d0s6 330 No Maintenance
c0t3d0s6 330 No Okay
c0t4d0s6 330 No Last Erred
Wed Mar 23 12:17:59
bingy-root> metadb
flags first blk block count
Wm pc l 16 1034 /dev/dsk/c0t2d0s7
a pc luo 16 1034 /dev/dsk/c0t3d0s7
a pc luo 16 1034 /dev/dsk/c0t4d0s7
Wed Mar 23 12:18:07
bingy-root> metareplace -e d6 c0t2d0s6
metareplace: bingy.nac.uci.edu: d6: operation requires -f (force) flag
Wed Mar 23 12:18:26
bingy-root> metareplace -e -f d6 c0t2d0s6
d6: device c0t2d0s6 is enabled
Wed Mar 23 12:18:29
bingy-root> metastat
d6: RAID
State: Resyncing
Invoke: metareplace -f d6 c0t4d0s6 <new device>
Resync in progress: 0% done
Interlace: 32 blocks
Size: 4184856 blocks
Original device:
Size: 4185408 blocks
Device Start Block Dbase State Hot Spare
c0t2d0s6 330 No Resyncing
c0t3d0s6 330 No Okay
c0t4d0s6 330 No Last Erred
Wed Mar 23 12:18:33
The easiest way to do it with the prtpicl command.
prtpicl -v |grep disk
:disk-write-fix
disk-label (disk-label, 3d00000032)
:devfs-path /packages/disk-label
:binding-name disk-label
:_class disk-label
:name disk-label
:bootpath /pci@1c,600000/scsi@2/disk@0,0:a
:boot-device disk:a disk1:a
:diag-device disk0:f
:disk /pci@1c,600000/scsi@2/disk@0,0
:disk0 /pci@1c,600000/scsi@2/disk@0,0
:disk1 /pci@1c,600000/scsi@2/disk@1,0
:disk2 /pci@1c,600000/scsi@2/disk@2,0
:disk3 /pci@1c,600000/scsi@2/disk@3,0
:SlotType disk-slot
disk (fru, 3d000006fe)
:name disk
:SlotType disk-slot
disk (fru, 3d00000701)
:name disk
:SlotType disk-slot
:SlotType disk-slot
Thanks to Pascal Grostabussiat [pascal@azoria.com] for pointing this
out!
From: David Graves To: sunmanagers@sunmanagers.org Subject: SUMMARY: D1000 power failure with Disksuite: how to restore to running state? Date: Mon, 27 Feb 2006 22:20:16 -0500 (19:20 PST) Many thanks to all who replied. This story has a happy ending. In a situation where an array loses power, and the server does not, each disk that the system attempts to read will fail. In a miror situation, it is possible, then, to have multiple read fails. For each failure that is not fatal (i.e. the server still thinks there's an available mirror or slice), it marks the disk in 'maintenance' mode. When a read is attempted from a the last available slice with a failed result, then that disk is placed into the 'last erred' mode. In a RAID 5 system, only 1 disk will enter the 'maintenance' mode. The next failed read places the failed disk into the 'last erred' mode, and the entire metadevice is taken offline. Further attempts at reads result in IO errors. As dersmythe pointed out, the Disksuite user manual makes reference a power failure like this. The procedure is to use the metareplace command with the -e switch on the disk in 'maintenance' mode. And example is: metareplace -e dx cxtxdxsx (replacing the x's with the metadevice and slice that have failed). It is important to use this command first on the 'maintenance' disk before attempting to enable the 'last erred' disk. I personally ran into a problem with this method: execution of metareplace -e failed and reported that I must use the -f (force) switch. Feeling uncomfortable with proceeding, I held off to do more research. A SECOND method of recovery is available as well: it is possible to CLEAR the metadevice with the metaclear command, and rebuild it, as long as the slices/disks are ordered just as they were prior to failure. The order is revealed with the metastat -p command. The manual recommends using this method only when the 1st method is unsuccessful. All metadevices (mirrors, raids, concats, etc) can be rebuilt in this fashion according to the manual. There are valuable documents on docs.sun.com as well as an article on sunsolve.sun.com referring to the second method of recovery. Sunsolve requires a subscription. As it happens, I employed neither of these procedures (unintentionally). In my case, a coincidental memory error caused a panic (I'm wondering if this was due to the original power outage as this machine is quite stable). Upon reboot, the metadevice was online and the 'last erred' disk was cleared. I used the metareplace -e command to clear the 'maintenance' disk and all was well. Thanks again to Prabir Sarkar, dersmythe, Michael T Pins, and Damian Wiest
It turns out that installboot is the proper method to use to reinstall a corrupted boot sector even when disksuite is used.
You can e-mail the author with questions or comments: