You are not logged in.
Pages: 1
Hi!
I am trying to create udev rule for specific usb drive following wiki. I want that particular drive to have persistent name. The drive is recognized by kernel as 'sdb', but I want to rename it to usbhdd. I have following rule:
KERNEL=="sd*", SUBSYSTEM=="scsi", ATTR{size}=="976773168", SYMLINK+="usbhdd%n"
(I decided to detect the drive by size).
Now I have /dev/usbhdd, but there are no nodes for partions, and also old sdb exists. So, how can I fix the rule and delete old sdb node?
Thanks.
Last edited by mxfm (2016-10-24 14:43:59)
Offline
“SYMLINK”, as the name implies, just creates symlinks.
Except for network devices, udev does not allow the kernel name to be renamed. So you cannot delete sdb.
Your rule only works for the device and not partitions; you need to add another rule for the partitions.
Use “udevadm info -a” on the sdbX devices to get what you need to write the rule.
Offline
“SYMLINK”, as the name implies, just creates symlinks.
Except for network devices, udev does not allow the kernel name to be renamed. So you cannot delete sdb.
Your rule only works for the device and not partitions; you need to add another rule for the partitions.
Use “udevadm info -a” on the sdbX devices to get what you need to write the rule.
Well, thanks for information. It is a pitty that deleting sdb link cannot be done.
Offline
Please don't use [Closed], it denotes a locked thread, use [Solved] instead.
Offline
Pages: 1