NAS support is only available in the VMmanager Infrastructure version.

NAS (Network Attached Storage) is a network storage that provides file-level access to data. NAS can be used to store VM images and linked clones.

NAS restrictions


Migration of VMs with disks in a NAS is only available to another NAS or file storage.

How NAS works


To connect a NAS to a cluster node, a cluster file system must be configured on the NAS device. A cluster file system is a system that can be used simultaneously by multiple servers. Such systems include NFS, OCFS2, GlusterFS, CephFS, GFS2, and others.

VMmanager cluster nodes access the NAS through a mounted directory that is specified when the storage is connected.

Configuring the file system


The configuration of NFS on servers with AlmaLinux OS is considered as an example. You can also use a file system based on OCFS2, GlusterFS, CephFS, or GFS2.

  1. On the storage server:
    1. Create a directory for mounting. For example, /mnt/nfsshare/

      mkdir -p /mnt/nfsshare
      BASH
    2. Grant permissions to access the directory:

      chown nobody:nobody /mnt/nfsshare
      BASH
      chmod 777 /mnt/nfsshare
      BASH
    3. Install the NFS server software: 

      dnf update -y
      BASH
      dnf -y install nfs-utils
      BASH
    4. Run the service and add it to the autostart: 

      systemctl start nfs-server.service
      BASH
      systemctl enable nfs-server.service
      BASH
    5. Add the IP addresses of the cluster nodes to the /etc/exports configuration file. To do this, run the command for each cluster node:

      echo '/mnt/nfsshare <NODE_IP>(rw,async,no_subtree_check,no_root_squash)' >> /etc/exports && exportfs -vra
      BASH

      <NODE_IP> — IP address of the cluster node

    6. Allow connections to NFS in the firewall settings: 

      firewall-cmd --permanent --add-port=2049/tcp
      BASH
      firewall-cmd --reload
      BASH
  2. On the cluster nodes: 

    1. Install the NFS client software: 

      dnf -y install nfs-utils nfs4-acl-tools
      BASH
    2. Run the service and add it to the autostart: 

      systemctl start nfs-client.target
      BASH
      systemctl enable nfs-client.target
      BASH
    3. Create a directory to which the storage will be mounted. For example, /mnt/nas/:

      mkdir -p /mnt/nas
      BASH
    4. Mount the storage: 

      If high availability is disabled in the cluster

      mount.nfs4 <NAS_IP>:/mnt/nfsshare /mnt/nas
      BASH

      If high availability is enabled in the cluster

      mount.nfs4 -o user,noauto,soft,timeo=5,retry=1 <NAS_IP>:/mnt/nfsshare /mnt/nas && chmod -R 777 /mnt/nas
      BASH

      <NAS_IP> — IP address of the storage

    5. Add the mounted partition to the autostart. To do this, add a line to the /etc/fstab file:

      <NAS_IP>:/mnt/nfsshare        /mnt/nas       nfs defaults    0 0
      CODE

      <NAS_IP> — IP address of the storage

Useful tips

Related topics: