-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNetwork-Attached_Storage.txt
More file actions
85 lines (72 loc) · 3.74 KB
/
Copy pathNetwork-Attached_Storage.txt
File metadata and controls
85 lines (72 loc) · 3.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Network Attached Storage(NAS)
The Network File System (NFS) is an internet standard protocol that Linux, UNIX, and similar operating systems
use as their native network file system. NFS is an open standard that supports native Linux permissions and
file-system attributes.
NFSv4 - Support TCP
NFSv3 - Support UDP and TCP
#NFS Server :
- dnf install nfs-utils \install the nfs packages and services
- systemctl enable --now nfs-server.service \Start the nfs service
- df -h \Check how much space will be available OR decide which storage to allow for nfs OR You can also add new disk
-- If new storage is added permission need to be given by chmod -R 777 /nfsserver_new/
- vim /etc/exports \Empty config file -- Enter the following entries
- /nfsserver_new * (rw,sync) \save and quit
- exportfs -a \select the list provided in export file
- exportfs -r \reload the export file
- exportfs \display the mount point
- showmount -e
- firewall-cmd --add-service=nfs --permanent \Need to add these entries
- firewall-cmd --add-service=rpc-bind --permanent \Need to add these entries
- firewall-cmd --add-service=mountd --permanent \Need to add these entries
- firewall-cmd --reload \Reload the firwall services
- firewall-cmd --list-services
#NFS Client :
• Manually by using the mount command.
• Persistently at boot by configuring entries in the /etc/fstab file.
• On demand by configuring an automounter method.
- dnf install nfs-utils \install the utils package
- systemctl start nfs-utils.service \Start the nfs service
- showmount -e serverip \display the available directory in NAS
--> Manually:
- mkdir /nfsclient_new
- mount -t nfs ip:/nfsserver_new /nfsclient_new/
- df -h \To list the mounted nfs file
\The data is stored on the nfs serer, and will be visible only when the disk is mounted.
Note: The same way the AWS uses Elastic Block Storage.
-->Persistant Entry in /etc/fstab
- vim /etc/fstab
- serverIP:/nfsserver_new /nfsclient nfs defaults 0 0
- systemctl daemon-reload
- mount -a
- df -h \Check if the mounted nfs file system is showing or not.
-->On Demand (Exam) \Imp from examp point of view. We will use automounter service.
- First remove the persistant one, then umount.
- df -h \check if the nfs is still mounted.It should not be.
- dnf install autofs -y \install the services.
- systemctl enable --now autofs.service \enable to autofs services.
------Direct Mapping--------------------------------
- vim /etc/auto.master.d/direct.autofs \file name should be .autofs
- /- /etc/auto.direct \We will create this file seprately.
- vim /etc/auto.direct
- /nfsclient_new -rw,sync serverIP:/nfsserver_new
- systemctl restart autofs.service
- df -h \check if the nfs is relected.
----------------------------------------------------
- rm -rvf /etc/auto.master.d/direct.autofs \remove the files to attempt to second method
- rm -rvf /etc/auto.direct \remove the file.
- systemctl restart autofs.service
----------------Indirect Mapping-----------------------------------
COnsider you have a google directory with a sub directory named bob.
- vim /etc/auto.master \It is the main configuration file.
- /google /etc/auto.misc \Enter this in misclenious line.
- vim /etc/auto.misc
- bob -fstype=nfs4 serverip:/nfsserver_new
- systemctl restart autofs.service
Now the bob directory is now Indirect.
You will only be able to access the directory only if you know the name of folder.
- cd to google. \You will not find the bob directory.
- cd to bob.
------Very Very Important-------------------------------
---------------------------------------------------------------
In Exam: You only need to make the configuration on client side.
---------------------------------------------------------------