For example, fix the usb hard disk's first partition to /dev/usbhd.
Plug in the device, and look up the sysfs path:
# suppose the device is assigned to /dev/sdc by the kernel: udevinfo -q path -n sdc # Output: /block/sdc
Now, list device details using the device path /block/sdc:
udevinfo -a -p /block/sdc
# output:
looking at device '/block/sdc':
KERNEL=="sdc"
SUBSYSTEM=="block"
...
BUS=="scsi"
DRIVER=="sd"
...
SYSFS{model}=="HDP725032GLA360 "
SYSFS{vendor}=="Hitachi "
...
SYSFS{configuration}=="Bulk Only Configuration"
SYSFS{serial}=="Hitachi HD GEA330RC0ERABE"
SYSFS{product}=="BUFFALO INC. USB-SATA Bridge"
SYSFS{manufacturer}=="BUFFALO INC."
...
To fix the device's first partition at /dev/usbhd, we use these info:
Create file in /etc/udev/rules.d/, example: 10-usb-hd.rules:
# 10-usb-hd.rules
BUS=="scsi", SYSFS{vendor}=="Hitachi", SYSFS{model}=="HDP725032GLA360", KERNEL=="sd*1", NAME="%k", SYMLINK="usbhd"