[ Date Index ][
Thread Index ]
[ <= Previous by date /
thread ]
[ Next by date /
thread => ]
On Tuesday 08 January 2002 12:30 am, you wrote:
Neil Williams wrote:I've been toying with NFS and I'm confused on NFS and removable drives:Stop thinking in terms of mount points and directories.... think inodes and file handles, and filesystems. You don't export /export/share (inode XXXX, filesystem 1) you mount something onto /export/share (i.e. filesystem 2) and export (inode YYYY, filesystem 2). Thus you can only share a filesystem after it is mounted, and you have to unmount to unload CD normally even if it happens by magic. Export before mount and people see inode XXXX, filesystem 1, which is hopefully an empty directory (oops - I meant inode list of other inodes).
Thanks to the How-to that Alex mentioned, I've got it working. To eject a CD on the server when the filesystem on that CD is mounted on the client via NFS I now use: (as ordinary user on the client, 192.168.0.1) umount /mnt/servercd Then: (as root on the NFS server) exportfs -u 192.168.0.1:/mnt/cdrom eject And eject deals with the umount /mnt/cdrom. The client /etc/fstab contains: server:/mnt/cdrom /mnt/servercd nfs user,ro,soft,nosuid 0 0 (so it can be mounted at boot but more likely by a user once the CD is inserted into the server drive.) On the server, I use /etc/hosts.deny - ALL : ALL : (/usr/sbin/safe_finger -l @%h | /bin/mail -s %d-%h root) & /etc/hosts.allow - ALL : 192.168.0.1 LOCAL /etc/exports - /mnt/cdrom 192.168.0.1(ro,all_squash) The safe_finger booby trap in hosts.deny I picked up from the man hosts.allow page. Any attempt to connect from outside the allowed area results in a) denial b) an email to the root account of the server. It may never be used (it certainly shouldn't if I've got my iptables right) but it's worth trying! Even if the denied connection was made from a machine not running finger, at least I'll still have a log of the attempt. The filesystem isn't mounted on the client unless it's already mounted on the server, so the CD needs to be put in and mount /mnt/cdrom run on the server before the mount /mnt/servercd command will function on the client. Now to get it implemented on the rest of the LAN! -- Neil Williams ============= http://www.codehelp.co.uk neil@xxxxxxxxxxxxxx linux@xxxxxxxxxxxxxx neil@xxxxxxxxxxxx -- The Mailing List for the Devon & Cornwall LUG Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the message body to unsubscribe.