Difference between revisions of "Network File System configuration"

From ArmadeusWiki
Jump to: navigation, search
m
(NFS server on your devt Host)
Line 3: Line 3:
 
On this page, you will find usefull informations to configure your Host or Target network
 
On this page, you will find usefull informations to configure your Host or Target network
  
==NFS server on your devt Host==
+
==NFS server on your development Host==
  
 
===Installation===
 
===Installation===
Line 9: Line 9:
 
* On Ubuntu/Kubuntu:
 
* On Ubuntu/Kubuntu:
 
  $ sudo apt-get install nfs-user-server
 
  $ sudo apt-get install nfs-user-server
or if you prefer;
+
or if you prefer:
 
  $ sudo apt-get install nfs-kernel-server
 
  $ sudo apt-get install nfs-kernel-server
  
 
===Configuration===
 
===Configuration===
 +
====/etc/exports====
 
You have to configure the directory where you will store the files you want to share accross the network.
 
You have to configure the directory where you will store the files you want to share accross the network.
 
For that you have to modify the '''/etc/exports''' file (for example):
 
For that you have to modify the '''/etc/exports''' file (for example):
Line 19: Line 20:
 
(In that case your Host will authorize all client from the subnet 192.168.*.* to access /local/export in read only mode)
 
(In that case your Host will authorize all client from the subnet 192.168.*.* to access /local/export in read only mode)
  
Then restart your NFS server:
+
====Restart of NFS server====
* On Fedora:
+
* '''On Fedora:'''
 
  # /sbin/service nfs restart
 
  # /sbin/service nfs restart
 
Next time you boot, you can check your NFS server status with:
 
Next time you boot, you can check your NFS server status with:
Line 27: Line 28:
 
  # /sbin/service nfs start
 
  # /sbin/service nfs start
  
* On Ubuntu/Kubuntu:
+
* '''On Ubuntu/Kubuntu:'''
 
  $ sudo /etc/init.d/nfs-user-server restart
 
  $ sudo /etc/init.d/nfs-user-server restart
 
or
 
or
Line 34: Line 35:
 
System Settings->System services
 
System Settings->System services
  
* On OpenSUSE
+
* '''On OpenSUSE'''
 
  # /etc/init.d/nfsserver restart
 
  # /etc/init.d/nfsserver restart
  

Revision as of 21:32, 1 May 2008

Introduction

On this page, you will find usefull informations to configure your Host or Target network

NFS server on your development Host

Installation

  • On Fedora, NFS is part of your distribution so you normally don't need to install it.
  • On Ubuntu/Kubuntu:
$ sudo apt-get install nfs-user-server

or if you prefer:

$ sudo apt-get install nfs-kernel-server

Configuration

/etc/exports

You have to configure the directory where you will store the files you want to share accross the network. For that you have to modify the /etc/exports file (for example):

# Directory for Armadeus:
/local/export     192.168.0.0/255.255.0.0(ro,no_root_squash,sync)

(In that case your Host will authorize all client from the subnet 192.168.*.* to access /local/export in read only mode)

Restart of NFS server

  • On Fedora:
# /sbin/service nfs restart

Next time you boot, you can check your NFS server status with:

# /sbin/service nfs status

and if not started then:

# /sbin/service nfs start
  • On Ubuntu/Kubuntu:
$ sudo /etc/init.d/nfs-user-server restart

or

$ sudo /etc/init.d/nfs-kernel-server restart

Next time you boot, you can check your NFS server status with: System Settings->System services

  • On OpenSUSE
# /etc/init.d/nfsserver restart

On your Armadeus target:

Mount the NFS partition manually

  • create a mount point (for example):
# mkdir -p /mnt/host
  • mount it (for example):
# mount -t nfs 192.168.0.2:/local/export /mnt/host

If 192.168.0.2 is your Host IP address and /local/export the name of your Host directory you want to mount.

How to mount the NFS partition automatically at each boot

  • be sure to have the latest available software (>=armadeus2.0 or latest SVN)
  • login to your Armadeus board as root
  • open file /etc/fstab and add this line:
<host-ip>:/<path-to-shared-folder> /mnt/<path-to-mount-folder> nfs hard,intr,rsize=8192,wsize=8192 0 0

example:

192.168.0.2:/local/export /mnt/host nfs hard,intr,rsize=8192,wsize=8192 0 0
  • check your modification:
mount /mnt/host
  • reboot your board
reboot
  • and enjoy the result
# df
# ls /mnt/host

When you have a problem: verify that the NFS server is running on the host:

$ /sbin/service nfs status

Summary of the required Packages:

  • portmap (buildroot)
  • nfs (busybox)
  • nfs support (linux)

Troubleshooting:

  • 1] If nfsd and mountd daemon are not running on your Host, then you will get a message like:
# mount: RPC: Program not registered

In that case, restart the NFS service on your Host (see above)

  • 2] To successfully mount a NFS drive, portmap daemon should be running on your target, if not system will hang during some minutes when you launch the mount !!

To check if portmap is running, look at the running processes:

# ps faux

If portmap is not listed, then launch it manually:

# /etc/init.d/S14portmap

TFTP Server under Windows:

For those who want to transfer some files from Windows (kernel image / root fs), a small and FREE tftp server is available here: http://tftpd32.jounin.net/

  • To copy a file (test.png) from the host (192.168.0.3) to the target use this command:
# tftp -g -r test.png 192.168.0.3

NFS Server under Windows:

For those who want to use the NFS service on Windows, a small and FREE NFS server is available here: http://www.freedownloadscenter.com/Utilities/Misc__Utilities/nfsAxe.html

Links


FrenchFlag.png Page en français