![Solaris 上的 iostat 错误计数器](https://linux22.com/image/59450/Solaris%20%E4%B8%8A%E7%9A%84%20iostat%20%E9%94%99%E8%AF%AF%E8%AE%A1%E6%95%B0%E5%99%A8.png)
在 Solaris 系统中,我使用 iostat -E 和 kstat 来识别故障磁盘。我的问题是我不知道问题是在磁盘上、在控制器上、在总线上还是在文件系统层(ZFS)上。
关键是理解属性:
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
我在互联网上查了一下,但没有找到任何结论。
答案1
虽然 iostat 和 kstat 很有用,但由于您已经安装了带有 ZFS 的 Solaris(10 或更高版本),因此您可以利用故障管理架构 (FMA),它与 zfs 和操作系统的许多其他部分紧密相连。
查看“fmdump”的输出以查看是否存在任何错误。举个例子(重复输出被省略):
$ fmdump -u af2a7c20-05f9-ef95-b016-fcfa812c4f81
TIME UUID SUNW-MSG-ID EVENT
Aug 15 15:48:16.3800 af2a7c20-05f9-ef95-b016-fcfa812c4f81 ZFS-8000-LR Diagnosed
Aug 15 15:58:16.2179 af2a7c20-05f9-ef95-b016-fcfa812c4f81 FMD-8000-9L Isolated
Sep 01 10:11:17.6591 af2a7c20-05f9-ef95-b016-fcfa812c4f81 FMD-8000-9L Isolated
Oct 09 21:45:57.0520 af2a7c20-05f9-ef95-b016-fcfa812c4f81 FMD-8000-9L Isolated
Oct 24 17:21:48.9799 af2a7c20-05f9-ef95-b016-fcfa812c4f81 FMD-8000-9L Isolated
Nov 02 12:41:30.4093 af2a7c20-05f9-ef95-b016-fcfa812c4f81 FMD-8000-4M Repaired
Nov 02 12:41:30.4169 af2a7c20-05f9-ef95-b016-fcfa812c4f81 FMD-8000-6U Resolved
更详细一点:
$ fmdump -v -u af2a7c20-05f9-ef95-b016-fcfa812c4f81
TIME UUID SUNW-MSG-ID EVENT
Aug 15 15:48:16.3800 af2a7c20-05f9-ef95-b016-fcfa812c4f81 ZFS-8000-LR Diagnosed
100% fault.fs.zfs.open_failed
Problem in: zfs://pool=6e954c71737e8931/vdev=b0b1eb6df8896769/pool_name=soundandvision/vdev_name=id1,sd@SATA_____Hitachi_HDS72101______JPS911N11TBURL/a
Affects: zfs://pool=6e954c71737e8931/vdev=b0b1eb6df8896769/pool_name=soundandvision/vdev_name=id1,sd@SATA_____Hitachi_HDS72101______JPS911N11TBURL/a
FRU: zfs://pool=6e954c71737e8931/vdev=b0b1eb6df8896769/pool_name=soundandvision/vdev_name=id1,sd@SATA_____Hitachi_HDS72101______JPS911N11TBURL/a
FRU Location: -
请注意,如果您的磁盘位于带有 SES 位置信息的 jbod 中,或者您有受支持的阵列,那么您将能够看到相关磁盘的位置,如下所示:
$ fmdump -v -u 80db2054-3954-49bf-b705-8820542679fc
TIME UUID SUNW-MSG-ID EVENT
Nov 09 08:09:10.0909 80db2054-3954-49bf-b705-8820542679fc DISK-8000-6R Diagnosed
100% fault.io.scsi.disk.tran.unstable.leaf
Problem in: hc://:chassis-mfg=Oracle-Corporation:chassis-name=ORACLE-DE2-24C:chassis-part=31883801+1+1:chassis-serial=1330FMT006:fru-mfg=HITACHI:fru-name=H7230AS60SUN3.0T:fru-serial=001229RSEGSD--------YHKSEGSD:fru-part=HITACHI-H7230AS60SUN3.0T:fru-revision=A142:devid=id1,sd@n5000cca01ad3b688/ses-enclosure=0/bay=16/disk=0
Affects: dev:///:devid=id1,sd@n5000cca01ad3b688//scsi_vhci/disk@g5000cca01ad3b688
FRU: hc://:chassis-mfg=Oracle-Corporation:chassis-name=ORACLE-DE2-24C:chassis-part=31883801+1+1:chassis-serial=1330FMT006:fru-mfg=HITACHI:fru-name=H7230AS60SUN3.0T:fru-serial=001229RSEGSD--------YHKSEGSD:fru-part=HITACHI-H7230AS60SUN3.0T:fru-revision=A142:devid=id1,sd@n5000cca01ad3b688/ses-enclosure=0/bay=16/disk=0
FRU Location: /ORACLE-DE2-24C.1330FMT006/Disk-16