为什么区分故障磁盘和仍处于故障过程中的磁盘很重要? 因为知道磁盘是否发生故障可能会在需要更换时节省几个步骤。
在本示例中,使用Solaris Volume Manager(SVM)将两个磁盘c1t0d0和c1t1d0彼此镜像。 c1t1d0正在显示即将发生故障的迹象或已经失败,视情况而定。 这里是差异。
在format命令中仍然可以看到处于故障过程中的磁盘。
AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@780/pci@0/pci@9/scsi@0/sd@0,0
1. c1t1d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@780/pci@0/pci@9/scsi@0/sd@1,0
2. c1t2d0 <SEAGATE-ST973402SSUN72G-0400-68.37GB>
/pci@780/pci@0/pci@9/scsi@0/sd@2,0
3. c1t3d0 <SEAGATE-ST973402SSUN72G-0400-68.37GB>
/pci@780/pci@0/pci@9/scsi@0/sd@3,0
Specify disk (enter its number):
故障磁盘标记为 “drive not available”
AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@1f,700000/scsi@2/sd@0,0
1. c1t1d0 <drive not available>
/pci@1f,700000/scsi@2/sd@1,0
2. c1t2d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@1f,700000/scsi@2/sd@2,0
3. c1t3d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@1f,700000/scsi@2/sd@3,0
Specify disk (enter its number):
故障过程中的磁盘将在/ var / adm / messages 中显示读或写错误。
Jan 1 03:11:19 solaris_1 scsi: [ID 107833 kern.warning] WARNING: /pci@1c,600000/scsi@2/sd@1,0 (sd1):Jan 1 03:11:19 solaris_1 Error for Command: write(10) Error Level: Retryable
Jan 1 03:11:19 solaris_1 scsi: [ID 107833 kern.notice] Requested Block: 37782714 Error Block: 37782714
Jan 1 03:11:19 solaris_1 scsi: [ID 107833 kern.notice] Vendor: SEAGATE Serial Number: 0344A6E4EG
Jan 1 03:11:19 solaris_1 scsi: [ID 107833 kern.notice] Sense Key: Unit Attention
Jan 1 03:11:19 solaris_1 scsi: [ID 107833 kern.notice] ASC: 0x29 (bus device reset message occurred), ASCQ: 0x3, FRU: 0x4
故障磁盘不会响应
Jul 19 11:21:59 solaris_1 scsi: [ID 107833 kern.warning] WARNING: /pci@1f,700000/scsi@2/sd@1,0 (sd2):
Jul 19 11:21:59 solaris_1 disk not responding to selection
Jul 19 11:22:01 solaris_1 scsi: [ID 107833 kern.warning] WARNING: /pci@1f,700000/scsi@2/sd@1,0 (sd2):
Jul 19 11:22:01 solaris_1 disk not responding to selection
故障过程中的磁盘将显示硬盘和传输错误数量随时间的增加。
# iostat -En c1t1d0
c1t1d0 Soft Errors: 0 Hard Errors: 28473 Transport Errors: 107662
Vendor: SEAGATE Product: ST336607LSUN36G Revision: 0307 Serial No: 0344A6E4EG
Size: 36.42GB <36418595328 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 28473 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
#
故障磁盘只会显示传输错误数量的增加。
# iostat -En c1t1d0
c1t1d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 18
Vendor: FUJITSU Product: MAW3073NCSUN72G Revision: 1703 Serial No: 0708B0KP9L
Size: 73.40GB <73400057856 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
#
既然您确定磁盘已损坏,您可以跳过 metadevice 相关的操作 - metadetach和metaclear - 必须在更换故障过程中磁盘之前完成。 事实上,SVM将不允许您在故障磁盘上执行metadetach和metaclear。
# metadetach d0 d20
metadetach: solaris_1: d0: attempt an operation on a submirror that has erred components
#
您仍然需要删除状态数据库副本。 但是,这是一个命令,相比故障过程中的磁盘你需要十几个metadetaches和metaclears。
改天发更换SVM硬盘。