[LUNI] UDEV rules ... SYSFS{serial} value?
Jeff D
fixedored at gmail.com
Sat Oct 20 10:58:49 CDT 2007
On Sat, 20 Oct 2007, David Gibbs wrote:
> folks:
>
> Does anyone know how to give a drive a SYSFS{serial} value so that I can
> setup udev rules to automatically recognize a USB drive when it's installed?
>
> I've found that some drives have a SYSFS{serial} value ... but others
> don't. The serial number seems to be a pretty good method of
> recognizing unique drives when they are installed.
>
> Thanks!
>
> david
>
check out blkid or /dev/disk/by-id/ or /dev/disk/by-uuid , you'll be able
to find the IDs of what ever drives you have plugged in and add an entry
in /etc/fstab for them like so:
# blkid
/dev/sde1: UUID="84f7fcdb-1172-42aa-bf7e-8ba09d4c8efe" SEC_TYPE="ext2"
TYPE="ext3"
then to add it to /etc/fstab :
UUID="84f7fcdb-1172-42aa-bf7e-8ba09d4c8efe" /my/mount/point ext3 \
rw,user,noauto 0 0
I use this method for a couple usb disks that I have and it works out
pretty well.
Jeff
-+-
8 out of 10 Owners who Expressed a Preference said Their Cats Preferred Techno.
More information about the luni
mailing list