NFS: Difference between revisions
(https://msn.com/live.search/maps/><news.internet address laptop GMT htp://inet.com/wiki.laptop.org/index.php/→Installation: remote protherly documents control internet .page blank PDF- documents/) |
m (→See Also) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
The Network File System lets you use files on another machine as if they were actually on your XO |
The Network File System lets you use files on another machine as if they were actually on your XO laptop. |
||
Last tested on [[13.2.0]]. |
|||
== Installation == |
== Installation == |
||
Installation consists of two steps: |
Installation consists of two steps: |
||
* adding a package to your XO |
* adding a package to your XO laptop, and |
||
* adding an authorization line to the NFS server |
* adding an authorization line to the NFS server. |
||
The procedures below assume: |
|||
* your XO |
* your XO laptop's IP Address is <tt>192.168.1.250</tt>; |
||
* the IP Address of the NFS server is <tt>192.168.1.2</tt>; |
* the IP Address of the NFS server is <tt>192.168.1.2</tt>; |
||
* you want <tt>/home/johndoe</tt> on the NFS server to be visible as <tt>/mnt</tt> on your XO |
* you want <tt>/home/johndoe</tt> on the NFS server to be visible as <tt>/mnt</tt> on your XO laptop. |
||
⚫ | |||
su - |
|||
⚫ | |||
exit |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
su - |
|||
⚫ | |||
exit |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
:: service rpcbind restart |
:: service rpcbind restart |
||
Line 32: | Line 31: | ||
: might also be enough to fix this. |
: might also be enough to fix this. |
||
: -- Grumbel |
|||
=== Authorizing your XO |
=== Authorizing your XO for NFS === |
||
On your NFS server, add a line to the <tt>/etc/exports</tt> file and reload nfs: |
On your NFS server, add a line to the <tt>/etc/exports</tt> file and reload nfs: |
||
Line 42: | Line 40: | ||
exit |
exit |
||
The items in parentheses are |
The items in parentheses are options. The value <tt>ro</tt> means read-only; your server will not allow the XO to modify files in the <tt>/home/johndoe</tt> directory. The value <tt>no_root_squash</tt> means your server will skip numeric-userid checking. For a full explanation, do <tt>man exports</tt> on your NFS server. |
||
== Mounting == |
== Mounting == |
||
Line 49: | Line 47: | ||
mount nfs-server.mynetwork.com:directory mount-point |
mount nfs-server.mynetwork.com:directory mount-point |
||
=== Mounting <tt>/home/johndoe</tt> on your XO |
=== Mounting <tt>/home/johndoe</tt> on your XO === |
||
On your XO |
On your XO laptop, in Terminal Activity[[Image:Activity-terminal.svg|35px]], mount the remote directory: |
||
⚫ | |||
su - |
|||
⚫ | |||
exit |
exit |
||
== Using NFS mounts == |
== Using NFS mounts == |
||
Refer to files and directories of a NFS-mounted filesystem by mount-point, just as if they resided on your XO |
Refer to files and directories of a NFS-mounted filesystem by mount-point, just as if they resided on your XO laptop. |
||
=== Using NFS-mounted files on your XO |
=== Using NFS-mounted files on your XO === |
||
Suppose that <tt>/home/johndoe/public_html/index.html</tt> is the index to John Doe's webpage. In the Browse Activity[[Image:Activity-web.svg|35px]], give this as the location you wish to browse to: |
Suppose that <tt>/home/johndoe/public_html/index.html</tt> is the index to John Doe's webpage. In the Browse Activity[[Image:Activity-web.svg|35px]], give this as the location you wish to browse to: |
||
file:///mnt/public_html/index.html |
file:///mnt/public_html/index.html |
||
== See Also == |
|||
* [[Forth_Lesson_12#Other_network_protocols|Open Firmware booting using NFS]] |
Latest revision as of 06:20, 13 August 2013
The Network File System lets you use files on another machine as if they were actually on your XO laptop.
Last tested on 13.2.0.
Installation
Installation consists of two steps:
- adding a package to your XO laptop, and
- adding an authorization line to the NFS server.
The procedures below assume:
- your XO laptop's IP Address is 192.168.1.250;
- the IP Address of the NFS server is 192.168.1.2;
- you want /home/johndoe on the NFS server to be visible as /mnt on your XO laptop.
To find your XO's actual IP Address, do this in Terminal Activity:
sudo ifconfig
Look at the lines that start with inet addr:. One will show 127.0.0.1; ignore this one. Likely ignore the one for the mesh network on XO-1, named msh0. The one that's left will be the one you want to use.
Installing NFS capability on your XO
On your XO laptop, in Terminal Activity, install the nfs-utils package:
sudo yum install -y nfs-utils
This will cause yum to install the nfs-utils package and several other packages it requires.
- A reboot is needed after the install. Grumbel had trouble with rpcbind and thus rcp.statd not starting up and NFS mounts thus fail with: "mount.nfs: rpc.statd is not running but is required for remote locking". Doing a:
- service rpcbind restart
- service nfslock restart
- service nfs restart
- might also be enough to fix this.
Authorizing your XO for NFS
On your NFS server, add a line to the /etc/exports file and reload nfs:
su - echo "/home/johndoe 192.168.1.250(ro,no_root_squash)" >> /etc/exports service nfs reload exit
The items in parentheses are options. The value ro means read-only; your server will not allow the XO to modify files in the /home/johndoe directory. The value no_root_squash means your server will skip numeric-userid checking. For a full explanation, do man exports on your NFS server.
Mounting
You use the mount command as usual to mount files that reside physically on an NFS server, mount device mountpoint, but the device parameter has a special form: host:directory, that is, the NFS server's hostname or IP Address, a colon, and the directory to be mounted:
mount nfs-server.mynetwork.com:directory mount-point
Mounting /home/johndoe on your XO
On your XO laptop, in Terminal Activity, mount the remote directory:
sudo mount 192.168.1.2:/home/johndoe /mnt exit
Using NFS mounts
Refer to files and directories of a NFS-mounted filesystem by mount-point, just as if they resided on your XO laptop.
Using NFS-mounted files on your XO
Suppose that /home/johndoe/public_html/index.html is the index to John Doe's webpage. In the Browse Activity, give this as the location you wish to browse to:
file:///mnt/public_html/index.html