ZFS (FreeBSD)

zfs — configures ZFS file systems

leo@iscsitarget:~$ sudo zfs list
NAME                 USED  AVAIL     REFER  MOUNTPOINT
tank                 130K  38.3G       24K  /tank
tank/vm-100-disk-0    12K  38.3G       12K  -
leo@iscsitarget:~$ sudo zfs get readonly tank/vm-100-disk-0 
NAME                PROPERTY  VALUE   SOURCE
tank/vm-100-disk-0  readonly  off     default
zfs get all tank/vm-100-disk-0

zpool – configures ZFS storage pools

root@server:/mnt/vol0 # zpool list
NAME           SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
freenas-boot  18.6G  2.98G  15.6G         -      -    15%  1.00x  ONLINE  -
vol0            49T  33.4T  15.6T         -    20%    68%  1.00x  ONLINE  /mnt
root@server:/mnt/vol0 # zpool status vol0
  pool: vol0
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(7) for details.
  scan: scrub repaired 0 in 1 days 04:42:35 with 0 errors on Mon Oct  7 08:42:37 2019
config:

        NAME                                            STATE     READ WRITE CKSUM
        vol0                                            ONLINE       0     0     0
          raidz2-0                                      ONLINE       0     0     0
            gptid/57e0bcd1-040f-11e7-9b86-002590e0db06  ONLINE       0     0     0
            gptid/5adbb3dc-040f-11e7-9b86-002590e0db06  ONLINE       0     0     0
            gptid/5dbd43eb-040f-11e7-9b86-002590e0db06  ONLINE       0     0     0
            gptid/60869398-040f-11e7-9b86-002590e0db06  ONLINE       0     0     0
            gptid/62481aec-040f-11e7-9b86-002590e0db06  ONLINE       0     0     0
            gptid/63abafa9-040f-11e7-9b86-002590e0db06  ONLINE       0     0     0
            gptid/650d0a87-040f-11e7-9b86-002590e0db06  ONLINE       0     0     0
            gptid/65e21e6f-040f-11e7-9b86-002590e0db06  ONLINE       0     0     0
            gptid/66aa073a-040f-11e7-9b86-002590e0db06  ONLINE       0     0     0
            gptid/86bdab8a-1bc2-11e8-9b42-002590e0db06  ONLINE       0     0     0
            gptid/68523974-040f-11e7-9b86-002590e0db06  ONLINE       0     0     0
            gptid/fc3b6e7e-5da2-11e8-9b42-002590e0db06  ONLINE       0     0     0
            gptid/69e0cb0c-040f-11e7-9b86-002590e0db06  ONLINE       0     0     0
            gptid/6ab001f3-040f-11e7-9b86-002590e0db06  ONLINE       0     0     0
            gptid/6b7708c9-040f-11e7-9b86-002590e0db06  ONLINE       0     0     0
            gptid/6c3f0338-040f-11e7-9b86-002590e0db06  ONLINE       0     0     0
            gptid/8d9825c9-1100-11e8-9b42-002590e0db06  ONLINE       0     0     0
            gptid/8ed17c5b-1621-11e8-9b42-002590e0db06  ONLINE       0     0     0

errors: No known data errors
root@server:~ # zpool iostat storage 1
               capacity     operations    bandwidth
pool        alloc   free   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
storage      107G  43.4T      0  1.17K  3.94K  76.5M
storage      107G  43.4T      0  2.69K      0   183M
storage      108G  43.4T      0  2.76K      0   187M
storage      108G  43.4T      0  2.80K      0   190M
storage      108G  43.4T      0  3.22K      0   240M
storage      108G  43.4T      0  3.25K      0   201M
storage      109G  43.4T      0  2.70K      0   183M
storage      109G  43.4T      0  2.86K      0   194M
storage      109G  43.4T     33  2.86K   136K   194M
storage      109G  43.4T      0  2.70K      0   183M

zdb – display zpool debugging and consistency information

zdb -U /data/zfs/zpool.cache -d mypool

ZIL/SLOG

Cache for synchronous writes
ZIL: ZFS Intent Log (stored on the pool)
SLOG: Separate ZFS Intent Log (addtional device)

root@server:~ # zilstat
   N-Bytes  N-Bytes/s N-Max-Rate    B-Bytes  B-Bytes/s B-Max-Rate    ops  <=4kB 4-32kB >=32kB
         0          0          0          0          0          0      0      0      0      0
         0          0          0          0          0          0      0      0      0      0
         0          0          0          0          0          0      0      0      0      0
         0          0          0          0          0          0      0      0      0      0
         0          0          0          0          0          0      0      0      0      0

ARC/L2ARC

Read cache
ARC: adaptive replacement cache (stored in RAM)
L2ARC: Level 2 adaptive replacement cache (addtional device)

arc_summary.py
arcstat.py