Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
In the past, I've been able to access the files on usb devices (an mp3 player, for example) by simply doing a "mount /mnt/usb." I'm running into slightly more complicated cases, though, so I thought I'd ask exactly how mounting usb devices works and what I need to be aware of.
First, I'll be using an external usb hard drive that I just got. Is the process the same, or is there anything else I need to know? What about formatting/partitioning it? How can I do that to a usb device? I'll be using the drive primarily for backups, but also for storage of some big files. Is ext3 or ReiserFS the way to go?
Second, I want to mount a digital camera I have that connects via usb and transfer images directly from the camera to the external hard drive. What do I need to do to mount two usb devices at once?
Here's the only usb-related line in my fstab, if it matters
When you plug two USB storage devices in at once, one will show up as /dev/sda and the other as /dev/sdb. To mount the second one, you will need to add another line to your fstab, something along the lines of:
Code:
/dev/sdb1 /mnt/usb2 ext2 noauto,owner 0 0
Replace ext2 with whatever filesystem you use for that drive
In other words, you will need two directories, one to mount each usb device to. You might want to make a directory called something more descriptive than 'usb2' for your external drive - the choice is yours!
One problem that I have is that my external hard drive is normally plugged in at boot so gets detected as /dev/sda and when i plug in my camera, it comes up as /dev/sdb. But if for some reason they are plugged in a differant order, they get swapped around and the camera gets mounted where the drive should be etc. Maybe someone else can suggest a solution for you for that.
Last edited by crazyjimbo; 07-25-2006 at 12:15 AM.
Thanks, that sounds simple enough. So now I just need to know how to format/partition it. Do I do everything the same as a normal drive, just using sd instead of hd, or is there anything different I need to do?
Also, still looking for suggestions on ext3 vs. ReiserFS for this. I'd lean towards ext3, since it will be used for backups and it seems ext3 has more support for recovering deleted files if that were to happen, but I went with ReiserFS for my primary drive for reasons I now forget.
And regarding the order switching depending on the order you plug them in... I'd think that makes all the difference. I'll normally be plugging in a "normal" device first (camera, mp3 player, etc.) that should be vfat, but that means I can't plug in the hard drive alone and access it without it being vfat. Do I need to do manual mount commands all the time, or is there a better way?
Rather than doing manual mount commands all the time you might try using a mount manager. I'm sure there is a manager that will allow you to choose where you want to mount it after it when you plug it in. Its still a manual mount but it would be a lot quicker. That's all I can think of.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.