I have a script relying on /dev/disk/by-path, but that subdirectory does not exist. When I ls /dev/disk, I get:
by-id by-label by-uuid
How do I get by-path?
(Output of grep -ri 'by-path' /lib/udev/rules.d/60-persistent-storage.rules is:
# persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path}
# by-path (parent device path)
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}"
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
)
(Output of sudo udevadm info --root --name=/dev/sdc | grep DEVTYPE is:
E: DEVTYPE=disk
)
/dev/disk/by-path. – A.B. Sep 23 '15 at 13:38grep -ri 'by-path' /lib/udev/rules.d/60-persistent-storage.rules– A.B. Sep 27 '15 at 13:28sudo udevadm info --root --name=/dev/sdc | grep DEVTYPE. Replace/dev/sdcwith your drive. – A.B. Sep 28 '15 at 17:55disk/by-pathif you plug the stick. – A.B. Sep 28 '15 at 19:10sudo udevadm info --root --name=/dev/sdc | grep ID_PATH=, i hope/dev/sdcis the correct device. – A.B. Sep 28 '15 at 19:12sudo udevadm test --name=/dev/sdcthis is for debuging – user.dz Sep 28 '15 at 22:07