larand54 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_fry_2.gif)
Joined: 20 Feb 2004 Posts: 695 Location: Sweden
|
Posted: Fri Oct 27, 2006 5:04 pm Post subject: udev-rules usb-harddrive partition problem |
|
|
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? |
|