NAS
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.
- On the storage server:
Create a directory for mounting. For example, /mnt/nfsshare/:
mkdir -p /mnt/nfsshare
BASHGrant permissions to access the directory:
chown nobody:nobody /mnt/nfsshare
BASHchmod 777 /mnt/nfsshare
BASHInstall the NFS server software:
dnf update -y
BASHdnf -y install nfs-utils
BASHRun the service and add it to the autostart:
systemctl start nfs-server.service
BASHsystemctl enable nfs-server.service
BASHAdd 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
BASHComments to the command<NODE_IP> — IP address of the cluster node
Allow connections to NFS in the firewall settings:
firewall-cmd --permanent --add-port=2049/tcp
BASHfirewall-cmd --reload
BASH
On the cluster nodes:
Install the NFS client software:
dnf -y install nfs-utils nfs4-acl-tools
BASHRun the service and add it to the autostart:
systemctl start nfs-client.target
BASHsystemctl enable nfs-client.target
BASHCreate a directory to which the storage will be mounted. For example, /mnt/nas/:
mkdir -p /mnt/nas
BASHMount the storage:
If high availability is disabled in the cluster
mount.nfs4 <NAS_IP>:/mnt/nfsshare /mnt/nas
BASHIf 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
BASHComments to the commands<NAS_IP> — IP address of the storage
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
CODEComments<NAS_IP> — IP address of the storage