[Linux] A story about mounting a NAS through a firewall using NFS

I learned from Linux, so I will leave it. The work started with the words, "Finally this. Thank you for working next week." .. .. In order to meet the desire to mount a NAS over the FW, I touched Linux for the first time in business.

environment

OS:Ubuntu 18.04 NFS v4 Make a hole in TCP 2049 for mounting with NFS in FW Make sure your NAS supports NFS

work

Install the NFS client first

Ubuntu18.04


$ sudo apt upgrade \\\Package update
$ sudo apt install nfs-common \\\NFS client installation
$ rpcinfo -p \\\There is no problem if there is 4 in the vers column

Mount settings

Ubuntu18.04


$ mkdir /mnt/nfs/test \\\Creating a mount point
$ vi /etc/fstab \\\Open with vi command to edit mount config file

Open it with the vi command and add the following line
IP address of NAS:/NAS shared directory/ /mnt/nfs/test nfs rw,user,auto 0 0

IP address of NAS:/shared directory of NAS// mnt/nfs/test nfs rw, user, auto 0 0 This line specifies mount options and file systems. nfs: File system specification rw: readable and writable user: Can be mounted by a general user auto: mount -a to allow mounting 0 0: Do not back up the file system and do not check the file system with the fsck command

If you can execute so far, mount it

Ubuntu18.04


$ sudo mount -a \\\Execute mount command
$ mount \\\If you execute it without options, the currently mounted one will be output.
/etc/If the line described in fstab is output, it is successful.

Actually create an empty file under the mount point

Ubuntu18.04


$ touch test \\\Creating an empty text file

After executing so far, check the shared directory of the NAS and succeed if the test file is created

Impressions

I haven't had a chance to touch Linux since I got LPIC level 1, so it was a good stimulus. I feel that I was able to make good use of my knowledge by acquiring the qualification.

Recommended Posts

[Linux] A story about mounting a NAS through a firewall using NFS
A story about using Python's reduce
A story about migrating entire Linux disk via SSH
SoC FPGA: A small story when using on Linux
A story about a Linux beginner passing LPIC101 in a week
A story about a Linux beginner putting Linux on a Windows tablet
A story about stumbling through PATH after installing anaconda
A story about creating a UNIX / Linux compatible OS from scratch
A story about installing matplotlib using pip with an error
A refreshing story about Python's Slice
A sloppy story about Python's Slice
A story about trying to connect to MySQL using Heroku and giving up
A story about deploying a Twitter-linked app created using Flask + gunicorn on Heroku
A story about remodeling Lubuntu into a Chromebook
A story about machine learning with Kyasuket
A story about Python pop and append
A story about a 503 error on Heroku open
[Note] A story about not being able to break through a proxy with pip
A story about achieving a horse racing recovery rate of over 100% through machine learning
[Linux] Let's talk about when I stumbled upon a symbolic link I was using.