0

I have a character USB card reader device and I want it always mount at the same location. Currently its located here:

ls -sla /dev/bus/usb/003/007 0 crw-rw-r-- 1 eveusb root 189, 262 Th10 29 14:56 /dev/bus/usb/003/007

And because I am planning to access from Kubenetes service I need for that mount point to stay the same on all the nodes that have a card reader. So I would like to predesignate the mount point if possible. Can this be done?

Steven Smart
  • 113
  • 2

1 Answers1

0

You can use udev, little examples are below

$ udevinfo -a -p /sys/block/sdc/ | grep model
    ATTRS{model}=="Ext HDD XXX    "

Now, that we have model attribute, we can add it to /etc/udev/rules.d/custom.rules by following line

SUBSYSTEM=="scsi", ATTRS{model}=="Ext HDD XX    ", SYMLINK+="<name of device file to be mounted in>"

$ /etc/init.d/udev restart
asktyagi
  • 2,401
  • 1
  • 5
  • 19