meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
zfs [2015/03/24 09:48] niziaklinux:fs:zfs [2021/03/02 12:59] niziak
Line 1: Line 1:
 ====== ZFS ====== ====== ZFS ======
  
-===== Creating ZFS dataset =====+[[https://lists.debian.org/debian-user/2012/05/msg01026.html]] 
 + 
 +Features: 
 +  * data pools (tanks) are abstraction aggregate block devices (simple, mirror, raidz, spares, etc) 
 +  * data set is created on data pool or another (parent) data set. 
 +  * whole data pool space is shared between dataset (no fixed partition size problem). Size of data set (and its descendants) can be limited using quota 
 +  * compression 
 +  * block level deduplication (not usable for emails with attachment, where attachment are shifted to different offset) 
 + 
 +OpenZFS2.0.0 (Dec 20) [[https://github.com/openzfs/zfs/releases/tag/zfs-2.0.0]]: 
 +  * Sequential resilver (rebuild only used by data portions) 
 +  * Persistent L2ARC cache (survives between reboots) 
 +  * ZSTD 
 +  * Redacted replication (replicate with some data excluded) 
 +  * FreeBSD and Linux unification 
 + 
 +Proposed use case: 
 +POOL created on encrypted LUKS block device.
  
 <code> <code>
 + POOL
 +   |-- /filer (quota)
 +       |- foto 
 +       |- mp3 (dedup)
 +       |- movies
 +       +- backup (copies=2, compression)
 +   |
 +   |-- /home (compression, dedup, quota)
 +   +-- /var (quota)
 +         +- log (compression)
 +</code>
 +
 +===== ZFS implementations =====
 +
 +ZFS-Fuse 0.7 is using old pool version 23, where [[http://zfsonlinux.org|ZFSonLinux]] is using pool version 28.
 +[[http://exitcode.de/?p=106|zfs-fuse vs. zfsonlinux]]
 +
 +
 +
 +===== Creating ZFS dataset =====
 +
 +<code bash>
 zpool create INBOX /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 zpool create INBOX /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3
 </code> </code>
  
-<code>+<code bash>
 # zpool list # zpool list
 NAME    SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT NAME    SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
Line 13: Line 52:
 </code> </code>
  
-<code>+<code bash>
 # zpool status # zpool status
   pool: INBOX   pool: INBOX
Line 32: Line 71:
 Dataset "INBOX" is also automatically created based on zpool name "INBOX". It is mounted as /INBOX Dataset "INBOX" is also automatically created based on zpool name "INBOX". It is mounted as /INBOX
  
-<code>+<code bash>
 # zfs list # zfs list
 NAME    USED  AVAIL  REFER  MOUNTPOINT NAME    USED  AVAIL  REFER  MOUNTPOINT
Line 156: Line 195:
 |-- |--
 |squashfs    |               | 365 MB             | |squashfs    |               | 365 MB             |
- 
  
  
Line 163: Line 201:
  
  
-====== References: ======+ 
 +<code bash> 
 +zfs get compressratio 
 +</code> 
 + 
 +===== References: ===== 
 +[[http://docs.oracle.com/cd/E19253-01/819-5461/6n7ht6qu6/index.html]] 
 +[[https://wiki.freebsd.org/ZFSQuickStartGuide]]
  
 [[http://www.funtoo.org/ZFS_Fun|http://www.funtoo.org/ZFS_Fun]] [[http://www.funtoo.org/ZFS_Fun|http://www.funtoo.org/ZFS_Fun]]