How check zfs integrity in a zfs filesystem

How check zfs integrity in a zfs filesystem


You can check with a zpool status command what is the state of zpool and if you have errors related with write / read / chksum

# zpool status -v | more
  pool: ialab01
 state: ONLINE
 scan: none requested
config:
        NAME                                                                   STATE     READ WRITE CKSUM
        lab01                                                                        ONLINE       0          0           0
          c5t60060160055122004A512D00000CE311d0   ONLINE       0          0           0

However if you see any error related with Read, Write and Cksum, you will need to check the device associated to the zpool.


Important: Only one active scrubbing operation per pool can occur at one time.

# zpool status -v | more
  pool: ialab01
 state: Degraded
 scan: none requested
config:
        NAME                                                                STATE     READ WRITE CKSUM
        lab01                                                                        ONLINE       0          0           5
          c5t60060160055122004A512D00000CE311d0   ONLINE       0          0           5

If you see any error related with the output of the command above, you can run a scrub over the zpool in order to try to repair it


#zpool scrub lab01

The scrub command is an operation that transverse all the data in the pool and verifies that all block can be read, this operation impact in the performance

However if you need to stop the scrub due to any customer is reporting issues related with I/O, you can stop it with the following command and the option "-s"

#zpool scrub -s lab01

Finally, if you permit to run the scrub, if the errors can be repaired, you should see the device that is part of this zpool without errors with the command "zpool status"


 #zpool status -v lab01
pool: lab01
 state: ONLINE
 scrub: scrub completed after 0h10m with 0 errors on Tue Tue Feb  2 11:40:00 2015
 config:
        NAME                                                                   STATE     READ WRITE CKSUM
        lab01                                                                        ONLINE       0          0           0
          c5t60060160055122004A512D00000CE311d0   ONLINE       0          0           0

If you need more information, you can check it in docs.oracle.com

http://docs.oracle.com/cd/E23823_01/html/819-5461/gbbwa.html




Regards
Roger

Comments