lkml.org 
[lkml]   [2000]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectreexporting a removable media through NFS
Hi!

How can I reexport a mount point through NFS without causing too much
surprise to the users? The mount point contains a removable media
which can be removed anytime since it is not locked and the gui user
can work the same way as in front of a Windows machine. The system is
Red Hat 6.2, upgraded to 2.2.16-3 (+ide-patch +reiserfs) and
nfs-utils-0.1.9.1.

The old user space nfsd and mountd may have been given a "--reexport"
option and it was done.

With the above config, I tried this, at first only on localhost.

etc/exports:

/mnt/cdrom localhost(ro,o_root_squash[,no_subtree_check])

I tried this:

# /etc/rc.d/init.d/nfs start
# /etc/rc.d/init.d/nfslock start
# mount -t nfs localhost:/mnt/cdrom /mnt/XXX
# mount /mnt/cdrom
# ls /mnt/cdrom /mnt/XXX

The content of the CD is visible under /mnt/cdrom, /mnt/XXX is empty.

# umount /mnt/XXX
# mount -t nfs localhost:/mnt/cdrom /mnt/XXX
mount: localhost:/mnt/cdrom failed, reason given by server: Permission
denied
# umount /mnt/cdrom
# /etc/rc.d/init.d/nfs stop
# /etc/rc.d/init.d/nfslock stop
# mount /mnt/cdrom
# /etc/rc.d/init.d/nfs start
# /etc/rc.d/init.d/nfslock start
# mount -t nfs localhost:/mnt/cdrom /mnt/XXX
# ls /mnt/cdrom /mnt/XXX

The content of the CD is visible under /mnt/XXX, too.

# umount /mnt/cdrom
umount: /mnt/cdrom: device is busy
# umount /mnt/XXX
# umount /mnt/cdrom
umount: /mnt/cdrom: device is busy

This happens until "/etc/rc.d/init.d/nfs stop"

The "unhide" option does not seem to work, maybe it is not relevant.

With manual eject,

# ls /mnt/cdrom /mnt/XXX

shows both directory empty if the "no_subtree_check" is not given.
If it is, then /mnt/XXX shows the old directory content.
If I put back the CD then the next

# ls /mnt/cdrom /mnt/XXX

shows again the content of the CD in both directories.
But when I put in another CD then

# ls /mnt/cdrom /mnt/XXX

shows either garbage or nothing under /mnt/cdrom and the same under
/mnt/XXX (no_subtree_check is not given) or the previous content
(no_subtree_check is given). I have to umount /mnt/XXX, stop nfs and
kill gmc to be able to mount the CD again.

This procedure worked the same with the stock (0.1.6) nfs-utils.

Can someone help? The user would like to be able to umount /mnt/cdrom
or manually eject the CD from under the reexport and insert another
and see the new content (almost) instantly on another machine.
Is is solvable with 2.2.x?

Regards,
Zoltan Boszormenyi


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.074 / U:2.040 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site