SUMMARY:Export /cdrom on SunOs 4.1.3

From: Lau, Victoria H (vlau@msmail2.hac.com)
Date: Tue Jun 11 1996 - 15:43:38 CDT


Thank you, everybody, for your great support.

Original question:
=================
I need to export the cdrom from a source node to a target node both running
SunOS 4.1.3.

On the source node, I mounted the cd and exported it:
  # mount -rt hsfs /dev/sr3 /cdrom
  # echo /cdrom >> /etc/exports
  # exportfs -v /cdrom
  exportfs: /cdrom: Read-only file system

A glance at the /etc/mtab showed the following:
  /dev/sr3 /cdrom hsfs ro,dev=91fe 1 2

But /etc/xtab showed nothing. I also tried to use "exportfs -o ro /cdrom"
with the same result.

On the target node, I wanted to mount etcm2:/cdrom on /cdrom mount point:
  # mkdir /cdrom
  # mount etcm2:/cdrom /cdrom
  mount: Access denied for etcm:/cdrom
  mount: Giving up on:
    /cdrom

I don't think I ever exported the cdrom from the source node as I'd tried
mounting it from another host and getting the same negative response. Could
someone please review my steps and point out to me what I'd missed?

Solution:
========
In the /etc/exports file in the Source Node, enter:

  /cdrom -ro

Variation of responses which I'm sure are all correct. I'm listing them all
here as they are such good hints on troubleshooting, just in case the above
does not work on some systems:
===============================================================================
VENKATA RAMAKRISHNA R:
In the file /etc/exports the entry for cdrom should look like "/cdrom -ro".

GLENN SATCHELLl:
In /etc/exports you need:
  /cdrom -ro
When you run exportfs to list the exported directories it must show the
cdrom as read-only.
Once you have the cdrom exported correctly then on the target system
you must also mount read-only, eg:
  mount -r etcm2:/cdrom /cdrom

KEVIN W. THOMAS:
My /etc/exports file looks like:
  /cdrom -access=sun4net,ro
where "sun4net" is a netgroup.
I export with "exportfs -a".
You can't mount something that failed to export. Also, you need to do a
"mount -r" since it is a read only device.
You may have to modify /etc/rc.local on the system with the CDROM. Look at
the file at the section that starts with:
  if [ -f /etc/exports ]; then
You will need to uncomment out that section. If you have to do it, reboot
your
workstation.
You may need to reconfigure your kernel to export. You need to have
"options NFSSERVER" enabled.

MATT HILL:
try putting (ro) after the entry /cdrom in /etc/exports. or better
yet, try putting the name of the target node immediately after
/cdrom, followed by (ro) to allow exporting read-only to that one
machine. then run exportfs.

KEN C. GAUTHIER:
your initial entry into exports should have included the ro option.
you may have to unexport the cdrom and then exec
  exportfs -o ro /cdrom
if this is the only exported file system, you will have to start nfsd
and rpc.mountd; rebooting will do this as long as you have the proper
entry in exports "/cdrom -ro"

CHAN T. CAO:
echo -ro /cdrom >> /etc/exports

MARCEL CHUKWUNENYE:
Delete the cdrom entry from your /etc/export & try something like this :
# echo "cdrom -ro" >> /etc/exports or
# echo "cdrom -ro -root=your_host_that_needs_root_access" >> /etc/exports
# exportfs -a
# exportfs (to see what is exported and how it is exported.)

THANG VICTOR DINH:
/cdrom -ro,anon=0
in your /etc/exports file (Note: anon=0 is security NO NO)

MARTIN ESPINOZA:
Your error lies in your exports file entry.
  # echo '/cdrom -ro' >> /etc/exports
This will let NFS know it's readonly. Then you can do an exportfs -v /cdrom.

JOHN MENDENHALL:
/cdrom -ro

CLAUS ASSMANN:
exportfs -v -i -o ro /cdrom
As long as it gives an error message, you can't mount it anywhere else.
  showmount -e
should list /cdrom

MARCUS PLESS:
I have found that adding an option or two in the /etc/exports file
solves this problem. My entries usually look something like
  /cdrom -root=hostname,ro
If you really do want to export to everyone, you probably need
  /cdrom -ro
Also, make sure you have several nfs daemons running.

DAVID H. BRIERLEY:
You need to export the file system in read-only mode. This can be done by
adding the "-ro" option to the entry in the /etc/exports file or by using
the "-o ro" option on the command line for exportfs.

ROBERT GILLESPIE:
ADD THESE TO YOUR fstab on CDROM_HOST
  /dev/sr0 /cdrom hsfs ro,noauto 0 0
  #/dev/sr0 /cdrom 4.2 ro,noauto 0 0
oak{rob}% cat /etc/exports
/var/spool/pcnfs
/usr/newsprint
/cdrom -ro <<<<<< -ro option
/home

mount -v /cdrom
                IF problem then REVERSE lines in /etc/fstab
                to pick up 4.2 NOT HSFS
IE change to:-
  #/dev/sr0 /cdrom hsfs ro,noauto 0 0
  /dev/sr0 /cdrom 4.2 ro,noauto 0 0
exportfs -a
rsh to REMOTE
mount -v CDROM_HOST:/cdrom /cdrom

DANNY JOHNSON:
your export failed because you did not specify "-ro"
as an export option, which kept all later steps from working.

ANCHI ZHANG:
# echo /cdrom -ro >> /etc/exports

NIKOS GEORGE:
Did you try mount -t nfs etcm2:/cdrom /cdrom ??

PATRICK NOLAN:
/cdrom -ro,access=egretgrp
(egretgrp is a netgroup name.)

If I missed anyone's replies, please forgive me.

Thank you all!

Vicky Lau
vlau@msmail2.hac.com



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:01 CDT