Skip to content

Instantly share code, notes, and snippets.

@yarbelk
Created January 11, 2016 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yarbelk/75b38faa55e01317b322 to your computer and use it in GitHub Desktop.
Save yarbelk/75b38faa55e01317b322 to your computer and use it in GitHub Desktop.
zsh hybrid pools

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.

# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment