====== Using ZFS on Linux (Ubuntu 14.04 LTS) ====== ===== Zpool Import ===== Because I am using a partition (sdX3) of the disks, and ZFS assumes you are using the whole disk (when it searches /dev by default), it was necessary to symlink the partition names to a new directory and zpool import referencing devices in that new directory. # cd /etc/zfs # ln -s /dev/disk/by-id/ata-ST2000VX000-1CU164_*-part3 . # zfs import -d /etc/zfs -a ===== Disk Replacement ===== When using /dev/disk/by-id, I was unable to replace a failed disk with a new working disk when using human readable device paths (by-id). I had to grab the numeric disk guid using the zdb command, and then use that ID in the zpool replace command. Here disk S/N Z1E2EEN3 died, and was replaced with disk S/N Z1E77EXB. # zdb | grep -B1 Z1E2EEN3 guid: 12406595063271178607 path: '/etc/zfs/ata-ST2000VX000-1CU164_Z1E2EEN3-part3' # zpool replace datapool 12406595063271178607 /etc/zfs/ata-ST2000VX000-1CU164_Z1E77EXB-part3 # zpool status pool: datapool state: DEGRADED status: One or more devices is currently being resilvered. The pool will continue to function, possibly in a degraded state. action: Wait for the resilver to complete. scan: resilver in progress since Wed Jul 30 19:10:38 2014 63.6G scanned out of 915G at 112M/s, 2h10m to go 21.2G resilvered, 6.96% done config: NAME STATE READ WRITE CKSUM datapool DEGRADED 0 0 0 raidz1-0 DEGRADED 0 0 0 ata-ST2000VX000-1CU164_Z1E2D6LM-part3 ONLINE 0 0 0 ata-ST2000VX000-1CU164_W1E4RN90-part3 ONLINE 0 0 0 replacing-2 UNAVAIL 0 0 0 ata-ST2000VX000-1CU164_Z1E2EEN3-part3 UNAVAIL 0 0 0 ata-ST2000VX000-1CU164_Z1E77EXB-part3 ONLINE 0 0 0 (resilvering)