IBM Cloud Docs
Mounting File Storage for Classic in CentOS

Mounting File Storage for Classic in CentOS

To mount IBM Cloud® File Storage for Classic in CentOS 7, you must authorize the host first. Then, install the NFS utilities as described in Mounting File Storage for Classic on Linux®.

Before you begin, make sure that the host that is to access the File Storage for Classic volume is authorized. For more information, see Authorizing the host in the UI Authorizing the host from the CLIAuthorizing the host with Terraform.

Mounting the storage

Most of the steps that are required for mounting your File Storage for Classic to a CentOS host are the same as the ones that are described in Mounting File Storage for Classic on Linux®. However, for CentOS, you can specify some additional options by using the Options= line in the mount file. In the following example, the NFS is set to mount at /data/www.

The mount point information can be obtained from the File Storage for Classic Details page in the UI, with an API call - SoftLayer_Network_Storage::getNetworkMountAddress(), or by looking at the ibm_storage_file resource in Terraform.

$ cat data-www.mount
[Unit]
Description = Mount for Container Storage

[Mount]
What=<nfs_mount_point>
Where=/data/www
Type=nfs
Options=vers=4,sec=sys,noauto

[Install]
WantedBy = multi-user.target

Next, enable the mount and check that it is mounted properly.

systemctl enable --now /etc/systemd/system/data-www.mount

cluster1 ~ # mount |grep data
<nfs_mount_point> on /data/www type nfs4 (rw,relatime,vers=4.0,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.81.x.x,local_lock=none,addr=10.1.x.x)