Next Previous Contents

11. The cdrom nfs server side

This section describes how to mount and export via NFS a cdrom drive.

Mount the cdrom. If you encounter a problem with your cdrom drive, read the CDROM-HOWTO. I assume that the cdrom device is /dev/hdd but it could be /dev/sr0 or /dev/hdb etc. The mount point I choose is /cdrom but you can choose the one you want:

     $ mount -t iso9660 /dev/hdd  /cdrom
    

You have to set up nfs services. If something goes wrong, read the NFS-HOWTO

Verify your kernel supports nfs:

     $ cat /proc/filesystems 
             ext2
     nodev   proc
     nodev   nfs
     nodev   ncpfs
     nodev   devpts
             iso9660
    

Verify your portmapper can handle mountd and nfs client requests:

     $ rpcinfo -p
     program vers proto   port
     100000    2   tcp    111  portmapper
     100000    2   udp    111  portmapper
     100005    1   udp    655  mountd
     100005    1   tcp    657  mountd
     100003    2   udp   2049  nfs
     100003    2   tcp   2049  nfs
    

Lines with nfs or portmapper have to be there. We have NFS on tcp? progress have been made!

It doesn't matter if you have only NFS on udp. NFS has to work, that's the thing you need.

Then, rerun portmap, mountd, nfs:

     $ /etc/rc.d/init.d/portmap.init stop
     Stopping INET services: portmap 

     $ /etc/rc.d/init.d/portmap.init start
     Starting portmapper: portmap

     $ /etc/rc.d/init.d/nfs stop
     Shutting down NFS services: rpc.mountd rpc.nfsd 

     $ /etc/rc.d/init.d/nfs start
     Starting NFS services: rpc.mountd rpc.nfsd 
    

/etc/rc.d/init.d/ is /sbin/init.d/ on SuSE Linux systems. I had a dream last night: LSB was respected. (LDB: Linux Standard Base)

Then, try to mount it "locally" (via nfs) on the source box and when the test is good remove the test directory:

     $ mkdir /tmp/nfstest
     $ mount -t nfs source:/cdrom /tmp/nfstest
     $ ls  /tmp/nfstest/
     README             debian/            locatedb.3         tools/
     TRANS.TBL          ftp.netscape.com/  ls_lR.3            upgrade/
     boot/              install/           realaudio/
     
     $ echo great stuff !
     $ umount /tmp/nfstest
     $ rmdir /tmp/nfstest
     

Bad luck ? Read the NFS-HOWTO and /var/log/messages.

Check the nfs server with those commands:

     $ rpcinfo -p
     

Run portmap with the -v flag:

      $ portmap -v
     

kill portmap, mountd, nfsd and rerun them in this order: portmap, mountd, nfsd. Take a rest, get more coffee. Read again the NFS-HOWTO and restart.

Now, the exported cdrom drive nfs server is ready to work. Congratulations.


Next Previous Contents