I may have a solution, it’s more a workaround but it work
My solution could be more simple however, it prevent conflitcs
- need the device to be unmounted
umount /dev/sdxx
- need to know the “serial” of the device
udevadm info -a -p $(udevadm info -q path -n /dev/sdx) | grep ATTRS{serial}
where sdx is your device
if the device as a serial note it as we’ll need it. and continue with step 3
If the device as no serial (the previous command return nothing, this may cause conflict if tow identical device as they could have the same ID, label, uuid and/or path.
however we need a link to the device so I chose the ID link (but we could have use the link by path by uuid or by label).
ls -l /dev/disk/by-id/*usb*
identify your device (the sdxx) and note the link some thing like /dev/disk/by-id/usb-USB_Flash_Drive-XXXXXXXXXXXXXX-0:0-part1 andgo to step 4.
- now we need to modify the udev rules.
so as root edit (or create the rule file as show bellow with your favorit editor)
vim /etc/udev/rules.d/10-local.rules
On this file add this line and save the file
BUS=="usb", ATTRS{serial}=="<your_device_serial>", NAME="%k", SYMLINK="my_usb_device_symlink"
Where <your_device_serial> is the device serial we get earlyer and my_usb_device_symlink" is the name that will be use to symlink deht device on /dev/ (the symloink name must )be a name that doesn’t already appear under /dev/.
Note the symlink you enter.
4)now we need to edit the fstab to add an entry.
vim /etc/fstab
at the end of the fstab file add this line
<link_to_the_device> <mount_point> auto rw,user,nosuid,noauto 0 0
where <link_to_the_device> is yout /dev/<my_usb_device_symlink> or your device ID symlink (on my exemple /dev/disk/by-id/usb-USB_Flash_Drive-XXXXXXXXXXXXXX-0:0-part1)
Just save yout fstab, and every thing should be right.