[CentOS] Reformatting a USB drive

Fri May 25 11:30:00 UTC 2007
Matt Hyclak <hyclak at math.ohiou.edu>

On Thu, May 24, 2007 at 08:54:29PM -0700, Todd Cary enlightened us:
> 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 there's nothing special about drives in Linux. They're all just
files/directories. /media has no special meaning to the kernel, only the
user, so the system will happily let you create folders wherever you want.
If the folder happens to be physically located on another drive, it will put
the files there. That's one of the beauties of Unix-like filesystems - it
all looks the same regardless of drives/partitions/etc.

It's up to you to check that the drive is there before running rsync.

Matt

-- 
Matt Hyclak
Department of Mathematics 
Department of Social Work
Ohio University
(740) 593-1263