*BSD News Article 45963


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.sprintlink.net!cs.utexas.edu!news.cs.utah.edu!news.cc.utah.edu!news.caldera.com!park.uvsc.edu!usenet
From: Terry Lambert <terry@cs.weber.edu>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Suggestion for 2.1
Date: 24 Jun 1995 11:13:10 GMT
Organization: Utah Valley State College, Orem, Utah
Lines: 78
Message-ID: <3sgs06$hb6@park.uvsc.edu>
References: <3r7888$280@germany.eu.net> <3s7h66$j4l@iii1.iii.net> <3s8qj7$meh@bonnie.tcd-dresden.de> <3saqif$lrc@news.bu.edu> <3sc8l9$2ar@bonnie.tcd-dresden.de> <3sfj2q$q62@news.bu.edu>
NNTP-Posting-Host: hecate.artisoft.com

mi@cs.bu.edu (Mikhail Teterin) wrote:
]
] Some time ago (22 Jun 1995 19:18:33 +0200) honorable J Wunsch, 
] residing at j@bonnie.heep.sax.de wrote:
] |Mikhail Teterin <mi@cs.bu.edu> wrote:
] 
] |DOS does no ``mounting on demand'', it does no mounting at all.
] 
] |What are you thinking of?  Please elaborate on it...
] 
] Sorry, being a user (hopefully a "sofisticated" one (-: )I may only
] say, that in dos I can just insert a floppy and say 'a:' ... So, in FreeBSD,
] that may look like: "I insert a floppy and say 'cd /diska'". I realize,
] that this will be absolutely out of Unix traditions, and will make trouble
] with Unix partitioned floppies, but there is definelty something to be done.

This can be accomplishe one of two ways:

1)	Mounting under UNIX is a two part abstraction.  So it
	is with the flavors of BSD, including FreeBSD.  The
	first part is that you have to have a place to "put"
	the mounted volume.  In DOS, this would be the next
	available drive letter.  In BSD, it is the "covered"
	inode.  So you need to mount and unmount to "cover"
	and "uncover" an inode somewhere in your file system
	heirarchy.  If you want to think of it in this way,
	each DOS drive is a UNIX "root" directory.

	The second part is that in order to get higher
	performance from the drive than you will ever see under
	DOS (but not Win95; it has VCACHE), a typical UNIX (or
	BSD) box will keep copies of pieces of what has been
	read off the disk or is about to be written to the disk
	in memory.  You have to unmount to make sure everything
	is written out.

	So the first way would be to assign "premounted" locations
	for the floppy and throw away your disk cache.  This is
	actually possible in SunOS on SPARC machines, since the
	DOSFS under SunOS is stupid and doesn't cache.  The
	problem left there is to overcome the Macintosh-type
	floppy eject without dismounting the disk.  To do that,
	you have to write your own eject command (just an open,
	an ioctl, and a close of the floppy device).

	To do all this under FreeBSD would be a lot of work.


2)	You can run a program to do the work for you as part of
	a loopback mount via NFS and using a symbolic link.

	This is more complicated than it sounds.

	Basically, you run a program called "amd" (automounter
	daemon) and it will do it for you if you have it set
	up correctly.

	The amd program is in the "ports" collection and installs
	using pkg_add, just like the other packages.

	I believe removable media (like floppies) is covered in
	the README/install instructions as one of the examples.

	If not, this issue was recently discussed for CDROMS on
	the hackers list... you can get at the list archive in
	NetScape (or other browser) from http://WWW.FreeBSD.ORG
	...it has a searchable database, look for "CDROM".


	One caveat to this approach: make sure you "cd" out of
	the directory before pulling out the diskette/CD ROM.


                                        Terry Lambert
                                        terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.