When you connect a USB device to openwrt, they are mounted with device node name (e.g. /dev/sda1, /dev/sdb2). Is it possible to mount them at custom mount /mnt/usb and /mnt/usb2 instead.
The mountd configuration that supposed to achieve this is outdated https://openwrt.org/docs/guide-user/storage/mountd
Alternatively is it possible to create a symlink /mnt/usb point to the first automounted USB device instead.
# df -h
Filesystem Size Used Available Use% Mounted on
/dev/sda1 3.5G 9.2M 3.3G 0% /mnt/usb
/dev/sda2 3.5G 55.2M 3.3G 2% /mnt/data
/dev/sda3 3.5G 8.1M 3.3G 0% /mnt/shared
/dev/sda4 3.5G 8.0M 3.3G 0% /mnt/testing
The question doesn't relate to custom fstab configuration. If you know the UUID of your devices you can of course create a custom fstab configuration via UCI or the Luci.
The solution I seek is for instances you don't know the device that would be automounted. Thanks!
You can hack
blockd with custom patches or add script with your customizations.
It should be quite simple to add
/etc/hotplug.d/mount/ script, make it react to every mounted disk & create custom symlink for it.
You can use script added by the commit ef1efa756e0d0 ("samba36: add package with hotplug.d script for auto sharing") for a refernce.
Thank you @rmilecki for clear solution. !
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.