NFS: Difference between revisions
No edit summary |
No edit summary |
||
| Line 4: | Line 4: | ||
*the output of rpcinfo -p servername run on the client | *the output of rpcinfo -p servername run on the client | ||
== Конфигурационни файлове == | |||
*''/etc/exports'' - задаване на споделените папки | |||
*''/etc/default/nfs-common'' - настройка портове, ... | |||
*''/etc/default/nfs-kernel-server'' - настройки Kerberos, изключване nfs4, ... | |||
== Инсталация == | |||
В зависимост дали машината е NFS клиент или NFS сървър се инсталира съответния пакет: | |||
'''NFSv4 client''' | |||
# apt-get install nfs-common | |||
'''NFSv4 server''' | |||
# apt-get install nfs-kernel-server | |||
For the error message: | For the error message: | ||
| Line 23: | Line 31: | ||
NFSv4 Server | NFSv4 Server | ||
Let's say we want to export our users' home directories in /home/users. First we create the export filesystem: | |||
# mkdir /export | |||
# mkdir /export/users | |||
and mount the real users directory with: | |||
# mount --bind /home/users /export/users | |||
To save us from retyping this after every reboot we add the following | |||
line to /etc/fstab | |||
/home/users /export/users none bind 0 0 | |||
In /etc/default/nfs-kernel-server we set: | |||
NEED_SVCGSSD=no # no is default | |||
because we are not activating NFSv4 security this time. | |||
In /etc/default/nfs-common we set: | |||
NEED_IDMAPD=yes | |||
NEED_GSSD=no # no is default | |||
To export our directories to a local network 192.168.1.0/24 | |||
we add the following two lines to /etc/exports | |||
/export 192.168.1.0/24(rw,fsid=0,no_subtree_check,sync) | |||
/export/users 192.168.1.0/24(rw,nohide,insecure,no_subtree_check,sync) | |||
Revision as of 17:25, 5 January 2012
If your problem involves the inability mount or export shares please also include: a copy of your /etc/exports file
- the output of rpcinfo -p localhost run on the server
- the output of rpcinfo -p servername run on the client
Конфигурационни файлове
- /etc/exports - задаване на споделените папки
- /etc/default/nfs-common - настройка портове, ...
- /etc/default/nfs-kernel-server - настройки Kerberos, изключване nfs4, ...
Инсталация
В зависимост дали машината е NFS клиент или NFS сървър се инсталира съответния пакет:
NFSv4 client
# apt-get install nfs-common
NFSv4 server
# apt-get install nfs-kernel-server
For the error message: mount.nfs4: No such device
You will have to load the nfs module with the command
- modprobe nfs
NFSv4 without Kerberos
NFSv4 Server Let's say we want to export our users' home directories in /home/users. First we create the export filesystem:
- mkdir /export
- mkdir /export/users
and mount the real users directory with:
- mount --bind /home/users /export/users
To save us from retyping this after every reboot we add the following
line to /etc/fstab /home/users /export/users none bind 0 0
In /etc/default/nfs-kernel-server we set: NEED_SVCGSSD=no # no is default because we are not activating NFSv4 security this time.
In /etc/default/nfs-common we set: NEED_IDMAPD=yes NEED_GSSD=no # no is default To export our directories to a local network 192.168.1.0/24
we add the following two lines to /etc/exports /export 192.168.1.0/24(rw,fsid=0,no_subtree_check,sync) /export/users 192.168.1.0/24(rw,nohide,insecure,no_subtree_check,sync)