CentOS 8.x Cloudstack 4.15 Setup NFS server
Home > CentOS > CentOS 8.x > Virtualization > Cloudstack 4.15 > Setup NFS server
Cloudstack needs a NFS server for secondary storage. This needs to be mounted on management server at some location (eg /mnt/secondary). This storage is used for storing VM images (templates) or iso files.
Cloudstack also needs primary storage that is writable by all cloudstack hosts. This could be a shared central storage with distributed filesystem mounted on all hosts in same location (eg /mnt/primary). We can also use NFS for primary storage. Once any VM is deployed using templates or iso, the disks for the VM are stored in primary storage.
To setup NFS server for secondary storage use:
- Set desired hostname
- hostnamectl set-hostname <desired-hostname>
- Create folder to be shared via NFS
- mkdir /mnt/secondary
- Install nfs-utils
- yum install -y nfs-utils
- Disable firewall
- systemctl disable firewalld
- systemctl stop firewalld
- Edit '/etc/exports' to export /mnt/secondary via NFS
- /mnt/secondary *(rw,async,no_root_squash,no_subtree_check)
- If there is any secondary disk of larger capacity planned for secondary storage mount it at /mnt/secondary (parted, mkfs.ext4, /etc/fstab, mount -a, df -h, etc.)
- Start required services:
- systemctl start rpcbind
- systemctl enable rpcbind
- systemctl start nfs-server
- systemctl enable nfs-server
- Export the filesystems defined in /etc/exports file
- exportfs -a
Mounting NFS on management server
On management server you can do the following:
- mkdir /mnt/secondary
- Edit /etc/fstab as follows:
- <nfs-server-ip-or-fqdn>:/mnt/secondary /mnt/secondary nfs defaults 0 0
- Mount the filesystem and validate
- mount -a
- df -h
There is older article on this at CentOS 7.x Cloudstack 4.11 Setup NFS for secondary and primary (if no central storage) storage
Home > CentOS > CentOS 8.x > Virtualization > Cloudstack 4.15 > Setup NFS server