Am 2016-11-14 um 15:31 schrieb Helmut Jarausch:
Hi,

I have two external USB3 hard disk enclosures. They have the same vendor, model and the same serial number (unfortunately).
Vendor, model and serial occur in the usb-subsystem only.

Since the hard drives within theses enclosures have different capacities, there is a different ATTR{size} value in the block-subsystem.
But this doesn't have any vendor info.

How can I write to different udev rules to distinguish these two external hard disks?

It's not udev, but why not use the UUIDs of the filesystems?

# ls -l /dev/disk/by-uuid

and then for example in /etc/fstab

UUID=028da5ef-4e73-405a-b739-d59204c54921 /mnt/externaldisk1 ext4 relatime,noauto,user 0 1 UUID=fae458a3-da30-43c5-81f1-be2d49215b09 /mnt/externaldisk2 ext4 relatime,noauto,user 0 1

just a suggestion, I don't know your specific use-case


Reply via email to