Setup a ZFS storage pool

For the example creating the pool is fine using device names like /dev/sdb. However in real life DO NOT CREATE your pool this way since device allocation is NOT STABLE between reboots especially not when new devices are added. You can run into a lot of trouble only due to rearranged disks!

Best way to add disks is to follow this tutorial, but then instead of using /dev/sdb /dev/sdc find their corresponding disk-id’s in /dev/disk/by-id, note the id’s for both disks (not the partitions!) and use those to add the disks to the pool. These ID’s are stable throughout and disk specific in whatever order they may appear in the future. Example below (change the example id’s to YOUR id’s!);

sudo zpool creat new-pool /dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F59GRA /dev/disk/by-id/ata-ST3000DM001-1CH166_Z3F66GGB

1 Like