Previously, when mounting Primary Storage on a KVM hypervisor host, CloudStack used default NFS mount options that could not be customized. Administrators were unable to modify or add options such as specifying the NFS version or adjusting the nconnect value, which defines the number of TCP connections between the hypervisor and the NFS server.
This limitation often led to performance bottlenecks, particularly in environments where multiple volumes were mounted from the same storage server. All volumes shared a single TCP connection by default, which restricted network throughput.
To address this, Apache CloudStack 4.19.1 introduced a new feature allowing administrators to specify NFS mount options when configuring Primary Storage on KVM hypervisors, offering greater flexibility and improved performance.
Feature Overview
The new NFS Mount Options feature allows Administrators to customize how Primary Storage is mounted on KVM hypervisors by specifying NFS-specific options, such as the nconnect parameter and NFS version. This feature can be configured both during the initial setup of Primary Storage or modified for existing storage after placing it in Maintenance Mode. The feature simplifies fine-tuning storage performance based on specific network and workload requirements.
Administrators can specify these mount options during the Create Zone Wizard or when adding Primary Storage manually through the Add Primary Storage form, as shown in the image below.
Once the Primary Storage has been set up, the configured NFS mount options, including settings like nconnect and NFS version, can be viewed in the Primary Storage’s Details tab. As shown in the image below, the mount options, including vers=4.2 and nconnect=8, are displayed under the Details section of the storage.
To modify these options for an existing Primary Storage setup, administrators must put the storage in Maintenance Mode. The system will unmount and remount the storage with the new options after exiting Maintenance Mode.
To confirm these mount options on the KVM host, administrators can use the nfsstat -m command, which will display detailed information about the mounted storage. For example, the image below shows that the nconnect value is set to 8 and the NFS version is 4.2.
If an incorrect option is specified and the mount fails as a result, CloudStack will display an error message to the Administrator.
Understanding the nconnect Option
The nconnect option defines how many TCP connections a client establishes with the NFS server. This setting is critical for optimizing network traffic between the KVM host and the NFS server, especially in environments where multiple volumes are mounted from the same storage server.
Key points about nconnect in CloudStack:
Applied during Initial Mount: The nconnect value is set during the initial mount to the NFS server for a given NFS version. All subsequent mounts to the same server and version inherit this value.
Shared Connection Count: All volumes from the same NFS server share the same number of TCP connections as defined by nconnect. Changing the nconnect value requires unmounting and remounting all storage pools from that NFS server.
Impact on Multiple Storage Pools: If there are multiple storage pools from the same NFS server, changing the nconnect value for one storage pool will not affect the others. In such cases, to update the nconnect value for all pools, administrators must modify the setting for each storage pool individually and then restart the Host for the changes to take effect.
Conclusion
The NFS Mount Options on Primary Storage introduced in Apache CloudStack 4.19.1, enables Administrators to configure NFS mount options, including nconnect, providing greater control over Primary Storage configurations, improving network performance and flexibility. By enabling Administrators to specify these options during storage setup or modification, CloudStack makes it easier to fine-tune storage performance in environments with high traffic or multiple volumes mounted from the same NFS server. With the ability to easily modify and verify these settings, administrators can optimize their network connections and ensure better performance for their cloud storage infrastructure.
Abhisar is a Software Developer at ShapeBlue and has over 12 experience in the industry. In his personal time, Abhisar likes spending time with his wife and 2-year-old daughter. He also likes listening to and playing music. You can learn more about Abhisar by reading his Meet the Team blog.