Solaris 10 and zfs has can provide a considerable amount of control over disk management. On occasion when a disk fails in zfs it will be marked as “REMOVED”, “FAULTED”, “UNAVAILABLE”, or some other unfavorable status. Once this happens to a disk the pool will likely be marked as a “DEGRADED” status. In order to remedy this one will need to rectify the failed disk. It is also a good idea to follow up with a “zpool scrub”.
root@computer:/pool/share# zpool status pool: pool state: DEGRADED status: One or more devices could not be used because the label is missing or invalid. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Replace the device using 'zpool replace'. see: http://www.sun.com/msg/ZFS-8000-4J scan: resilvered 110K in 0h0m with 0 errors on Thu Jul 28 17:51:09 2011 config: NAME STATE READ WRITE CKSUM pool DEGRADED 0 0 0 raidz3-0 DEGRADED 0 0 0 /disk/disk1 ONLINE 0 0 0 /disk/disk2 ONLINE 0 0 0 /disk/disk3 ONLINE 0 0 0 spare-3 DEGRADED 0 0 0 /disk/disk4 UNAVAIL 4 1 0 corrupted data /disk/disk6 ONLINE 0 0 0 /disk/disk5 ONLINE 0 0 0 spares /disk/disk6 INUSE currently in use errors: No known data errors
In the situation above a disk had an issue, and the hotspare took over. Since there was a hotspare assigned to the pool.
Now we can remove the bad disk using:
root@computer:/pool/share# zpool offline pool /disk/disk4 root@computer:/pool/share# zpool detach pool /disk/disk4 root@computer:/pool/share# zpool status pool: pool state: ONLINE scan: scrub repaired 0 in 0h0m with 0 errors on Thu Jul 28 18:10:11 2011 config: NAME STATE READ WRITE CKSUM pool ONLINE 0 0 0 raidz3-0 ONLINE 0 0 0 /disk/disk1 ONLINE 0 0 0 /disk/disk2 ONLINE 0 0 0 /disk/disk3 ONLINE 0 0 0 /disk/disk6 ONLINE 0 0 0 /disk/disk5 ONLINE 0 0 0 errors: No known data errors pool: rpool state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 c2d0s0 ONLINE 0 0 0 errors: No known data errors
Now disk4 can be replaced with a new or disk. Add the new disk as a hotspare to the pool for better resilience.
root@computer:/pool/share# zpool add pool spare /disk/disk4
Leave a Reply
You must be logged in to post a comment.