[CentOS] Re: Reformatting a USB drive

Fri May 25 18:04:42 UTC 2007
Scott Silva <ssilva at sgvwater.com>

Todd Cary spake the following on 5/24/2007 8:54 PM:
> Jim et al -
> 
> << Very likely it created a directory named usbdisk in /media, and sync'd
> the files there. If you plug something in with a label of 'usbdisk',
> it'll get mounted there, and hide the existence of the files
> underneath. >>
> So, the question for me is how does Linux know if there is a USB drive
> so the info is transferred there or to create a "local directory" and
> put the data in it?  I would have expected an error message, "Hey,
> dummy.  The drive is not connected".
> 
Because in linux, everything mounts under one directory tree. So to mount
something in that tree, the "directory" needs to exist first. If that drive
isn't mounted, the mountpoint will still exist, and can hold data by itself.
Unless you set up something like automount that would create the mountpoint,
and mount the drive, and after you disconnect, would remove the mountpoint. It
would have to check if the drive was there before it created the mountpoint,
and stop if it wasn't. Linux has unix roots, and it pre-dates things like
removable drives. It comes from a time when drives were large and expensive,
and stayed in place once attached.

-- 

MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!