zfs - Manage zfs

Author:Johan Wiren

Synopsis

New in version 1.1.

Manages ZFS file systems on Solaris and FreeBSD. Can manage file systems, volumes and snapshots. See zfs(1M) for more information about the properties.

Options

parameter required default choices comments
aclinherit no
  • discard
  • noallow
  • restricted
  • passthrough
  • passthrough-x
The aclinherit property.
aclmode no
  • discard
  • groupmask
  • passthrough
The aclmode property.
atime no
  • on
  • off
The atime property.
canmount no
  • on
  • off
  • noauto
The canmount property.
casesensitivity no
  • sensitive
  • insensitive
  • mixed
The casesensitivity property.
checksum no
  • on
  • off
  • fletcher2
  • fletcher4
  • sha256
The checksum property.
compression no
  • on
  • off
  • lzjb
  • gzip
  • gzip-1
  • gzip-2
  • gzip-3
  • gzip-4
  • gzip-5
  • gzip-6
  • gzip-7
  • gzip-8
  • gzip-9
  • lz4
  • zle
The compression property.
copies no
  • 1
  • 2
  • 3
The copies property.
dedup no
  • on
  • off
The dedup property.
devices no
  • on
  • off
The devices property.
exec no
  • on
  • off
The exec property.
jailed no
  • on
  • off
The jailed property.
logbias no
  • latency
  • throughput
The logbias property.
mountpoint no
    The mountpoint property.
    name yes
      File system, snapshot or volume name e.g. rpool/myfs
      nbmand no
      • on
      • off
      The nbmand property.
      normalization no
      • none
      • formC
      • formD
      • formKC
      • formKD
      The normalization property.
      primarycache no
      • all
      • none
      • metadata
      The primarycache property.
      quota no
        The quota property.
        readonly no
        • on
        • off
        The readonly property.
        recordsize no
          The recordsize property.
          refquota no
            The refquota property.
            refreservation no
              The refreservation property.
              reservation no
                The reservation property.
                secondarycache no
                • all
                • none
                • metadata
                The secondarycache property.
                setuid no
                • on
                • off
                The setuid property.
                shareiscsi no
                • on
                • off
                The shareiscsi property.
                sharenfs no
                  The sharenfs property.
                  sharesmb no
                    The sharesmb property.
                    snapdir no
                    • hidden
                    • visible
                    The snapdir property.
                    state yes
                    • present
                    • absent
                    Whether to create (present), or remove (absent) a file system, snapshot or volume.
                    sync no
                    • on
                    • off
                    The sync property.
                    utf8only no
                    • on
                    • off
                    The utf8only property.
                    volblocksize no
                      The volblocksize property.
                      volsize no
                        The volsize property.
                        vscan no
                        • on
                        • off
                        The vscan property.
                        xattr no
                        • on
                        • off
                        The xattr property.
                        zoned no
                        • on
                        • off
                        The zoned property.

                        Examples


                        # Create a new file system called myfs in pool rpool
                        - zfs: name=rpool/myfs state=present
                        
                        # Create a new volume called myvol in pool rpool.
                        - zfs: name=rpool/myvol state=present volsize=10M
                        
                        # Create a snapshot of rpool/myfs file system.
                        - zfs: name=rpool/myfs@mysnapshot state=present
                        
                        # Create a new file system called myfs2 with snapdir enabled
                        - zfs: name=rpool/myfs2 state=present snapdir=enabled
                        

                        Table Of Contents

                        Previous topic

                        user - Manage user accounts

                        Next topic

                        Utilities Modules