Created
January 28, 2016 15:17
-
-
Save btupper/bfe4a64ed879d8dda157 to your computer and use it in GitHub Desktop.
Mounting NFS volumes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Q: I need to mount a new NFS volume "0.1.2.3:/nfs/some_volume" on my linux server as a directory, "/mnt/my_volume" | |
## | |
## | |
# A: Mounting a volume requires these steps (thanks, Joe!) | |
## | |
# 1. Log in to the server where you have sudo privileges. | |
# 2. Create a directory that will point to the volume. At this point it will not be attached to the mounted volume. | |
$ sudo mkdir -p /mnt/my_volume | |
# 3. Modify the permissions of the directory, | |
$ sudo chmod 777 /mnt/my_volume | |
# 4. Edit the fstab (file system table) to specify the NFS volume your directory will 'mount'. The edit consists of adding a line as below. | |
# open the file | |
$ sudo nano /etc/fstab # or vi, vim, etc. | |
# add this line (suitable edited for your circumstances) | |
0.1.2.3:/nfs/some_volume /mnt/my_volume nfs defaults 0 0 | |
# 5. Mount the volume | |
$ sudo mount -a | |
# Done! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment