VMmanager: Administrator guide

ZFS

ZFS is a file system combined with a logical volume manager. Advantages of ZFS:

  • supports large size of files and partitions;
  • files can be stored on several devices;
  • on-the-fly checksum verification and file encryption
  • snapshots creation;
  • support for compression of stored data;
  • deduplication capability.

ZFS uses virtual data storage pools. The pool is created from virtual devices — physical disks or RAIDs.

ZFS operating features

Compared to file storage, ZFS uses disk space more efficiently. This is due to the fact that OS distributions and images are stored in a single instance on the cluster node, and a snapshot is created for user data. Thus, the more users are using the cluster node, the more disk space will be saved.

Data compression in ZFS saves disk space and can speed up data operations on drives. At the same time, data compression in ZFS increases the load on the CPU. Compression is effective if the disks contain files that can be compressed to a high level. For example, a large number of log files. For disks with high speed and plenty of free space, it is recommended to disable compression.

ZFS has the capability of deduplication. Deduplication is a data compression method that eliminates repetitive blocks of information. The file system writes data in blocks of a certain size. Deduplication allows you to determine if the block you are writing to the disk duplicates an existing block. If such a block has already been written to disk, the former is not overwritten. Instead of an entry, a link is created to an already existing identical block. In this way, deduplication saves the disk space used.

Note
Enabling deduplication greatly increases CPU and RAM load.

Read more about ZFS in the official documentation.

Configuring ZFS in VMmanager

VMmanager uses ZFS only in clusters with LXD virtualization. VM images are stored on the cluster node, while LXD containers with VMs and operating systems are stored in the ZFS pool. To prepare the server for connecting to the cluster:

  1. Before installing the OS, leave an unmarked area on the server disk.
  2. Make sure that the disk partitions are numbered correctly:

    cat /proc/partitions
    Example of response
    major minor #blocks    name
    259   0     1999634432 nvme0n1
    259   1     524288     nvme0n1p1
    259   2     4194304    nvme0n1p2
    259   3     51200000   nvme0n1p3
    259   4     1943714799 nvme0n1p4
    Comments to the example


  3. Configure the ZFS pool:

    1. Install the zfsutils-linux utility:

      sudo apt install zfsutils-linux

       

    2.   Create the ZFS pool:

      zpool create <zpool_name> <device>
      Comments to the command


Related topics