Tag: ZFS

  • ZFS: Adding an SSD as a cache drive

    ZFS: Adding an SSD as a cache drive

    ZFS uses any free RAM to cache accessed files, speeding up access times; this cache is called the ARC. RAM is read at gigabytes per second, so it is an extremely fast cache. It is possible to add a secondary cache – the L2ARC (level 2 ARC) in the form of solid state drives. SSDs…

  • ZFS: How to check compression efficiency

    ZFS: How to check compression efficiency

      If you have enabled compression on a ZFS folder you can check to see just how much disk space you’re saving. Use the following command:   sudo zfs get all [poolname]/[folder] | grep compressratio   An example:   sudo zfs get all backup01/data | grep compressratio   returns the following:   backup01/data compressratio  1.50x …

  • Ubuntu: How to list drives by ID

    Ubuntu: How to list drives by ID

    If you’re creating a  zpool on Ubuntu you have several options when it comes to referring to the drives; the most common is /dev/sda, /dev/sdb and so on. This can cause problems with zpools as the letter designated to a drive can change if you move the drives around, add or remove a drive –…

  • ZFS basics: Installing ZFS on Ubuntu

    ZFS basics: Installing ZFS on Ubuntu

    For those who don’t want to use Solaris or FreeBSD as their ZFS platform Ubuntu now seems a valid option; installation is now relatively straightforward. Please note, though, that you should be running a 64-bit system – ZFS on Ubuntu is not stable on a 32-bit system. Open up a terminal and enter the following:…

  • ZFS: Stopping a scrub

    ZFS: Stopping a scrub

    If you accidentally started a scrub on a pool or need to stop one for any reason it’s fortunately quite straightforward:   # zpool scrub -s [poolname]     e.g. zpool scrub -s kepler   You can check on whether that was successful with zpool status – it will give an output above the pool…

  • How to add a drive to a ZFS mirror

    How to add a drive to a ZFS mirror

    Sometimes you may wish to expand a two-way mirror to a three-way mirror, or to make a basic single drive vdev into a mirror – to do this we use the zpool attach command. Simpy run:   # zpool attach [poolname] [original drive to be mirrored] [new drive] An example:   # zpool attach seleucus…

  • ZFS Basics – zpool scrubbing

    ZFS Basics – zpool scrubbing

    One of the most significant features of the ZFS filesystem is scrubbing. This is where the filesystem checks itself for errors and attempts to heal any errors that it finds. It’s generally a good idea to scrub consumer-grade drives once a week, and enterprise-grade drives once a month.   How long the scrub takes depends…

  • ZFS folders on Ubuntu not mounting after reboot

    ZFS folders on Ubuntu not mounting after reboot

    After upgrading to 12.04 people seem to be finding that their ZFS shares aren’t mounting on boot; this has an easy fix, fortunately – edit your /etc/rc.local file and add:   stop smbd stop nmbd zfs mount -a start smbd start nmbd   Save and reboot and your shares should be intact. This has worked…

  • How do you tell which zpool version you are running?

    How do you tell which zpool version you are running?

    This is a question that crops up fairly regularly, as different operating systems support different zpool versions. Fortunately, it’s quite easy to find out which versions you are running – simply run:   # zpool upgrade   If you want a more detailed readout, including the features of the pool version you have, try:  …

  • Fixing a ZFS pool which didn’t automatically expand

    Fixing a ZFS pool which didn’t automatically expand

    We had a look at a pool today which had a raidz1 vdev consisting of 2x2TB drives and 1x1TB drive. The 1TB drive failed and was replaced with a 2TB drive; however, on resilver the pool didn’t expand. Exporting and importing didn’t work, so we tried:   # zpool online -e [poolname] [disk01] [disk02] [disk03]…