Skip to content

Instantly share code, notes, and snippets.

@yarbelk
Created January 11, 2016 09:47
Show Gist options
  • Select an option

  • Save yarbelk/75b38faa55e01317b322 to your computer and use it in GitHub Desktop.

Select an option

Save yarbelk/75b38faa55e01317b322 to your computer and use it in GitHub Desktop.

Revisions

  1. yarbelk created this gist Jan 11, 2016.
    51 changes: 51 additions & 0 deletions zfs_pools.rst
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,51 @@
    ZFS Cool stuff
    --------------

    taken from https://pthree.org/2012/12/04/zfs-administration-part-i-vdevs/

    Types
    -----
    There are seven types of VDEVs in ZFS:

    :disk:
    (default)- The physical hard drives in your system.
    :file:
    The absolute path of pre-allocated files/images.
    :mirror:
    Standard software RAID-1 mirror.
    :raidz1/2/3:
    Non-standard distributed parity-based software RAID levels.
    :spare:
    Hard drives marked as a "hot spare" for ZFS software RAID.
    :cache:
    Device used for a level 2 adaptive read cache (L2ARC).
    :log:
    A separate log (SLOG) called the "ZFS Intent Log" or ZIL.


    .. code::
    # zpool create tank mirror /tmp/file1 /tmp/file2 mirror /tmp/file3 /tmp/file4 log mirror sde sdf cache sdg sdh
    # zpool status tank
    pool: tank
    state: ONLINE
    scan: none requested
    config:
    NAME STATE READ WRITE CKSUM
    tank ONLINE 0 0 0
    mirror-0 ONLINE 0 0 0
    /tmp/file1 ONLINE 0 0 0
    /tmp/file2 ONLINE 0 0 0
    mirror-1 ONLINE 0 0 0
    /tmp/file3 ONLINE 0 0 0
    /tmp/file4 ONLINE 0 0 0
    logs
    mirror-2 ONLINE 0 0 0
    sde ONLINE 0 0 0
    sdf ONLINE 0 0 0
    cache
    sdg ONLINE 0 0 0
    sdh ONLINE 0 0 0
    errors: No known data errors