Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
udev-rules usb-harddrive partition problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
larand54
l33t
l33t


Joined: 20 Feb 2004
Posts: 695
Location: Sweden

PostPosted: Fri Oct 27, 2006 5:04 pm    Post subject: udev-rules usb-harddrive partition problem Reply with quote

I have two removable SATA drives and two USB-drives and want to give each drive/partition a unique device name so that
they can be mounted uniquely.
If I have created a playlist against a drive I would like to use that list next time I mount's the drive even if I connected/disconnected some of the other drives.

The rules file look like this:
Code:
# cat /etc/udev/rules.d/10-local.rules

NAME=="SD?1", SYSFS{size}=="586099332", NAME="%k", SYMLINK+="mthd1"
NAME=="SD?1", SYSFS{size}=="361462437", NAME="%k", SYMLINK+="mthd2a"
NAME=="SD?2", SYSFS{size}=="224636895", NAME="%k", SYMLINK+="mthd2b"

BUS=="usb", KERNEL=="SD?1", SYSFS{serial}=="B61QYAQH    ", NAME="%k", SYMLINK+="otIIa"
BUS=="usb", KERNEL=="SD?2", SYSFS{serial}=="B61QYAQH    ", NAME="%k", SYMLINK+="otIIb"
BUS=="usb", KERNEL=="SD?1", SYSFS{serial}=="A81VBDZE    ", NAME="%k", SYMLINK+="otI"
# - Mp3 player ADAMOND ZK1
NAME=="SD?1", BUS=="scsi", SYSFS{model}=="ZK1             ", NAME="%k", SYMLINK+="adamond"
# BUS=="usb", KERNEL=="sd*", SYSFS{product}=="USB 2.0 Storage Device", NAME="%k", SYMLINK="usbhd%n"
#
#NAME=="SD?1", BUS=="usb", SYSFS{serial}=="B61QYAQH    ", SYMLINK="otIIa" RUN="mount /mnt/MT2a"

One of the SATA-drives is only one large partition "mthd1" the other SATA-drive consists of two partitions "mthd2a and mthd2b" and therefore I identified them by size - and that works.

The other two USB-drives are partitioned the same, they are backups for the SATA-drives. But udev failes to create the symlinks for those.
It works in another computer but then I don't have the SATA-drives in that computer.

Anyone that can tell me what I've done wrong?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum