Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
linux:nfs [2009/05/25 00:35] 127.0.0.1 external edit |
linux:nfs [2012/10/12 02:39] 188.143.232.12 EiJQkBztBPszQw |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Nightmare file system (NFS) ====== | + | Thanks |
- | + | ||
- | start here: | + | |
- | * [[http:// | + | |
- | * [[http:// | + | |
- | * [[http:// | + | |
- | + | ||
- | + | ||
- | **/ | + | |
- | | + | |
- | + | ||
- | ===== NFS shares get stale after a while or don't mount at all ===== | + | |
- | This might be caused by the fact that the server really wants to have portnumbers below 1024 for the session. Adding insecure to the exports-file fixes that. | + | |
- | Example: | + | |
- | + | ||
- | / | + | |
- | + | ||
- | ===== NFS configuration for central storage ===== | + | |
- | + | ||
- | ==== Configuring The NFS Server ==== | + | |
- | + | ||
- | Edit the / | + | |
- | + | ||
- | / | + | |
- | + | ||
- | The option listing for each machine will describe what kind of access that machine will have. Important options are: | + | |
- | + | ||
- | * **ro**: The directory is shared read only; the client machine will not be able to write to it. This is the default. | + | |
- | * **rw**: The client machine will have read and write access to the directory. | + | |
- | * **no_root_squash**: | + | |
- | * **no_subtree_check**: | + | |
- | * **sync**: By default the exportfs command will use async behavior, telling a client machine that a file write is complete - that is, has been written to stable storage - when NFS has finished handing the write over to the filesysytem. This behavior may cause data corruption if the server reboots, and the sync option prevents this. | + | |
- | + | ||
- | Let NFS read and make /home available to the network with the exportfs command. | + | |
- | + | ||
- | # exportfs -a | + | |
- | + | ||
- | Make sure the required nfs, nfslock, and portmap daemons are running and configured to start after the next reboot. | + | |
- | + | ||
- | # chkconfig nfslock on | + | |
- | # chkconfig nfs on | + | |
- | # chkconfig portmap on | + | |
- | + | ||
- | # service portmap start | + | |
- | # service nfslock start | + | |
- | # service nfs start | + | |
- | + | ||
- | ==== Configuring The NFS Client ==== | + | |
- | + | ||
- | Make sure the required netfs, nfslock, and portmap daemons are running and configured to start after the next reboot. | + | |
- | + | ||
- | # chkconfig nfslock on | + | |
- | # chkconfig netfs on | + | |
- | # chkconfig portmap on | + | |
- | + | ||
- | # service portmap start | + | |
- | # service netfs start | + | |
- | # service nfslock start | + | |
- | + | ||
- | Now mount the NFS (server) /home to this client | + | |
- | + | ||
- | # mount server:/ | + | |
- | + | ||
- | Configure autofs edit your / | + | |
- | + | ||
- | # vi / | + | |
- | / | + | |
- | + | ||
- | Edit file / | + | |
- | + | ||
- | # vi /etc/auto.home | + | |
- | | + |