NFS KURULUMU DEBİAN GNU/LİNUX

apt update 

apt install nfs-kernel-server nfs-common     kurulumu yap

df -h

mkdir -p /var/nfs                            klasör oluştur

chown nobody:nogroup /var/nfs/               yetki ver
 

nano /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
/var/nfs 10.67.231.0/24(rw,sync,no_subtree_check)        satırı ekle

systemctl status nfs-server.service        servis durumu

nano /etc/default/nfs-common

# If you do not set values for the NEED_ options, they will be attempted
# autodetected; this should be sufficient for most people. Valid alternatives
# for the NEED_ options are “yes” and “no”.

# Do you want to start the statd daemon? It is not needed for NFSv4.
NEED_STATD=no        değerini gir

# Options for rpc.statd.
#   Should rpc.statd listen on a specific port? This is especially useful
#   when you have a port-based firewall. To use a fixed port, set this
#   this variable to a statd argument like: “–port 4000 –outgoing-port 4001”.
#   For more information, see rpc.statd(8) or http://wiki.debian.org/SecuringNFS
STATDOPTS=

# Do you want to start the idmapd daemon? It is only needed for NFSv4.
NEED_IDMAPD=yes        değerini gir

# Do you want to start the gssd daemon? It is required for Kerberos mounts.
NEED_GSSD=
 

nano /etc/default/nfs-kernel-server

# Number of servers to start up
RPCNFSDCOUNT=8

# Runtime priority of server (see nice(1))
RPCNFSDPRIORITY=0

# Options for rpc.mountd.
# If you have a port-based firewall, you might want to set up
# a fixed port here using the –port option. For more information,
# see rpc.mountd(8) or http://wiki.debian.org/SecuringNFS
# To disable NFSv4 on the server, specify ‘–no-nfs-version 4’ here
RPCNFSDOPTS=”-N 2 -N 3″                    değerini gir
RPCMOUNTDOPTS=”–manage-gids -N 2 -N 3″    değerini gir

# Do you want to start the svcgssd daemon? It is only required for Kerberos
# exports. Valid alternatives are “yes” and “no”; the default is “no”.
NEED_SVCGSSD=””

# Options for rpc.svcgssd.
RPCSVCGSSDOPTS=””
 

systemctl restart nfs-server.service
 

mount -t ntfs /dev/sdf1 /var/nfs/      2tb diski dizine ekleme mount etmek  

df -h

root@salvador://var/nfs/dump# df -h
Filesystem                     Size  Used Avail Use% Mounted on
udev                           5.8G     0  5.8G   0% /dev
tmpfs                          1.2G  1.9M  1.2G   1% /run
/dev/mapper/salvador–vg-root  218G  143G   65G  69% /
tmpfs                          5.8G  160K  5.8G   1% /dev/shm
tmpfs                          5.0M  8.0K  5.0M   1% /run/lock
/dev/sda1                      470M  131M  315M  30% /boot
tmpfs                          1.2G  2.6M  1.2G   1% /run/user/1000
/dev/sdf1                      1.9T   43G  1.8T   3% /var/nfs        nfs bölümü
 

exportfs -a

root@salvador://var/nfs/dump# exportfs -a
exportfs: Failed to stat /srv/nfs4/home0: No such file or directory
exportfs: Failed to stat /srv/nfs4: No such file or directory

Başa dön