LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 07-24-2006, 11:50 PM   #1
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Mounting USB drives (external HD and two at once)


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
Code:
/dev/sda1     /mnt/usb      vfat        noauto,owner,ro         0   0
 
Old 07-25-2006, 12:10 AM   #2
crazyjimbo
Member
 
Registered: Mar 2006
Location: Edinburgh
Distribution: Debian Etch, Gentoo
Posts: 90

Rep: Reputation: 16
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.
 
Old 07-25-2006, 12:12 AM   #3
crazyjimbo
Member
 
Registered: Mar 2006
Location: Edinburgh
Distribution: Debian Etch, Gentoo
Posts: 90

Rep: Reputation: 16
Edit: sorry, I double posted

Last edited by crazyjimbo; 07-25-2006 at 12:13 AM.
 
Old 07-25-2006, 03:39 PM   #4
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
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?

Thanks again.
 
Old 07-25-2006, 06:40 PM   #5
t3hSmartKid
LQ Newbie
 
Registered: Jul 2006
Location: CO, USA
Distribution: Slackware, SLAX, Xubuntu
Posts: 19

Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with external USB-drives. o3h Linux - Hardware 1 05-10-2006 07:01 AM
Mounting External DVDs, Flash Drives, etc. depam Linux - Software 4 02-09-2006 03:07 PM
USB External Hard drives lukepiewalker Fedora 2 08-03-2005 09:14 AM
External USB drives in redhat? ultrablue Linux - Newbie 3 06-10-2005 04:16 AM
mounting external hard drives Moebius Linux - Newbie 5 06-19-2004 08:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration