From: laredotornado on
Hi,

I'm using Fedora Core 6. I have two USB hard drive sticks plugged
into my USB drives. I have read this article

http://www.mydigitallife.info/2006/09/10/how-to-mount-usb-disk-drive-in-unix-or-linux/

to try and figure out how to mount them, but this only lists
instructions for one and I'm wondering how to distinguish one from the
other. One has a capacity of 1 GB and the other has 4 GB.

Thanks, - Dave
From: Allen Kistler on
laredotornado wrote:
> I'm using Fedora Core 6. I have two USB hard drive sticks plugged
> into my USB drives. I have read this article
>
> http://www.mydigitallife.info/2006/09/10/how-to-mount-usb-disk-drive-in-unix-or-linux/
>
> to try and figure out how to mount them, but this only lists
> instructions for one and I'm wondering how to distinguish one from the
> other. One has a capacity of 1 GB and the other has 4 GB.

The one you plug in first gets a "lower" device name.
So if the first one you plug in is /dev/sda, the second one will be
/dev/sdb.
From: Magda Muskala on
On Apr 23, 5:55 am, laredotornado <laredotorn...(a)zipmail.com> wrote:
>
> I'm wondering how to distinguish one from the
> other. One has a capacity of 1 GB and the other has 4 GB.
>
you could see in /var/log/messages which is which. for example you
gonna find there something like:

Apr 23 15:43:26 kernel: usb 1-1: new full speed USB device using
uhci_hcd and address 3
Apr 23 15:43:27 kernel: usb 1-1: configuration #1 chosen from 1
choice
Apr 23 15:43:27 kernel: scsi1 : SCSI emulation for USB Mass Storage
devices
Apr 23 15:43:32 kernel: scsi 1:0:0:0: Direct-Access UDISK
PDU01_1G 71G2.0 0.00 PQ: 0 ANSI: 2
Apr 23 15:43:32 kernel: sd 1:0:0:0: [sdb] 2015231 512-byte hardware
sectors (1032 MB)
Apr 23 15:43:32 kernel: sd 1:0:0:0: [sdb] Write Protect is off
Apr 23 15:43:32 kernel: sd 1:0:0:0: [sdb] 2015231 512-byte hardware
sectors (1032 MB)
Apr 23 15:43:32 kernel: sd 1:0:0:0: [sdb] Write Protect is off
Apr 23 15:43:32 kernel: sdb: sdb1
Apr 23 15:43:32 kernel: sd 1:0:0:0: [sdb] Attached SCSI removable
disk


greetings
magda
From: Dances With Crows on
Magda Muskala staggered into the Black Sun and said:
> On Apr 23, 5:55 am, laredotornado wrote:
>> I'm wondering how to distinguish one [USB disk] from the other. One
>> has a capacity of 1 GB and the other has 4 GB.
> you could see in /var/log/messages which is which.
> Apr 23 15:43:32 kernel: scsi 1:0:0:0: Direct-Access UDISK
> PDU01_1G 71G2.0 0.00 PQ: 0 ANSI: 2
> Apr 23 15:43:32 kernel: sd 1:0:0:0: [sdb] 2015231 512-byte hardware
> sectors (1032 MB)

This is possible, but it's a pain. A better solution for removable
devices which may not have consistent device node names is to use
filesystem labels. Use e2label for ext23 partitions, ntfslabel for NTFS
partitions, reiserfstune for ReiserFS, and if you have FAT partitions,
there's no tool to write a label to an existing filesystem. You can
easily write one with "echo -n 'A_LABEL1234' | dd of=/dev/sda1 bs=1
seek=43 count=11". Replace /dev/sda1 with the device node where your
FAT partition lives.

Once you have a labeled filesystem, you can easily mount it no matter
where it happens to be. Example fstab line:

LABEL=my_label /mnt/my_label auto noauto,users,defaults 0 0

....HTH,

--
If you're looking for trouble, I can offer you a wide selection.
My blog and resume: http://crow202.dyndns.org:8080/wordpress/
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see