$ iostat -en ---- errors --- s/w h/w trn tot device 0 0 0 0 c0t5000C500335F95E3d0 0 0 0 0 c0t5000C500335FC3E7d0 0 0 0 0 c0t5000C500335BA8C3d0 0 12 0 12 c2t0d0 0 0 0 0 c0t5000C500335E106Bd0 0 0 0 0 c0t50015179594B6F11d0 0 0 0 0 c0t5000C500335DC60Fd0 0 0 0 0 c0t5000C500335F907Fd0 0 0 0 0 c0t5000C500335BD117d0
$ zpool history system1 History for 'system1': 2012-11-12.13:01:31 zpool create system1 mirror c0t1d0 c0t2d0 c0t3d0 2012-11-12.13:28:10 zfs create system1/glori 2012-11-12.13:37:48 zfs set checksum=off system1/glori
$ zpool status -x all pools are healthy
$ zpool status pond pool: pond state: DEGRADED status: One or more devices are unavailable in response to persistent errors. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Determine if the device needs to be replaced, and clear the errors using 'zpool clear' or 'fmadm repaired', or replace the device with 'zpool replace'. Run 'zpool status -v' to see device specific details. scan: scrub repaired 0 in 0h0m with 0 errors on Wed Jun 20 13:16:09 2012 config: NAME STATE READ WRITE CKSUM pond DEGRADED 0 0 0 mirror-0 ONLINE 0 0 0 c0t5000C500335F95E3d0 ONLINE 0 0 0 c0t5000C500335F907Fd0 ONLINE 0 0 0 mirror-1 DEGRADED 0 0 0 c0t5000C500335BD117d0 ONLINE 0 0 0 c0t5000C500335DC60Fd0 UNAVAIL 0 0 0 errors: No known data errors
scan: scrub in progress since Wed Jun 20 14:56:52 2012 529M scanned out of 71.8G at 48.1M/s, 0h25m to go 0 repaired, 0.72% done
$ zpool status -v system1 pool: system1 state: ONLINE status: One or more devices has experienced an error resulting in data corruption. Applications may be affected. action: Restore the file in question if possible. Otherwise restore the entire pool from backup. see: http://support.oracle.com/msg/ZFS-8000-8A scan: scrub repaired 0 in 0h0m with 2 errors on Fri Jun 29 16:58:58 2012 config: NAME STATE READ WRITE CKSUM system1 ONLINE 2 0 0 c8t0d0 ONLINE 0 0 0 c8t1d0 ONLINE 2 0 0 errors: Permanent errors have been detected in the following files: /system1/file.1
SUNW-MSG-ID: ZFS-8000-QJ, TYPE: Fault, VER: 1, SEVERITY: Minor EVENT-TIME: Wed Jun 20 13:09:55 MDT 2012 ... SOURCE: zfs-diagnosis, REV: 1.0 EVENT-ID: e13312e0-be0a-439b-d7d3-cddaefe717b0 DESC: Outstanding dtls on ZFS device 'id1,sd@n5000c500335dc60f/a' in pool 'pond'. AUTO-RESPONSE: No automated response will occur. IMPACT: None at this time. REC-ACTION: Use 'fmadm faulty' to provide a more detailed view of this event. Run 'zpool status -lx' for more information. Please refer to the associated reference document at http://support.oracle.com/msg/ZFS-8000-QJ for the latest service procedures and policies regarding this diagnosis.
$ zpool status -v pool: pond state: DEGRADED status: One or more devices are unavailable in response to persistent errors. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Determine if the device needs to be replaced, and clear the errors using 'zpool clear' or 'fmadm repaired', or replace the device with 'zpool replace'. scan: scrub repaired 0 in 0h0m with 0 errors on Wed Jun 20 13:16:09 2012 config: NAME STATE READ WRITE CKSUM pond DEGRADED 0 0 0 mirror-0 ONLINE 0 0 0 c0t5000C500335F95E3d0 ONLINE 0 0 0 c0t5000C500335F907Fd0 ONLINE 0 0 0 mirror-1 DEGRADED 0 0 0 c0t5000C500335BD117d0 ONLINE 0 0 0 c0t5000C500335DC60Fd0 UNAVAIL 0 0 0 device details: c0t5000C500335DC60Fd0 UNAVAIL cannot open status: ZFS detected errors on this device. The device was missing. see: http://support.oracle.com/msg/ZFS-8000-LR for recovery
$ fmadm faulty --------------- ------------------------------------ -------------- --------- TIME EVENT-ID MSG-ID SEVERITY --------------- ------------------------------------ -------------- --------- Jun 20 13:15:41 3745f745-371c-c2d3-d940-93acbb881bd8 ZFS-8000-LR Major Problem Status : solved Diag Engine : zfs-diagnosis / 1.0 System Manufacturer : unknown Name : ORCL,SPARC-T3-4 Part_Number : unknown Serial_Number : 1120BDRCCD Host_ID : 84a02d28 ---------------------------------------- Suspect 1 of 1 : Fault class : fault.fs.zfs.open_failed Certainty : 100% Affects : zfs://pool=86124fa573cad84e/ vdev=25d36cd46e0a7f49/pool_name=pond/ vdev_name=id1,sd@n5000c500335dc60f/a Status : faulted and taken out of service FRU Name : "zfs://pool=86124fa573cad84e/ vdev=25d36cd46e0a7f49/pool_name=pond/ vdev_name=id1,sd@n5000c500335dc60f/a" Status : faulty Description : ZFS device 'id1,sd@n5000c500335dc60f/a' in pool 'pond' failed to open. Response : An attempt will be made to activate a hot spare if available. Impact : Fault tolerance of the pool may be compromised. Action : Use 'fmadm faulty' to provide a more detailed view of this event. Run 'zpool status -lx' for more information. Please refer to the associated reference document at http://support.oracle.com/msg/ZFS-8000-LR for the latest service procedures and policies regarding this diagnosis.
$ fmadm repaired zfs://pool=86124fa573cad84e/ \ vdev=25d36cd46e0a7f49/pool_name=pond/ \ vdev_name=id1,sd@n5000c500335dc60f/a fmadm: recorded repair to of zfs://pool=86124fa573cad84e/ vdev=25d36cd46e0a7f49/pool_name=pond/vdev_ name=id1,sd@n5000c500335dc60f/a
$ zpool status -x system1 pool 'system1' is healthy
$ zpool status cybermen pool: cybermen state: SUSPENDED status: One or more devices are unavailable in response to IO failures. The pool is suspended. action: Make sure the affected devices are connected, then run 'zpool clear' or 'fmadm repaired'. Run 'zpool status -v' to see device specific details. see: http://support.oracle.com/msg/ZFS-8000-HC scan: none requested config: NAME STATE READ WRITE CKSUM cybermen UNAVAIL 0 16 0 c8t3d0 UNAVAIL 0 0 0 c8t1d0 UNAVAIL 0 0 0
$ zpool clear cybermen $ fmadm repaired zfs://pool=name/vdev=guid
$ zpool status -v system1 pool: system1 state: ONLINE status: One or more devices has experienced an error resulting in data corruption. Applications may be affected. action: Restore the file in question if possible. Otherwise restore the entire pool from backup. see: http://support.oracle.com/msg/ZFS-8000-8A config: NAME STATE READ WRITE CKSUM system1 ONLINE 2 0 0 c8t0d0 ONLINE 0 0 0 c8t0d0 ONLINE 2 0 0 errors: Permanent errors have been detected in the following files: /system1/file.1
$ zpool status -v pond pool: pond state: DEGRADED status: One or more devices are unavailable in response to persistent errors. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Determine if the device needs to be replaced, and clear the errors using 'zpool clear' or 'fmadm repaired', or replace the device with 'zpool replace'. scan: scrub repaired 0 in 0h0m with 0 errors on Wed Jun 20 15:38:08 2012 config: NAME STATE READ WRITE CKSUM pond DEGRADED 0 0 0 mirror-0 DEGRADED 0 0 0 c0t5000C500335F95E3d0 ONLINE 0 0 0 c0t5000C500335F907Fd0 UNAVAIL 0 0 0 mirror-1 ONLINE 0 0 0 c0t5000C500335BD117d0 ONLINE 0 0 0 c0t5000C500335DC60Fd0 ONLINE 0 0 0 device details: c0t5000C500335F907Fd0 UNAVAIL cannot open status: ZFS detected errors on this device. The device was missing. see: http://support.oracle.com/msg/ZFS-8000-LR for recovery errors: No known data errors
mirror DEGRADED c1t0d0 ONLINE c1t1d0 UNAVAIL
raidz1 UNAVAIL c1t0d0 ONLINE c2t0d0 UNAVAIL c3t0d0 UNAVAIL c4t0d0 ONLINE
c1t0d0 ONLINE c1t1d0 ONLINE
$ zpool offline system1 c1t3d0 $ cfgadm | grep c1t3d0 sata1/3::dsk/c1t3d0 disk connected configured ok $ cfgadm -c unconfigure sata1/3 Unconfigure the device at: /devices/pci@0,0/pci1022,7458@2/pci11ab,11ab@1:3 This operation will suspend activity on the SATA device Continue (yes/no)? yes $ cfgadm | grep sata1/3 sata1/3 disk connected unconfigured ok$ cfgadm -c configure sata1/3 $ cfgadm | grep sata1/3 sata1/3::dsk/c1t3d0 disk connected configured ok $ zpool online system1 c1t3d0 $ zpool replace system1 c1t3d0 # zpool status system1 pool: system1 state: ONLINE scrub: resilver completed after 0h0m with 0 errors on Tue Feb 2 13:17:32 2010 config: NAME STATE READ WRITE CKSUM system1 ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c0t1d0 ONLINE 0 0 0 c1t1d0 ONLINE 0 0 0 mirror-1 ONLINE 0 0 0 c0t2d0 ONLINE 0 0 0 c1t2d0 ONLINE 0 0 0 mirror-2 ONLINE 0 0 0 c0t3d0 ONLINE 0 0 0 c1t3d0 ONLINE 0 0 0 errors: No known data errors
replacing DEGRADED 0 0 0 c1t3d0s0/o FAULTED 0 0 0 c1t3d0 ONLINE 0 0 0
$ zpool replace system1 c1t3d0 c4t3d0 $ zpool status pool: system1 state: DEGRADED scrub: resilver completed after 0h0m with 0 errors on Tue Feb 2 13:35:41 2010 config: NAME STATE READ WRITE CKSUM system1 DEGRADED 0 0 0 mirror-0 ONLINE 0 0 0 c0t1d0 ONLINE 0 0 0 c1t1d0 ONLINE 0 0 0 mirror-1 ONLINE 0 0 0 c0t2d0 ONLINE 0 0 0 c1t2d0 ONLINE 0 0 0 mirror-2 DEGRADED 0 0 0 c0t3d0 ONLINE 0 0 0 replacing DEGRADED 0 0 0 c1t3d0 OFFLINE 0 0 0 c4t3d0 ONLINE 0 0 0 errors: No known data errors
$ zpool status system1 pool: system1 state: ONLINE scrub: resilver completed after 0h0m with 0 errors on Tue Feb 2 13:35:41 2010 config: NAME STATE READ WRITE CKSUM system1 ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c0t1d0 ONLINE 0 0 0 c1t1d0 ONLINE 0 0 0 mirror-1 ONLINE 0 0 0 c0t2d0 ONLINE 0 0 0 c1t2d0 ONLINE 0 0 0 mirror-2 ONLINE 0 0 0 c0t3d0 ONLINE 0 0 0 c4t3d0 ONLINE 0 0 0
$ zpool status -x pool: storpool state: FAULTED status: One or more of the intent logs could not be read. Waiting for administrator intervention to fix the faulted pool. action: Either restore the affected device(s) and run 'zpool online', or ignore the intent log records by running 'zpool clear'. scrub: none requested config: NAME STATE READ WRITE CKSUM storpool FAULTED 0 0 0 bad intent log mirror-0 ONLINE 0 0 0 c0t1d0 ONLINE 0 0 0 c0t4d0 ONLINE 0 0 0 logs FAULTED 0 0 0 bad intent log c0t5d0 UNAVAIL 0 0 0 cannot open$ zpool online storpool c0t5d0 $ zpool clear storpool $ fmadm faulty $ fmadm repair zfs://pool=name/vdev=guid
scan: resilver in progress since Mon Jun 7 09:17:27 2010 13.3G scanned 13.3G resilvered at 18.5M/s, 82.34% done, 0h2m to go
$ zpool status system1 pool: system1 state: ONLINE status: One or more devices is currently being resilvered. The pool will continue to function, possibly in a degraded state. action: Wait for the resilver to complete. scan: resilver in progress since Mon Jun 7 10:49:20 2010 54.6M scanned54.5M resilvered at 5.46M/s, 24.64% done, 0h0m to go config: NAME STATE READ WRITE CKSUM system1 ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 replacing-0 ONLINE 0 0 0 c1t0d0 ONLINE 0 0 0 c2t0d0 ONLINE 0 0 0 (resilvering) c1t1d0 ONLINE 0 0 0
$ zpool status system1 pool: system1 state: ONLINE scrub: resilver completed after 0h1m with 0 errors on Tue Feb 2 13:54:30 2010 config: NAME STATE READ WRITE CKSUM system1 ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c2t0d0 ONLINE 0 0 0 377M resilvered c1t1d0 ONLINE 0 0 0 errors: No known data errors
磁盘通过其路径和设备ID(如果可用)进行标识。
在设备ID信息可用的系统上,此标识方法允许在不更新ZFS的情况下重新配置设备。
由于设备ID的生成和管理可能因系统而异,因此在移动设备(例如将磁盘从一个控制器移动到另一个控制器)之前,请先导出池。
系统事件(如固件更新或其他硬件更改)可能会更改ZFS存储池中的设备ID,从而导致设备不可用。