Difference between revisions of "ZFS"

From FnordWiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
* Data deduplication
 
* Data deduplication
   
Released versions of [http://www.zfsonlinux.org ZFSonLinux] do not work on the kernels I'm running (3.12.x from backports.org), so I'm playing with [https://packages.debian.org/search?keywords=zfs-fuse zfs-fuse] instead.
+
Released versions of [http://www.zfsonlinux.org ZFSonLinux] do not work on the kernels I'm running (3.12.x from backports.org), so I'm playing with [https://packages.debian.org/search?keywords=zfs-fuse zfs-fuse] instead. ''[This is out of date. The ZFSonLinux packages have been working for a few months as this update is written.]''
   
So, here's the first annoying thing I've come across. The ZFS tools go off and automatically mount filesystems in your just-created pool. '''And''' they go and make directories to mount those filesystems on. Quite annoying. What's wrong with putting entries in <code>/etc/fstab</code> and typing '''<code>mkdir /foo</code>'''? Instead '''<code>zfs pool create solarissucksballs ...</code>''' will create a <code>/solarissucksballs</code> directory on your machine and mount the new pool's filesystem there. I'm sure this behavior comes from Solaris, but I find it quite obnoxious.
+
So, here's the first annoying thing I've come across. The ZFS tools go off and automatically mount filesystems in your just-created pool. '''And''' they go and make directories to mount those filesystems on. Quite annoying. What's wrong with putting entries in <code>/etc/fstab</code> and typing '''<code>mkdir /foo</code>'''? Instead '''<code>zfs pool create solarissucksballs ...</code>''' will create a <code>/solarissucksballs</code> directory on your machine and mount the new pool's filesystem there. ZFS on Solaris works this way, too. It's quite obnoxious.
  +
  +
== Getting ZFSonLinux on Debian wheezy with backport kernels ==
  +
Follow the directions at http://zfsonlinux.org/debian.html and bam, you're done.
   
 
== Some useful tidbits ==
 
== Some useful tidbits ==
Line 11: Line 14:
 
* <code>zfs set dedup=sha256,verify ''poolname''</code> # enable dedupe, use SHA256 hashes as keys, but also do a bit-by-bit comparison before deciding two blocks are the same
 
* <code>zfs set dedup=sha256,verify ''poolname''</code> # enable dedupe, use SHA256 hashes as keys, but also do a bit-by-bit comparison before deciding two blocks are the same
 
* <code>zfs set canmount=noauto ''poolname_OR_fsname''</code> # gets rid of the obnoxious /etc/fstab-less mounting behaviour at ZFS start time.
 
* <code>zfs set canmount=noauto ''poolname_OR_fsname''</code> # gets rid of the obnoxious /etc/fstab-less mounting behaviour at ZFS start time.
  +
* <code>zfs set mountpoint=legacy ''poolname_OR_fsname''</code> # indicates that mounting based /etc/fstab entries is preferred for this one

Latest revision as of 22:39, 6 February 2016

So ZFS is all shiny and stuff. We'll be using it for disk based storage of backups for the following reasons:

  • All data (and metadata) can be validated with cryptographically strong hashes
  • Data deduplication

Released versions of ZFSonLinux do not work on the kernels I'm running (3.12.x from backports.org), so I'm playing with zfs-fuse instead. [This is out of date. The ZFSonLinux packages have been working for a few months as this update is written.]

So, here's the first annoying thing I've come across. The ZFS tools go off and automatically mount filesystems in your just-created pool. And they go and make directories to mount those filesystems on. Quite annoying. What's wrong with putting entries in /etc/fstab and typing mkdir /foo? Instead zfs pool create solarissucksballs ... will create a /solarissucksballs directory on your machine and mount the new pool's filesystem there. ZFS on Solaris works this way, too. It's quite obnoxious.

Getting ZFSonLinux on Debian wheezy with backport kernels

Follow the directions at http://zfsonlinux.org/debian.html and bam, you're done.

Some useful tidbits

  • zfs set checksum=sha256 poolname # changes a filesystem's data integrity check algorithm from the default Fletcher4 to SHA256.
  • zfs set dedup=sha256,verify poolname # enable dedupe, use SHA256 hashes as keys, but also do a bit-by-bit comparison before deciding two blocks are the same
  • zfs set canmount=noauto poolname_OR_fsname # gets rid of the obnoxious /etc/fstab-less mounting behaviour at ZFS start time.
  • zfs set mountpoint=legacy poolname_OR_fsname # indicates that mounting based /etc/fstab entries is preferred for this one