ZFS




ZFS Zettabyte File System

Advantages:
Zpool Capacity of 256 zettabytes (1ZB = 1000^7 bytes = 10^21 bytes)
Encryption
Data Integrity
Integrated Volume Management
Software RAID:
Striped (RAID0)
Mirrored (RAID1)
Striped Mirrored (RAID10)
RAIDZ (RAID5-Single parity)
RAIDZ2 (RAID6-Double parity)
RAIDZ3 (Triple Parity)
Snapshots and Clones

Disadvantage:
No way to reduce the zpool capacity

ZFS has only two commands: zpool and zfs.
The zpool command creates, modifies, and destroys ZFS pools.
The zfs command creates, modifies, and destroys ZFS file systems.

# zpool help
The following commands are supported:
add      attach   clear    create   destroy  detach   export   get      
help     history  import   iostat   list     offline  online   remove   
replace  scrub    set      split    status   upgrade  

# zfs help
The following commands are supported:
allow       clone       create      destroy     diff        get         
groupspace  help        hold        holds       inherit     list        
mount       promote     receive     release     rename      rollback    
send        set         share       snapshot    unallow     unmount     
unshare     upgrade     userspace   

 

zpool Command Examples

Check Existing pools, status, and iostat:

root@Ferdy-Sol11:~# zpool list
NAME    SIZE  ALLOC   FREE  CAP  DEDUP  HEALTH  ALTROOT
rpool  19.6G  8.09G  11.5G  41%  1.00x  ONLINE  -

root@Ferdy-Sol11:~# zpool status
  pool: rpool
 state: ONLINE
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          c1t1d0s1  ONLINE       0     0     0

errors: No known data errors

root@Ferdy-Sol11:~# zpool iostat -lv
               capacity     operations    bandwidth
pool        alloc   free   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
rpool       8.14G  11.5G      1      0   116K  4.00K
  c1t1d0s1  8.14G  11.5G      1      0   116K  4.00K
----------  -----  -----  -----  -----  -----  -----

Check for Error:
# zpool scrub Pool_Name

zpool scrub rpool

Create a RAIDZ pool named raidzpool
First, list the available disks by using the formant command

root@Ferdy-Sol11:~# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c1t1d0 
          /pci@0,0/pci8086,2829@1f,2/disk@1,0
       1. c1t2d0 
          /pci@0,0/pci8086,2829@1f,2/disk@2,0
       2. c1t3d0 
          /pci@0,0/pci8086,2829@1f,2/disk@3,0
       3. c1t4d0 
          /pci@0,0/pci8086,2829@1f,2/disk@4,0
Specify disk (enter its number): ^Z

root@Ferdy-Sol11:~# zpool create datapool raidz1 c1t2d0 c1t3d0 c1t4d0
root@Ferdy-Sol11:~# zpool status datapool
  pool: datapool
 state: ONLINE
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        datapool    ONLINE       0     0     0
          raidz1-0  ONLINE       0     0     0
            c1t2d0  ONLINE       0     0     0
            c1t3d0  ONLINE       0     0     0
            c1t4d0  ONLINE       0     0     0

 

zfs Command Examples

List all ZFS file system

# zfs list

Create ZFS dataset

root@Ferdy-Sol11:~# zfs create datapool/vol1
root@Ferdy-Sol11:~# zfs list | grep datapool
datapool                          165K  39.0G  36.0K  /datapool
datapool/vol1                    34.6K  39.0G  34.6K  /datapool/vol1

Mount and Unmount all ZFS file systems:

# zfs mount -a
# zfs umount -a

Create a snapshot named 5May2016 of the vol1 dataset

# zfs snapshot datapool/vol1@5May2016



Published by

Ferdy Mañago

Portland, Oregon