[GRLUG] Mounting USB flash drive (Centos 6.3)

John Wesorick john at wesorick.com
Wed Feb 6 00:15:07 EST 2013


When you created the folder it was just a folder on your local filesystem.
When you mounted the drive to that folder, you were saying your flash
drive's filesystem starts in that folder. When you unmount the drive the
file will be in /mnt/usbflash, as it will once again just be a folder on
your local file system. So you'll probably want to delete that, especially
if it was a large SQL dump. Linux file structure can be weird thinking
about it at first, but it's actually very logical.
On Feb 5, 2013 11:28 PM, "Steve @ HCS" <steveg at branchadventures.org> wrote:

>  Yes, that makes a lot of sense.   An interesting thing i did
> accidentally was to write a file to the OS folder before i mounted it.
> After mounting, it never got sent to the actual drive after i then mounted
> it.    Kind of in limbo land.
> Lessons learned.   Thanks John
>
> On 2/5/2013 11:16 PM, John Wesorick wrote:
>
> Linux uses a single filesystem hierarchy. Everything is under / (even
> removable or network drives). When you created the folder and mounted the
> flash drive to /mnt/usbflash you were telling the OS that your flash drive
> can be found at /mnt/usbflash. Without mounting it, Linux can't see it,
> since it isn't in the file system hierarchy. Does that make sense?
> On Feb 5, 2013 11:08 PM, "Steve @ HCS" <steveg at branchadventures.org>
> wrote:
>
>>  Thanks John,
>>
>> Is the folder on the OS,  a hardware abstraction queue?
>>
>> On 2/5/2013 10:53 PM, John Wesorick wrote:
>>
>> I don't understand. You mounted your flash drive to a folder on your OS
>> and wrote to it. That's how it works.
>> On Feb 5, 2013 10:39 PM, "Steve @ HCS" <steveg at branchadventures.org>
>> wrote:
>>
>>> While i'm out tonight wearing my ignorance on my shoulder,  i was
>>> wondering if someone could provide an explanation of how the below works.
>>>
>>> On a VMware server running Centos, i needed to copy some sql data onto a
>>> flashdrive.  Once the USB host and device are attached to the VM,
>>> in order to be able to write to the flashdrive i:
>>>
>>> fdisk -l    and got the "sdc3" that i needed
>>>
>>> But i just don't understand enough about the OS to know how the below
>>> mounting works.  Why writing to the "usbflash" magically shows up on the
>>> flashdrive is a mystery to my brain.
>>>
>>> mkdir /mnt/usbflash
>>> cp tmp/asdf.sql to the usbflash directory i just created
>>> mount /dev/sdc3 /mnt/usbflash
>>>
>>> P.S. Above is from memory of earlier in the day so hopefully is accurate
>>> _______________________________________________
>>> grlug mailing list
>>> grlug at grlug.org
>>> http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
>>>
>>
>>
>> _______________________________________________
>> grlug mailing listgrlug at grlug.orghttp://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
>>
>>
>>
>> --
>>  Healthy Computer Systems Steve Grody - Owner 616-502-2454
>>
>> _______________________________________________
>> grlug mailing list
>> grlug at grlug.org
>> http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
>>
>
>
> _______________________________________________
> grlug mailing listgrlug at grlug.orghttp://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
>
>
>
> --
>  Healthy Computer Systems Steve Grody - Owner 616-502-2454
>
> _______________________________________________
> grlug mailing list
> grlug at grlug.org
> http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shinobu.grlug.org/pipermail/grlug/attachments/20130206/be2889de/attachment-0001.html>


More information about the grlug mailing list