blob: 5cb164ccac7d00d8275a4814030232b80a558032 [file] [log] [blame]
Roger Maitlandeb412c62018-05-31 14:09:09 -04001#!/bin/bash
2
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/
25echo "$MASTER_IP:/dockerdata-nfsĀ /dockerdata-nfs nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0" | sudo tee -a /etc/fstab