blob: 1035ff5ad6ab02a62986b313d27c74d3ace20eff [file] [log] [blame]
Guillaume Lambert85b14922021-03-12 13:53:18 +01001#!/bin/sh
Roger Maitlandeb412c62018-05-31 14:09:09 -04002
3usage () {
4 echo "Usage:"
5 echo " ./$(basename $0) nfs_master_ip"
6 exit 1
7}
8
9if [ "$#" -ne 1 ]; then
10 echo "Missing NFS mater node"
11 usage
12fi
13
14MASTER_IP=$1
15
16#Install NFS common
17sudo apt-get update
18sudo apt-get install -y nfs-common
19
20#Create NFS directory
21sudo mkdir -p /dockerdata-nfs
22
23#Mount the remote NFS directory to the local one
24sudo mount $MASTER_IP:/dockerdata-nfs /dockerdata-nfs/
Mike Elliott274180b2019-10-10 11:25:07 -040025echo "$MASTER_IP:/dockerdata-nfs /dockerdata-nfs nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0" | sudo tee -a /etc/fstab