NSLU2-Linux
view · edit · print · history

Optware.Unfs3 History

Hide minor edits - Show changes to markup

December 11, 2005, at 01:29 AM by JamesCC -- Make more obvious nfs-utils alternative, as we can end up at this page directly with a google search.
Changed lines 5-6 from:

You can install "native" NFS version 3 support into your uNSLUng NSLU2 via the following process:

to:

*** This not package is not recommended - use nfs-utils instead. This is a user space daemon, nfs-utils uses kernel space, and hence should be faster. ***

If you are still interested, you can install "native" NFS version 3 support into your uNSLUng NSLU2 via the following process:

Added lines 66-68:

NOTE by JamesCC?: I had a problem with groups using Unfs3. I could NOT read files owned by someone else (in my group), despite the file being group readable. Interestingly if I su to the user owning the file read the file and returned, I could then read the file. nfs-utils (alternative) doesn't seem to have this problem?

April 19, 2005, at 11:24 AM by tman --
Changed lines 7-23 from:

1. telnet / ssh to your NSLU2.

2. Create an /share/hdd/conf/exports file and link into the correct place. The format of the exports file is below.

  # vi /share/hdd/conf/exports 
  Type in your exports and save. Or use your favourite editor.
  # ln -s /share/hdd/conf/exports /etc/exports

3. Install a portmapper and the UNFS daemon:

  # ipkg install portmap
  # ipkg install unfs3

4. Check that the unfds and portmap daemons are running.

  # ps -ef | grep unfsd | grep -v grep
  1118     bin    1216    S    /opt/sbin/portmap
  # ps -ef | grep portmap | grep -v grep
  1197     root   5888    S    /opt/sbin/unfsd 
to:
  1. telnet / ssh to your NSLU2.
  2. Create an /share/hdd/conf/exports file and link into the correct place. The format of the exports file is below.
    1. vi /share/hdd/conf/exports
      Type in your exports and save. Or use your favourite editor.
    2. ln -s /share/hdd/conf/exports /etc/exports
  3. Install a portmapper and the UNFS daemon:
    1. ipkg install portmap
    2. ipkg install unfs3
  4. Check that the unfds and portmap daemons are running.
    1. ps -ef | grep unfsd | grep -v grep
      1118 bin 1216 S /opt/sbin/portmap
    2. ps -ef | grep portmap | grep -v grep
      1197 root 5888 S /opt/sbin/unfsd
      \\
Changed lines 26-35 from:

5. From your client machine see if NFS is working correctly (use your NSLU IP address if it isn't the default):

  root@ttyp2[knoppix]$ showmount -e 192.168.1.77
  Export list for 192.168.1.77:
  /share/hdd/data 192.168.1.0/255.255.255.0

If you get a mount clntudp_create: RPC: Program not registered error then your unfsd daemon isn't running. If you get a mount clntudp_create: RPC: Port mapper failure - RPC: Unable to receive

to:
  1. From your client machine see if NFS is working correctly (use your NSLU IP address if it isn't the default):
    root@ttyp2[knoppix]$ showmount -e 192.168.1.77
    Export list for 192.168.1.77:
    /share/hdd/data 192.168.1.0/255.255.255.0

    If you get a
    mount clntudp_create: RPC: Program not registered error
    then your unfsd daemon isn't running.
    If you get a
    mount clntudp_create: RPC: Port mapper failure - RPC: Unable to receive\\
Changed line 38 from:

6. Create a mount point on your client if a suitable one doesn't already exist:

to:
  1. Create a mount point on your client if a suitable one doesn't already exist:\\
Changed lines 41-66 from:

7. Mount your NSLU2. Notice the mount options.

  root@ttyp2[knoppix]# mount -o vers=3,tcp,nolock,intr 192.168.1.77:/share/hdd/data /mnt/nslu2

The mount options used are:

  vers=3    <-- Use NFS version 3.           [required]
  tcp       <-- Use TCP networking.          [required]
  nolock    <-- Do not use NFS locking.      [required]
  intr      <-- Allow requests to be aborted [optional, recommended]

Your NFS client may already use some of these options by default. It never hurts to be sure though.

If you forget to use the nolock option then your mount request may completely hang without the mount being performed. This is because your client may expect the NLM lock manager to be running and will wait for a response from it.

Other tips:

1. When changing your exports file use the following to tell unfsd to reload it's database:

  # /opt/etc/init.d/S56unfsd

This also starts the daemon if (for some reason) it isn't already running. Doing this may be disruptive to transfers that are underway though NFS is generally designed to cope.

2. To start / restart the portmap service use

to:
  1. Mount your NSLU2. Notice the mount options.
    root@ttyp2[knoppix]# mount -o vers=3,tcp,nolock,intr 192.168.1.77:/share/hdd/data /mnt/nslu2

    The mount options used are:
    vers=3 <-- Use NFS version 3. [required]
    tcp <-- Use TCP networking. [required]
    nolock <-- Do not use NFS locking. [required]
    intr <-- Allow requests to be aborted [optional, recommended]

    Your NFS client may already use some of these options by default. It never hurts to be sure though.

    If you forget to use the nolock option then your mount request may completely hang without the mount being performed. This is because your client may expect the NLM lock manager to be running and will wait for a response from it.

Other tips:

  1. When changing your exports file use the following to tell unfsd to reload it's database:
    # /opt/etc/init.d/S56unfsd

    This also starts the daemon if (for some reason) it isn't already running. Doing this may be disruptive to transfers that are underway though NFS is generally designed to cope.
  2. To start / restart the portmap service use \\
Changed lines 64-66 from:

Exports file format:

to:

Exports file format:

Changed lines 69-81 from:

The {path to export} needs to be a valid path on your NSLU2. For example /share/hdd/data/public is a good place to start. If you are the only person with network access to your NSLU2 then you may use a simple / and your entire NSLU2 will be available. Use "quotes" around your path if it has "s p a c e s" in it.

If [client] is ommited then all clients are allowed access to mount. Use [client] to restrict mount access. Remember that NFSv3? uses "trusted hosts" rather than trusted users so the more clients, the more risk.

You can use either individual IP addresses, assuming you don't have DNS/hosts enabled, if you do you can use hostnames, or you can use subnet masking. e.g.

to:

The {path to export} needs to be a valid path on your NSLU2. For example /share/hdd/data/public is a good place to start. If you are the only person with network access to your NSLU2 then you may use a simple / and your entire NSLU2 will be available. Use "quotes" around your path if it has "s p a c e s" in it.

If [client] is ommited then all clients are allowed access to mount. Use [client] to restrict mount access. Remember that NFSv3? uses "trusted hosts" rather than trusted users so the more clients, the more risk.

You can use either individual IP addresses, assuming you don't have DNS/hosts enabled, if you do you can use hostnames, or you can use subnet masking. e.g.

Added line 78:
Added line 80:
Changed lines 87-88 from:

Example exports file:

to:

Example exports file:

Changed lines 95-104 from:

The first line allows the public folder to be used by anyone anywhere anyhow. Root is allowed, as is writing.

The second shares "my private stuff" just for a single host. Root is allowed, as is writing. Quotes are needed because of the spaces.

The third line is an export that is for the 192.168.1.x subnet only and is read-only because of the default options.

The forth line allows 192.168.1.100 read-write access and 1.2.3.4 read-only access. All other clients are denied access. Root is squashed in both cases because it is the default.

to:

The first line allows the public folder to be used by anyone anywhere anyhow. Root is allowed, as is writing.

The second shares "my private stuff" just for a single host. Root is allowed, as is writing. Quotes are needed because of the spaces.

The third line is an export that is for the 192.168.1.x subnet only and is read-only because of the default options.

The forth line allows 192.168.1.100 read-write access and 1.2.3.4 read-only access. All other clients are denied access. Root is squashed in both cases because it is the default.

April 16, 2005, at 10:46 PM by chrisc --
Changed lines 22-23 from:
  1197     root   5888    S    /opt/sbin/unfsd  
to:
  1197     root   5888    S    /opt/sbin/unfsd 

(I had to edit /etc/services and change nfsd to unfsd)

January 16, 2005, at 01:10 AM by TheSnark --
Changed line 12 from:
  # ln -s /etc/exports /share/hdd/conf/exports
to:
  # ln -s /share/hdd/conf/exports /etc/exports
January 15, 2005, at 06:36 PM by uSURPER --
Deleted lines 0-3:

Work in progress (i.e. not finished - not managed to mount yet...) Please don't touch this page: I'd like to finish it so I gain the knowledge too. Ta. Paul


Changed lines 36-82 from:

Doublecheck what ipkg files unfs installed to see where/what it put the S56 script. Does this get ran at boot?

to:

6. Create a mount point on your client if a suitable one doesn't already exist:

  root@ttyp2[knoppix]# mkdir -p /mnt/nslu2

7. Mount your NSLU2. Notice the mount options.

  root@ttyp2[knoppix]# mount -o vers=3,tcp,nolock,intr 192.168.1.77:/share/hdd/data /mnt/nslu2

The mount options used are:

  vers=3    <-- Use NFS version 3.           [required]
  tcp       <-- Use TCP networking.          [required]
  nolock    <-- Do not use NFS locking.      [required]
  intr      <-- Allow requests to be aborted [optional, recommended]

Your NFS client may already use some of these options by default. It never hurts to be sure though.

If you forget to use the nolock option then your mount request may completely hang without the mount being performed. This is because your client may expect the NLM lock manager to be running and will wait for a response from it.

Other tips:

1. When changing your exports file use the following to tell unfsd to reload it's database:

  # /opt/etc/init.d/S56unfsd

This also starts the daemon if (for some reason) it isn't already running. Doing this may be disruptive to transfers that are underway though NFS is generally designed to cope.

2. To start / restart the portmap service use

  # /opt/etc/init.d/S55portmap

Exports file format:

The exports file contains 1 or more of the following lines.

  {path to export} [[client][(client option, ...)] ...]

The {path to export} needs to be a valid path on your NSLU2. For example /share/hdd/data/public is a good place to start. If you are the only person with network access to your NSLU2 then you may use a simple / and your entire NSLU2 will be available. Use "quotes" around your path if it has "s p a c e s" in it.

If [client] is ommited then all clients are allowed access to mount. Use [client] to restrict mount access. Remember that NFSv3? uses "trusted hosts" rather than trusted users so the more clients, the more risk.

Changed lines 84-87 from:

No exportfs command installed :( unfs3 seems to support a -e with an exports file...

to:

You can use either individual IP addresses, assuming you don't have DNS/hosts enabled, if you do you can use hostnames, or you can use subnet masking. e.g.

  192.168.1.100              <--- this means just this one IP address
  192.168.1.0/255.255.255.0  <--- all IP addresses on the 192.168.1.x subnet
Changed lines 89-91 from:

When changing the exports file, either reboot or use the following to tell unfsd to reload it's database:

  ps -ef | grep unfsd
  kill -SIGHUP <pid returned from the output of grep>
to:

Additionally, use the [client options] section to further control access. Common options include:

  ro             <--- Only Read-only access allowed. This is the Default.
  rw             <--- Read-write access. 
  root_squash    <--- If a UID 0 is passed from the client, remap to nobody (65534). Default.
  no_root_squash <--- Allow a UID 0 to be treated as the user root.
  all_squash     <--- All users are treaded as UID nobody (65534).
Added line 98:

Example exports file:

Changed lines 100-103 from:
  /share/hdd/data 192.168.1.0/255.255.255.0(rw,no_root_squash)
to:
  /share/hdd/data/public (rw,no_root_squash)
  "/share/hdd/data/my private stuff" 192.168.1.100(rw,no_root_squash)
  /share/hdd/data/localnetreadonly 192.168.1.0/255.255.255.0
  /share/hdd/data/temp 192.168.1.100(rw) 1.2.3.4(ro)
Added lines 105-106:

The first line allows the public folder to be used by anyone anywhere anyhow. Root is allowed, as is writing.

Changed lines 108-109 from:
  mkdir /mnt/nslu2
  mount -o vers=3,tcp,nolock,intr 192.168.1.77:/share/hdd/data /mnt/nslu2
to:

The second shares "my private stuff" just for a single host. Root is allowed, as is writing. Quotes are needed because of the spaces.

Changed lines 111-113 from:

Known limitations of unfs3:

  locking support
  performance?
to:

The third line is an export that is for the 192.168.1.x subnet only and is read-only because of the default options.

Changed lines 114-115 from:

check norootsquash, special mount options (nolock)


to:

The forth line allows 192.168.1.100 read-write access and 1.2.3.4 read-only access. All other clients are denied access. Root is squashed in both cases because it is the default.

January 15, 2005, at 04:23 PM by uSURPER --
Changed line 14 from:
  # vi /share/hdd/conf/exports 
to:
  # vi /share/hdd/conf/exports 
Changed lines 22-27 from:

4. Check your log file to see if there was an error. If you get no output then everything should is running.

  # grep unfsd /var/log/messages
  #

5. Check that the unfds and portmap daemons are running.

to:

4. Check that the unfds and portmap daemons are running.

Changed lines 28-29 from:

6. From your client machine see if NFS is working correctly (use your NSLU IP address if it isn't the default):

  [knoppix 3.17] showmount -e 192.168.1.77
to:

5. From your client machine see if NFS is working correctly (use your NSLU IP address if it isn't the default):

  root@ttyp2[knoppix]$ showmount -e 192.168.1.77
Changed lines 33-38 from:

If you get an rpc mount export error then your unfsd daemon isn't running. If you get a Port mapper failure then your portmap daemon isn't running or you've used the wrong IP address in your showmount.

to:

If you get a mount clntudp_create: RPC: Program not registered error then your unfsd daemon isn't running. If you get a mount clntudp_create: RPC: Port mapper failure - RPC: Unable to receive then your portmap daemon isn't running or you've used the wrong IP address in your showmount command.

January 15, 2005, at 04:12 PM by uSURPER --
Changed lines 13-16 from:

2. Create an /etc/exports file. The format of this is below. [Does this survive a reboot? a re-flash?]

to:

2. Create an /share/hdd/conf/exports file and link into the correct place. The format of the exports file is below.

  # vi /share/hdd/conf/exports 
  Type in your exports and save. Or use your favourite editor.
  # ln -s /etc/exports /share/hdd/conf/exports
Added line 25:
  #
Added line 29:
  1118     bin    1216    S    /opt/sbin/portmap
Added line 31:
  1197     root   5888    S    /opt/sbin/unfsd  
January 15, 2005, at 09:54 AM by uSURPER --
Added lines 6-8:

If you are going to use NFS and you aren't already familiar on how to use NFS via Linux or other hosts, then you should probably spend time Googling etc. Familiarity with Linux networking, processes, daemons etc is assumed.

Changed lines 11-13 from:
  1. telnet to your NSLU2.
to:

1. telnet / ssh to your NSLU2.

2. Create an /etc/exports file. The format of this is below. [Does this survive a reboot? a re-flash?]

Changed lines 15-17 from:
  1. ipkg install portmap This installs the "helper" for NFS so it can register networking.
to:

3. Install a portmapper and the UNFS daemon:

  # ipkg install portmap
  # ipkg install unfs3
Changed lines 19-21 from:

[technically can run without portmapper but some Linux get upset if they can't see a mapper]

to:

4. Check your log file to see if there was an error. If you get no output then everything should is running.

  # grep unfsd /var/log/messages
Changed lines 23-25 from:
  1. ipkg install unfs3 <--- installs the NFS daemon itself
to:

5. Check that the unfds and portmap daemons are running.

  # ps -ef | grep unfsd | grep -v grep
  # ps -ef | grep portmap | grep -v grep
Changed lines 27-30 from:

vi your export file somewhere

to:

6. From your client machine see if NFS is working correctly (use your NSLU IP address if it isn't the default):

  [knoppix 3.17] showmount -e 192.168.1.77
  Export list for 192.168.1.77:
  /share/hdd/data 192.168.1.0/255.255.255.0
Changed line 32 from:

Change your unslung/xinetd to run unfsd -e exportfile __or__

to:

If you get an rpc mount export error then your unfsd daemon isn't running. If you get a Port mapper failure then your portmap daemon isn't running or you've used the wrong IP address in your showmount.

January 14, 2005, at 06:54 PM by uSURPER --
Added lines 31-34:
  mkdir /mnt/nslu2
  mount -o vers=3,tcp,nolock,intr 192.168.1.77:/share/hdd/data /mnt/nslu2
January 14, 2005, at 06:53 PM by uSURPER --
Changed line 6 from:

You can install native NFS version 3 support into your uNSLUng NSLU2 via the following process:

to:

You can install "native" NFS version 3 support into your uNSLUng NSLU2 via the following process:

Changed lines 24-35 from:

check norootsquash

to:

When changing the exports file, either reboot or use the following to tell unfsd to reload it's database:

  ps -ef | grep unfsd
  kill -SIGHUP <pid returned from the output of grep>

/etc/exports

  /share/hdd/data 192.168.1.0/255.255.255.0(rw,no_root_squash)

Known limitations of unfs3:

  locking support
  performance?

check norootsquash, special mount options (nolock)

January 14, 2005, at 04:00 PM by uSURPER --
Changed lines 5-6 from:

Assumption: only care about NFSv3?.

to:

uNSLUng on the NSLU2 supports NFS via user installed packages. You can install native NFS version 3 support into your uNSLUng NSLU2 via the following process:

Changed lines 8-10 from:

ipkg install portmap <--- installs the "helper" for NFS so it can register networking

to:
  1. telnet to your NSLU2.
  2. ipkg install portmap This installs the "helper" for NFS so it can register networking.
Changed line 14 from:

ipkg install unfs3 <--- installs the NFS daemon itself

to:
  1. ipkg install unfs3 <--- installs the NFS daemon itself
January 14, 2005, at 09:28 AM by uSURPER --
Added lines 9-10:

[technically can run without portmapper but some Linux get upset if they can't see a mapper]

Changed lines 13-17 from:

[technically can run without portmapper but some Linux get upset if they can't see a mapper]

to:

vi your export file somewhere

Change your unslung/xinetd to run unfsd -e exportfile __or__

Doublecheck what ipkg files unfs installed to see where/what it put the S56 script. Does this get ran at boot?

January 14, 2005, at 09:26 AM by uSURPER --
Added line 2:

Please don't touch this page: I'd like to finish it so I gain the knowledge too. Ta. Paul

Added line 4:

Added line 8:
Added line 16:

January 14, 2005, at 09:19 AM by uSURPER --
Changed lines 1-12 from:

Describe InstallNFSV3? here.

to:

Work in progress (i.e. not finished - not managed to mount yet...)

Assumption: only care about NFSv3?.

ipkg install portmap <--- installs the "helper" for NFS so it can register networking ipkg install unfs3 <--- installs the NFS daemon itself

[technically can run without portmapper but some Linux get upset if they can't see a mapper]

No exportfs command installed :( unfs3 seems to support a -e with an exports file...

check norootsquash

view · edit · print · history · Last edited by JamesCC.
Based on work by tman, chrisc, TheSnark, and uSURPER.
Originally by uSURPER.
Page last modified on November 16, 2006, at 01:33 AM