7.2.3. Attach from A Resource to A File Storage Volume¶
After creating a new Volume, attach the created Volume from a Resource, both of which exist in the same Tenant.
7.2.3.1. Linux Server¶
Verify the respective information on the Target IP Address & the Volume UUID, both of which are required to mount the NFS at the "Volume Details" page.
Mounting the NFS (Network File System).¶
Note
If the following error occurs when executing the mount command, there may be a missing package such as nfs-utils to mount NFS. Please implement after installing necessary packages for OS.
mount: wrong fs type, bad option, bad superblock on 10.0.0.1:/vc79bbecb15844ed0a6450a087f00a604,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
Premium
$ mount -t nfs 192.168.40.50:/v75d3af60ce754332927c0d062ff57216/nfs /mnt/nfs
Note
Standard
Use NFSv3
# mount -t nfs -o vers=3 192.168.40.50:/v75d3af60ce754332927c0d062ff57216 /mnt/nfs
Use NFSv4
# mount -t nfs -o vers=4 192.168.40.50:/v75d3af60ce754332927c0d062ff57216 /mnt/nfs
Use NFSv4.1
# mount -t nfs -o vers=4.1 192.168.40.50:/v75d3af60ce754332927c0d062ff57216 /mnt/nfs
Note
About owner when writing file of root user authority with NFSv4 or NFSv4.1.¶
By default, when mounted with NFSv4 and NFSv4.1, the owner of the file / directory written by the root user of the NFS client becomes the nobody user. To avoid this, set the following before mounting.
# vi /etc/idmapd.conf
[General]
:
Domain = defaultv4iddomain.com
:
After editing the configuration file, do the following:
# nfsidmap -c
2.Verifying the mount state.¶
Premium
# df
FileSystem 1K-blocks Used Available %Used Mounted on
/dev/sda3 545499904 915552 544584352 1% /
devtmpfs 131911140 0 131911140 0% /dev
tmpfs 131920252 0 131920252 0% /dev/shm
tmpfs 131920252 9564 131910688 1% /run
tmpfs 131920252 0 131920252 0% /sys/fs/cgroup
/dev/sda2 499656 85396 377564 19% /boot
/dev/sda1 524008 10024 513984 2% /boot/efi
tmpfs 26384052 0 26384052 0% /run/user/0
192.168.40.50:/v75d3af60ce754332927c0d062ff57216/nfs 268435456 0 268435456 0% /mnt/nfs
Standard
# df
FileSystem 1K-blocks Used Available %Used Mounted on
/dev/sda3 545499904 915552 544584352 1% /
devtmpfs 131911140 0 131911140 0% /dev
tmpfs 131920252 0 131920252 0% /dev/shm
tmpfs 131920252 9564 131910688 1% /run
tmpfs 131920252 0 131920252 0% /sys/fs/cgroup
/dev/sda2 499656 85396 377564 19% /boot
/dev/sda1 524008 10024 513984 2% /boot/efi
tmpfs 26384052 0 26384052 0% /run/user/0
192.168.40.50:/v75d3af60ce754332927c0d062ff57216 419430400 256 419430144 0% /mnt/nfs
Use NFSv3
Make sure that "vers = 3".
# grep v75d3af60ce754332927c0d062ff57216 /proc/mounts
192.168.40.15:/v75d3af60ce754332927c0d062ff57216 /mnt/nfs nfs rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.40.15,mountvers=3,mountport=635,mountproto=udp,local_lock=none,addr=192.168.32.200 0 0
Use NFSv4
- In the case of RHEL6.X systems
Make sure that "vers=4 minorversion=0".
# grep v75d3af60ce754332927c0d062ff57216 /proc/mounts
192.168.40.15:/v75d3af60ce754332927c0d062ff57216/ /mnt/nfs nfs4 rw,relatime,vers=4,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.32.100,minorversion=0,local_lock=none,addr=192.168.40.15 0 0
- In the case of RHEL7.X systems
Confirm that vers = 4.0.
# grep v87e48bee49fa4aab862f9ebd04f28d05 /proc/mounts
192.168.82.100:/v87e48bee49fa4aab862f9ebd04f28d05 /mnt/nfs nfs4 rw,relatime,vers=4.0,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.82.6,local_lock=none,addr=192.168.82.100 0 0
Use NFSv4.1
- In the case of RHEL6.X systems
Make sure that "vers=4 minorversion=1".
# grep v75d3af60ce754332927c0d062ff57216 /proc/mounts
192.168.40.15:/v75d3af60ce754332927c0d062ff57216/ /mnt/nfs nfs4 rw,relatime,vers=4,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.32.100,minorversion=1,local_lock=none,addr=192.168.40.15 0 0
- In the case of RHEL7.X systems
Confirm that vers = 4.1.
# grep v87e48bee49fa4aab862f9ebd04f28d05 /proc/mounts
192.168.82.100:/v87e48bee49fa4aab862f9ebd04f28d05 /mnt/nfs nfs4 rw,relatime,vers=4.1,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.82.6,local_lock=none,addr=192.168.82.100 0 0
- In the case of RHEL8.X systems
Confirm that vers = 4.1.
# grep va50d1de12c79439cacafb697e29f5ef1 /proc/mounts
192.168.1.100:/va50d1de12c79439cacafb697e29f5ef1 /mnt/nfs nfs4 rw,relatime,vers=4.1,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.2,local_lock=none,addr=192.168.1.100 0 0