Usage ZFS includes already all programs to manage the hardware and the file systems, there are no additional tools needed. Preparation ZFS supports the use of either block devices or files. Administration is the same in both cases, but for production use, the ZFS developers recommend the use of block devices (preferably whole disks). To take full advantage of block devices on Advanced Format disks, it is highly recommended to read the ZFS on Linux FAQ before creating your pool. To go through the different commands and scenarios we can use files in place of block devices. The following commands create 2GB sparse image files in /var/lib/zfs_img/ that we use as our hard drives. This uses at most 8GB disk space, but in practice will use very little because only written areas are allocated: root # mkdir /var/lib/zfs_img root # truncate -s 2G /var/lib/zfs_img/zfs0.img root # truncate -s 2G /var/lib/zfs_img/zfs1.img root # truncate -s 2G /var/lib/zfs_img/zfs2.img ...
Comments