A PCRE internal error occured. This might be caused by a faulty plugin
====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
packages:nfs-common [2013/12/06 04:49] admin [Install the nfs-common Package] |
packages:nfs-common [2013/12/16 10:02] (current) admin [Automatic Mount at Boot Time] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Complementary Packages ====== | + | |
- | ===== nfs-common ===== | + | ====== nfs-common ====== |
Out of the box, LMDE doesn't come with the ability to mount nfs shares across the network. | Out of the box, LMDE doesn't come with the ability to mount nfs shares across the network. | ||
When you try to issue a command like this in a terminal: | When you try to issue a command like this in a terminal: | ||
<code> | <code> | ||
- | sudo mount -t nfs 192.168.10.200:/volume1/shared_directory /mnt/nfs-share | + | sudo mount -t nfs 192.168.10.200:/volume1/shared_directory /mnt/nfs/shared_directory |
</code> | </code> | ||
Line 18: | Line 18: | ||
</code> | </code> | ||
- | ==== Install the nfs-common Package ==== | + | ===== Install the nfs-common Package ===== |
The solution is quite simple: you need to install the nfs-common package by issuing the following commands: | The solution is quite simple: you need to install the nfs-common package by issuing the following commands: | ||
<code> | <code> | ||
Line 25: | Line 25: | ||
</code> | </code> | ||
- | ==== Mount an NFS Shared Directory ==== | + | ===== Mount an NFS Shared Directory ===== |
Once done, you'll need to create a directory where to mount the target nfs share and mount it using the mount command: | Once done, you'll need to create a directory where to mount the target nfs share and mount it using the mount command: | ||
<code> | <code> | ||
- | sudo mkdir /mnt/nfs-share | + | sudo mkdir -p /mnt/nfs/shared_directory |
- | sudo mount -t nfs 192.168.10.200:/volume1/shared_directory /mnt/nfs-share | + | sudo mount -t nfs 192.168.10.200:/volume1/shared_directory /mnt/nfs/shared_directory |
</code> | </code> | ||
Line 35: | Line 35: | ||
To have an nfs share automatically mounted at boot time, you need to edit the fstab on your system. | To have an nfs share automatically mounted at boot time, you need to edit the fstab on your system. | ||
- | <wrap todo>TO BE COMPLETED</wrap> | + | The general syntax for mounting an nfs share in fstab is: |
+ | <code> | ||
+ | <server>:</remote/export> </local/directory> <nfs-type> <options> 0 0 | ||
+ | </code> | ||
+ | |||
+ | Replace <server> with the hostname, IP address, or fully qualified domain name of the server exporting the file system. | ||
+ | |||
+ | Replace </remote/export> with the path to the exported directory (the path to the nfs shared directory on server). | ||
+ | |||
+ | Replace </local/directory> with the local file system on which the exported directory is mounted. This mount point must exist before /etc/fstab is read or the mount fails. | ||
+ | |||
+ | Replace <nfs-type> with either nfs for NFSv2 or NFSv3 servers, or nfs4 for NFSv4 servers. | ||
+ | |||
+ | Replace <options> with a comma separated list of options for the NFS file system (refer to [[https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s1-nfs-client-config-options.html|“Common NFS Mount Options”]] for details). Refer to the fstab man page for additional information. | ||
+ | |||
+ | In my case, mounting two nfs shares, resulted in the following entry in /etc/fstab: | ||
+ | <code> | ||
+ | 192.168.0.200:/volume1/nfs_share_01 /mnt/nfs/nfs_share_01 nfs rsize=32768,wsize=32768,intr,timeo=14 | ||
+ | 192.168.0.200:/volume2/nfs_share_02 /mnt/nfs/nfs_share_02 nfs rsize=32768,wsize=32768,intr,timeo=14 | ||
+ | </code> | ||
+ | |||
+ | Of course both local mount points had to be created beforehand: | ||
+ | <code> | ||
+ | sudo mkdir -p /mnt/nfs/nfs_share_01 /mnt/nfs/nfs_share_02 | ||
+ | </code> | ||
+ | |||
+ | Once your fstab is modified, you can test it is working as expected by issuing commands like: | ||
+ | <code> | ||
+ | sudo mount -a | ||
+ | ls -la /mnt/nfs/nfs_share_01 | ||
+ | ls -la /mnt/nfs/nfs_share_02 | ||
+ | </code> | ||
+ | |||
+ | The ls command should show you the content of each nfs share. If it's empty, something is not working as expected. |