You are not logged in.

#1 2010-09-29 11:12:21

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 770

Udev auto mounting not recognising my labels

I have added the auto mounting rules to my udev config exactly as specified in the wiki:

http://wiki.archlinux.org/index.php/Ude … if_present

This works to the extend that I can see the devices being mounted under media, but, for most of my deviecs, I have labels defined in /etc/fstab/:

/dev/disk/by-uuid/74C7-B9D3 /media/android vfat noauto,users 0 0
/dev/disk/by-uuid/20A0-683F /media/cowon vfat noauto,users 0 0
/dev/disk/by-uuid/A036-C3DF /media/cowonsd vfat noauto,users 0 0
/dev/disk/by-uuid/00C6-17D0 /media/ipod vfat noauto,users 0 0
/dev/disk/by-uuid/68DB-1857 /media/cardreader vfat noauto,users 0 0
/dev/disk/by-uuid/72AD-2013 /media/acekard vfat noauto,users 0 0

For some reason, however, they are being mounted as /media/usbhd-sd*

What am I missing here?

Offline

#2 2010-09-29 12:02:59

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Udev auto mounting not recognising my labels

You're using disk-by-uuid not disk-by-label so this won't work.

http://wiki.archlinux.org/index.php/GRU … g_by_label

Last edited by karol (2010-09-29 12:49:59)

Offline

#3 2010-09-29 13:57:17

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 770

Re: Udev auto mounting not recognising my labels

OK - is there not a way to do this via UUID and fstab?  I used to use the pmount version, but wanted to try a more multi user approach.

Anyway - I did try and set a label with the following result:

# e2label /dev/sdg1 cowonsd
e2label: Bad magic number in super-block while trying to open /dev/sdg1
Couldn't find valid filesystem superblock.

Still a little lost here...

Offline

#4 2010-09-29 14:10:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Udev auto mounting not recognising my labels

You create a label and call your drives by the label.

http://wiki.archlinux.org/index.php/Per … ice_naming
Every filesystem uses it's own tools, vfat needs mlabel from the mtools package.

Offline

#5 2010-09-29 16:36:09

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 770

Re: Udev auto mounting not recognising my labels

This isn't making much sense to me I'm afraid.  I tried creating a label called 'cowon' and then there was /dev/disk/by-label/COWON - s that the way it's supposed to be?

Offline

#6 2010-09-29 16:48:50

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Udev auto mounting not recognising my labels

phunni wrote:

This isn't making much sense to me I'm afraid.  I tried creating a label called 'cowon' and then there was /dev/disk/by-label/COWON - s that the way it's supposed to be?

Yes, that's the way it's supposed to be. Mountpoints are something different.


Instead of

/dev/disk/by-uuid/20A0-683F /media/cowon vfat noauto,users 0 0

try setting up

/dev/disk/by-label/COWON /media/cowon vfat noauto,users 0 0

Offline

#7 2010-09-29 17:23:27

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 770

Re: Udev auto mounting not recognising my labels

OK - I think I'm making progress.  It now creates a new directory called COWONSD under /media where one of my devices is mounted.  In fstab, this device is mapped to /media/cowonsd using /dev/disk/by-label/COWONSD

Is there anyway I can get these devices mounted to the correct places as specified by fstab?

Interestingly, I currently have 2 devices plugged in - but only one is showing at a time... Perhaps that's another issue...

Offline

#8 2010-09-29 19:05:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Udev auto mounting not recognising my labels

What are the correct places? If device with label 'xyz' mounts under /media/xyz according to the udev rules you've set up, seems everything is in place.

Offline

#9 2010-09-29 21:50:07

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 770

Re: Udev auto mounting not recognising my labels

If I have mapped a drive with the label COWON to /media/cowon, then that's where I'd like it mounted...

Offline

#10 2010-09-29 22:02:11

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Udev auto mounting not recognising my labels

phunni wrote:

If I have mapped a drive with the label COWON to /media/cowon, then that's where I'd like it mounted...

That's what I meant.
<the light dawns> Ah, you mean you want lowercase?


Edit: I think mlabel uses ALLCAPS.

Last edited by karol (2010-09-29 22:18:22)

Offline

#11 2010-09-30 08:05:28

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 770

Re: Udev auto mounting not recognising my labels

Thanks for all the help so far :-)

OK, so it seems like fat partitions, such as my USB drives, can't be lowercase.  I guess I can live with that.

So, the cowon device that I've been referencing so far actually has 2 drives - the internal memory and the SD card. When it's plugged in, both need to be automounted.

Having plugged in the device I can see both COWON and COWONSD under /dev/disk/by-label/ but only COWONSD is mounted under /media - there is no trace of COWON being auto mounted anywhere.

How can I figure out what's going on there?

Offline

#12 2010-09-30 08:36:16

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Udev auto mounting not recognising my labels

dmesg will tell you what the kernel sees when the device is connected - start there.

Offline

#13 2010-09-30 12:49:39

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 770

Re: Udev auto mounting not recognising my labels

dmesg says:

usb 1-6: new high speed USB device using ehci_hcd and address 8
scsi8 : usb-storage 1-6:1.0
scsi 8:0:0:0: Direct-Access     COWON    D2+ DAB          0100 PQ: 0 ANSI: 0
sd 8:0:0:0: Attached scsi generic sg5 type 0
scsi 8:0:0:1: Direct-Access     COWON    D2+ DAB          0100 PQ: 0 ANSI: 0
sd 8:0:0:1: Attached scsi generic sg6 type 0
sd 8:0:0:0: [sde] 32292864 512-byte logical blocks: (16.5 GB/15.3 GiB)
sd 8:0:0:0: [sde] Write Protect is off
sd 8:0:0:0: [sde] Mode Sense: 37 00 00 08
sd 8:0:0:0: [sde] Assuming drive cache: write through
sd 8:0:0:1: [sdf] 63438400 512-byte logical blocks: (32.4 GB/30.2 GiB)
sd 8:0:0:1: [sdf] Write Protect is off
sd 8:0:0:1: [sdf] Mode Sense: 37 00 00 08
sd 8:0:0:1: [sdf] Assuming drive cache: write through
sd 8:0:0:0: [sde] Assuming drive cache: write through
 sde:
sd 8:0:0:1: [sdf] Assuming drive cache: write through
 sdf: sdf1
sd 8:0:0:0: [sde] Assuming drive cache: write through
sd 8:0:0:0: [sde] Attached SCSI removable disk
sd 8:0:0:1: [sdf] Assuming drive cache: write through
sd 8:0:0:1: [sdf] Attached SCSI removable disk

Still only COWONSD that's mounted.  That's really confused me.  dmesg seems to only refer to COWON, but it's only COWONSD that gets mounted...

Offline

#14 2010-09-30 12:50:17

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Udev auto mounting not recognising my labels

You need to mount the cards (e.g. /dev/sdg1 and /dev/sdg2) then, not the device (/dev/sdg).

Last edited by karol (2010-09-30 12:51:18)

Offline

#15 2010-09-30 12:59:32

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 770

Re: Udev auto mounting not recognising my labels

Is that not what the script is doing?

Offline

#16 2010-09-30 13:01:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Udev auto mounting not recognising my labels

Can you mount COWON by hand?

Edit: When I plug in a similar device, both cards get listed

sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:0:0: [sdb] Attached SCSI removable disk
sd 2:0:0:2: [sdd] Assuming drive cache: write through
sd 2:0:0:2: [sdd] Attached SCSI removable disk

and I can mount both.

Last edited by karol (2010-09-30 13:04:16)

Offline

#17 2010-09-30 13:06:22

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 770

Re: Udev auto mounting not recognising my labels

I can mount both by hand - even when COWONSD has already been automounted

Offline

#18 2010-09-30 13:10:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Udev auto mounting not recognising my labels

Which one is COWONSD /dev/sdf1? /dev/sde? I'm confused too, as I see no COWONSD label in dmesg.
What happens if you insert the device w/o the card?

Offline

#19 2010-09-30 13:17:30

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 770

Re: Udev auto mounting not recognising my labels

It's the lack of COWONSD that's confused me too.

This is what I get in dmesg without the SD card:

usb 1-6: new high speed USB device using ehci_hcd and address 9
scsi9 : usb-storage 1-6:1.0
scsi 9:0:0:0: Direct-Access     COWON    D2+ DAB          0100 PQ: 0 ANSI: 0
sd 9:0:0:0: Attached scsi generic sg5 type 0
scsi 9:0:0:1: Direct-Access     COWON    D2+ DAB          0100 PQ: 0 ANSI: 0
sd 9:0:0:1: Attached scsi generic sg6 type 0
sd 9:0:0:0: [sde] 32292864 512-byte logical blocks: (16.5 GB/15.3 GiB)
sd 9:0:0:0: [sde] Write Protect is off
sd 9:0:0:0: [sde] Mode Sense: 37 00 00 08
sd 9:0:0:0: [sde] Assuming drive cache: write through
sd 9:0:0:1: [sdg] Attached SCSI removable disk
sd 9:0:0:0: [sde] Assuming drive cache: write through
 sde:
sd 9:0:0:0: [sde] Assuming drive cache: write through
sd 9:0:0:0: [sde] Attached SCSI removable disk

Offline

#20 2010-09-30 16:22:50

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Udev auto mounting not recognising my labels

sde is the internal memory, sdf is the sd card, and sdf1 is the partition on the sd card. This is not uncommon e.g. my nokia has a similar setup.

So you need to mount sde and sdf1.

Offline

#21 2010-09-30 16:26:20

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 770

Re: Udev auto mounting not recognising my labels

Thanks for that - makes sense.

So why are they not both being auto mounted?

Offline

Board footer

Powered by FluxBB