Gentoo Archives: gentoo-user

From: "Stefan G. Weichinger" <lists@×××××.at>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] UDEV rule problem
Date: Mon, 14 Nov 2016 14:51:54
Message-Id: ef7e7c57-fab9-9992-4125-1409b2e863c4@xunil.at
In Reply to: [gentoo-user] UDEV rule problem by Helmut Jarausch
1 Am 2016-11-14 um 15:31 schrieb Helmut Jarausch:
2 > Hi,
3 >
4 > I have two external USB3 hard disk enclosures. They have the same
5 > vendor, model and the same serial number (unfortunately).
6 > Vendor, model and serial occur in the usb-subsystem only.
7 >
8 > Since the hard drives within theses enclosures have different
9 > capacities, there is a different ATTR{size} value in the block-subsystem.
10 > But this doesn't have any vendor info.
11 >
12 > How can I write to different udev rules to distinguish these two
13 > external hard disks?
14
15 It's not udev, but why not use the UUIDs of the filesystems?
16
17 # ls -l /dev/disk/by-uuid
18
19 and then for example in /etc/fstab
20
21 UUID=028da5ef-4e73-405a-b739-d59204c54921 /mnt/externaldisk1 ext4
22 relatime,noauto,user 0 1
23 UUID=fae458a3-da30-43c5-81f1-be2d49215b09 /mnt/externaldisk2 ext4
24 relatime,noauto,user 0 1
25
26 just a suggestion, I don't know your specific use-case