The NFS server - gipert/ECM GitHub Wiki
An NFS server is configure on the nfs+docker-server
instance following the procedure described here. A volume called common-storage
is created through the OpenStack dashboard and attached to the nfs+docker-server
instance.
The folder then must be mounted automatically during the boot sequence. This can be done for example encoding the following instruction:
$ mount -t nfs 10.64.28.50:/path/to/src /path/to/mount/point
in the elastiq configuration file.
N.B. At the present the auto-mounting of the /common
folder is already achieved modifying /etc/fstab
in the gerda-base
snapshot. Don't do this again, use the above method.
- Create a new volume using the OpenStack dashboard
- Attach it to
nfs+docker-server
using the OpenStack dashboard - Check its name in
/dev
with thelsblk
tool - Create a filesystem on it (e.g. ext4):
mkfs -t ext4 /dev/<name>
- Mount it somewhere:
mount /dev/<name> /path/to/mount/point
- Add the following line to
/etc/exports
:/path/to/mount/point 10.64.28.*(async,rw,no_root_squash)
- Restart the relevant services:
sudo systemctl restart rpcbind nfs-server nfs-lock nfs-idmap
- Mount the folder on a different vm with:
mount -t nfs 10.64.28.50:/path/to/folder/on/server /path/to/mount/point/on/vm
- Eventually instruct elastiq to auto-mount it on the slaves (see above)
- Eventually instruct HTCondor to mount the folder on docker containers by specifying it the elastiq config files (see the HTCondor page for details).
- Kill all the slaves (set elastiq
vm_min
to0
and restart the service) - Umount the device on the remaining instances:
umount /common
. If busy get the processes responsible for this withlsof | grep /common
. - Umount the device on the NFS server:
- Stop the Docker running containers with
docker stop
- Stop the Docker daemon with
systemctl stop docker
- Stop the services that could use the device with
sudo systemctl stop rpcbind nfs-server nfs-lock nfs-idmap
- Umount the device:
umount /dataNfs
- Stop the Docker running containers with
- Go to the OpenStack dashboard and de-attach the volume
- Resize the volume again with the dashboard
- Reattach the volume to the NFS server
- Resize the partition inside the volume:
e2fsck -f /dev/vdb
andresize2fs /dev/vdb
- Mount the device:
mount /dev/vdb /dataNfs
- Restart the services you stopped:
sudo systemctl start rpcbind nfs-server nfs-lock nfs-idmap docker
- Restart the stopped Docker containers with
docker start
- Remount the device on the other instances:
mount -t nfs 10.64.28.50:/dataNfs /common
- Restore the elastiq configurations and restart the daemon