logo.png

CVS

MAKEFILE

TFTP

NFS

DHCP

CORBA

RPM


Pince à sertir

Serveur de boot

Poste client

Switchs labo

Home Up


Contents



1 Introduction

Chacun des noyaux (associé à une caméra) va monter son propre système de fichier racine via NFS. Les home de chacun des utilisateurs seront également montés via NFS sur chaque partition racine.

Il y a 2 cathégories de montages répartis sur 2 servers NFS:

  • n1n3 répertoires homes des utilisateurs
  • n1n9 partitions racine des cartes embarquées


2 n1n3 : serveur home

Partitions exportées : cf /etc/exports

  • /data
  • /diske
  • /diskf
  • /home


3 n1n9 : serveur des partitions racines

  • Partitions exportées : cf /etc/exports
    /opt/sugarhat/devkit/target *(rw,no_root_squash,no_all_squash)
    /opt/sugarhat/devkit/target18 *(rw,no_root_squash,no_all_squash)
    /opt/sugarhat/devkit/target19 *(rw,no_root_squash,no_all_squash)
    /opt/sugarhat/devkit/target17 *(rw,no_root_squash,no_all_squash)
    #/opt/sugarhat/devkit/target8 *(rw,no_root_squash,no_all_squash)
    /opt/CES/devkit/target8 *(rw,no_root_squash,no_all_squash)
    /opt/sugarhat/devkit/target9 *(rw,no_root_squash,no_all_squash)
    

  • Les partitions racines sont rangés à l'aide de liens symboliques :
    $ ls -l /opt/CES/devkit
    ...
    target12 -> eldk/ppc_74xx_20080904_patched_c12
    ...
    
    Attention : changer lien symboliques ne suffit pas pour modifier la partition exportée.
    # tail /var/log/messages
    May 27 16:13:25 n1n9 mountd[28107]: refused mount request from 192.168.1.162 \ 
    for /data/CES/shl-3.2.1/eldk-4.0/ppc_74xx_20080904_c12_rpm (/): not exported
    

  • Prise en compte des modifications :
    # /etc/init.d/nfs reload
    

  • Vérification :
    # /usr/sbin/exportfs
    /data/CES/shl-3.2.1/eldk-4.0/ppc_74xx_20080904_patched_c18
                    <world>
    /data/CES/shl-3.2.1/eldk-4.0/ppc_74xx_20080904_patched_c17
                    <world>
    /data/CES/shl-3.2.1/eldk-4.0/ppc_74xx_20080904_patched_c13
                    <world>
    /data/CES/shl-3.2.1/eldk-4.0/ppc_74xx_20090217_c19
                    <world>
    /data/CES/shl-3.2.1/eldk-4.0/ppc_74xx_20090217
                    <world>
    /data/CES/shl-3.2.1/eldk-4.0/ppc_74xx_nroche
    

  • Attention à conserver les droits d'accès aux fichier si vous duppliquez une partition racine.
    # cp -Rp ppc_74xx_20080904_patched_c12 ppc_74xx_c12_test
    

  • Cf le script de Richard : n1n9:/data/CESmake_clone_target.sh.
    #!/bin/bash
    cd /opt/CES/devkit/eldk || exit 1
    LIST='17 18 19'
    [ $# -ne 0 ] && {
            LIST="$*"
    }
    for camera in $LIST; do
            source=$(file ppc_74xx | awk -F'to' '{print $2}' | sed -e "s/'//" -e 's/ `//')
            [ -d $source ] || break
            if [ ! -d ${source}_c$camera ]; then
                    echo "Copying $source .. ${source}_c$camera"
                    cp -af $source ${source}_c$camera
                    echo "Linking ${source}_c$camera --> ../target$camera"
                    rm -f ../target$camera 2>/dev/null
                    ln -s /opt/CES/devkit/eldk/${source}_c$camera /opt/CES/devkit/target$camera
            else
                    echo "Rsync-ing $source/ .. ${source}_c$camera/"
                    rsync -auv $source/ ${source}_c$camera/
            fi
            grep "target$camera" /etc/exports || {
                    echo "/opt/sugarhat/devkit/target$camera *(rw,no_root_squash,no_all_squash)" \
                    >> /etc/exports
            }
    done
    /etc/init.d/nfs reload
    showmount -e localhost
    


4 Import des homes sur n1n9


5 Import des homes sur les cartes processeur

Ajout du /home personnel sur la caméra camera19
  • fichier /opt/CES/target16/etc/fstab.local:
    none                            /dev/pts        devpts  defaults        0 0
    192.168.1.3:/home/huppert       /home/huppert   nfs     defaults        0 0
    192.168.1.3:/home/panazol       /home/panazol   nfs     defaults        0 0
    192.168.1.3:/home/hess          /home/hess      nfs     defaults        0 0 
    192.168.1.3:/home/vincentp      /home/vincentp  nfs     defaults        0 0
    192.168.1.3:/home/camera        /home/camera    nfs     defaults        0 0
    192.168.1.3:/home/guevara       /home/guevara   nfs     defaults        0 0
    192.168.1.3:/home/roche         /home/roche     nfs     defaults        0 0
    192.168.1.3:/home/tavernet      /home/tavernet  nfs     defaults        0 0
    192.168.1.3:/home/bigcamera_64bits /home/bigcamera  nfs defaults        0 0
    

  • fichier /opt/CES/target16/etc/passwd:
    ...
    guevara::10147:220::/home/guevara:/bin/bash
    roche::10148:220::/home/roche:/bin/bash
    tavernet::225:220::/home/tavernet:/bin/bash
    bigcamera::10149:220::/home/bigcamera:/bin/bash
    

  • créer le répertoire utilisateur :
    # mkdir /opt/CES/target16/home/roche
    # chown roche.hess /opt/CES/target16/home/roche
    

  • redémarer le démon netfs sur la carte processeur afin de générer le nouveau fichier fstab (en fait ça ne marche pas, il faut rebooter)
    camera16:~# /etc/init.d/netfs reload
    

  • c'est tout
    $ telnet -l roche camera16
    


6 Import des partitions racines

La carte cliente est configuré à l'aide de les commandes set inet et set boot afin de pointer sur le serveur TFSP.

procmon> set boot_device
le                                # local ethernet

procmon> set boot_rootfs
nfs                               # mount NFS root filesystem

procmon> set boot_rootfs
nfs

procmon> show inet_mount
192.168.1.9:/opt/CES/devkit/target8

A priori, il s'agit là d'un moyen de spécifier les paramètres NFS au noyau. Celà revient je pense à modifier la ligne de commande boot_line en s'inspirant de la documentation du noyau linux (Documentation/nfsroot.txt.

Home Up

This document is also available in PDF and PostScript format.



2016-02-15