- rebooting 시 자동 마운트 설정 : 디스크 정보 확인하고 내용을 fstab 파일에 반영
[root@test ~]# cd /etc
[root@test etc]# cp fstab fstab.backup
[root@test etc]# echo UUID=`sudo blkid -s UUID -o value /dev/sdb` /mnt/disks/data ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab
UUID=5584906b-a31c-420b-94da-fc30f94538e9 /mnt/disks/data ext4 discard,defaults,nofail 0 2
[root@test etc]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Wed Feb 13 19:23:27 2019
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=9adfe2b4-b4b7-454f-8d7a-4193208d0ea7 / xfs defaults 0 0
/swap none swap sw 0 0
UUID=5584906b-a31c-420b-94da-fc30f94538e9 /mnt/disks/data ext4 discard,defaults,nofail 0 2
[root@test etc]#
2. NFS(Network file System) Server Setting
- NFS package install
[root@test ~]# yum install nfs-utils nfs-utils-lib
Dependencies Resolved
==================================================================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================================================================
Installing:
nfs-utils x86_64 1:1.3.0-0.61.el7 base 410 k
Installing for dependencies:
gssproxy x86_64 0.7.0-21.el7 base 109 k
keyutils x86_64 1.5.8-3.el7 base 54 k
libbasicobjects x86_64 0.1.1-32.el7 base 26 k
libcollection x86_64 0.7.0-32.el7 base 42 k
libevent x86_64 2.0.21-4.el7 base 214 k
libini_config x86_64 1.3.1-32.el7 base 64 k
libnfsidmap x86_64 0.25-19.el7 base 50 k
libpath_utils x86_64 0.2.1-32.el7 base 28 k
libref_array x86_64 0.1.5-32.el7 base 27 k
libverto-libevent x86_64 0.2.5-4.el7 base 8.9 k
Transaction Summary
==================================================================================================================================================================================================
Install 1 Package (+10 Dependent packages)
[root@ap-0 ~]# yum install nfs-utils nfs-utils-lib
Dependencies Resolved
==================================================================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================================================================
Installing:
nfs-utils x86_64 1:1.3.0-0.61.el7 base 410 k
Installing for dependencies:
gssproxy x86_64 0.7.0-21.el7 base 109 k
keyutils x86_64 1.5.8-3.el7 base 54 k
libbasicobjects x86_64 0.1.1-32.el7 base 26 k
libcollection x86_64 0.7.0-32.el7 base 42 k
libevent x86_64 2.0.21-4.el7 base 214 k
libini_config x86_64 1.3.1-32.el7 base 64 k
libnfsidmap x86_64 0.25-19.el7 base 50 k
libpath_utils x86_64 0.2.1-32.el7 base 28 k
libref_array x86_64 0.1.5-32.el7 base 27 k
libverto-libevent x86_64 0.2.5-4.el7 base 8.9 k
Transaction Summary
==================================================================================================================================================================================================
Install 1 Package (+10 Dependent packages)
- 공유 디스크 확인
[root@ap-0 ~]# showmount -e 10.1.2.3
Export list for 10.1.2.3:
/mnt/disks/data 10.1.2.0/24
[root@ap-0 ~]# cd /etc
[root@ap-0 etc]# cp fstab fstab.backup
[root@ap-0 etc]# vi fstab
#
# /etc/fstab
# Created by anaconda on Wed Feb 13 19:23:27 2019
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=9adfe2b4-b4b7-454f-8d7a-4193208d0ea7 / xfs defaults 0 0
/swap none swap sw 0 0
10.1.2.3:/mnt/disks/data /mnt/disks/data nfs rw 0 0
- NFS Service Client 활성화
[root@ap-0 ~]# systemctl enable nfs-rquotad.service
Created symlink from /etc/systemd/system/multi-user.target.wants/rpc-rquotad.service to /usr/lib/systemd/system/rpc-rquotad.service.
Created symlink from /etc/systemd/system/nfs-server.service.wants/rpc-rquotad.service to /usr/lib/systemd/system/rpc-rquotad.service.
[root@ap-0 ~]# systemctl start nfs-rquotad.service
[root@ap-0 ~]# dracut -v -f
[root@ap-0 ~]# reboot