1
베스천 접속
# 디렉토리 만들고 마운트 하기 , 마운트 확인 하기
[centos@host-172-30-1-34 ~]$ mkdir fs1
[centos@host-172-30-1-34 ~]$ sudo mount -t nfs 172.30.0.60:/fileshare-01 fs1
[centos@host-172-30-1-34 ~]$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
:
:
mpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=786996k,mode=700,uid=1000,gid=1000)
172.30.0.60:/fileshare-01 on /home/centos/fs1 type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=172.30.1.34,local_lock=none,addr=172.30.0.60)
[centos@host-172-30-1-34 ~]$ sudo chmod 777 fs1
[centos@host-172-30-1-34 ~]$ ls -al
total 20
drwx------. 4 centos centos 104 Feb 23 06:01 .
drwxr-xr-x. 3 root root 20 Oct 12 00:57 ..
-rw-r--r--. 1 centos centos 18 Apr 7 2022 .bash_logout
-rw-r--r--. 1 centos centos 141 Apr 7 2022 .bash_profile
-rw-r--r--. 1 centos centos 376 Apr 7 2022 .bashrc
drwxrwxrwx. 3 root root 4096 Feb 23 05:43 fs1
-r--------. 1 centos centos 1675 Feb 23 03:04 keyPair.pem
drwx------. 2 centos centos 48 Feb 23 03:06 .ssh
[centos@host-172-30-1-34 ~]$ cd fs1
[centos@host-172-30-1-34 fs1]$ cat > test.txt
dcdd
.
^Z
[1]+ Stopped cat > test.txt
[centos@host-172-30-1-34 fs1]$ ls
lost+found test.txt
[centos@host-172-30-1-34 fs1]$ vi test.txt
[centos@host-172-30-1-34 fs1]$ cat test.txt
I am a test file
dcdd
.
2
웹서버 접속
[centos@host-172-30-3-21 ~]$ mkdir fs2
[centos@host-172-30-3-21 ~]$ ls -l
total 0
drwxrwxr-x. 2 centos centos 6 Feb 23 06:03 fs2
[centos@host-172-30-3-21 ~]$ sudo mount -t nfs 172.30.0.60:/fileshare-01 fs2
[centos@host-172-30-3-21 ~]$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=3894576k,nr_inodes=973644,mode=755)
:
:
(rw,nosuid,nodev,relatime,seclabel,size=786996k,mode=700,uid=1000,gid=1000)
172.30.0.60:/fileshare-01 on /home/centos/fs2 type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=172.30.3.21,local_lock=none,addr=172.30.0.60)
[centos@host-172-30-3-21 ~]$ cd fs2
[centos@host-172-30-3-21 fs2]$ ls -l
total 20
drwx------. 2 root root 16384 Feb 23 05:43 lost+found
-rw-rw-r--. 1 centos centos 25 Feb 23 06:03 test.txt
[centos@host-172-30-3-21 fs2]$ cat test.txt
I am a test file
dcdd
]
https://github.com/kakaocloud-edu/tutorial/blob/main/EssentialBasicCourse/PracticalTextbook/Lab09.md
https://brunch.co.kr/@topasvga/3703
감사합니다.