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.

How to add a new shared folder:

  1. Create a new volume using the OpenStack dashboard
  2. Attach it to nfs+docker-server using the OpenStack dashboard
  3. Check its name in /dev with the lsblk tool
  4. Create a filesystem on it (e.g. ext4): mkfs -t ext4 /dev/<name>
  5. Mount it somewhere: mount /dev/<name> /path/to/mount/point
  6. Add the following line to /etc/exports: /path/to/mount/point 10.64.28.*(async,rw,no_root_squash)
  7. Restart the relevant services: sudo systemctl restart rpcbind nfs-server nfs-lock nfs-idmap
  8. 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
  9. Eventually instruct elastiq to auto-mount it on the slaves (see above)
  10. Eventually instruct HTCondor to mount the folder on docker containers by specifying it the elastiq config files (see the HTCondor page for details).

How to resize the volume currently under /common

  1. Kill all the slaves (set elastiq vm_min to 0 and restart the service)
  2. Umount the device on the remaining instances: umount /common. If busy get the processes responsible for this with lsof | grep /common.
  3. Umount the device on the NFS server:
    1. Stop the Docker running containers with docker stop
    2. Stop the Docker daemon with systemctl stop docker
    3. Stop the services that could use the device with sudo systemctl stop rpcbind nfs-server nfs-lock nfs-idmap
    4. Umount the device: umount /dataNfs
  4. Go to the OpenStack dashboard and de-attach the volume
  5. Resize the volume again with the dashboard
  6. Reattach the volume to the NFS server
  7. Resize the partition inside the volume: e2fsck -f /dev/vdb and resize2fs /dev/vdb
  8. Mount the device: mount /dev/vdb /dataNfs
  9. Restart the services you stopped: sudo systemctl start rpcbind nfs-server nfs-lock nfs-idmap docker
  10. Restart the stopped Docker containers with docker start
  11. Remount the device on the other instances: mount -t nfs 10.64.28.50:/dataNfs /common
  12. Restore the elastiq configurations and restart the daemon
⚠️ **GitHub.com Fallback** ⚠️