[Feature request] /run/media/username/ID or path etc/ instead of UUID
I'm on Arch Linux KDE.
E.g. mount nvme0n1p3 via Dolphin or
udisksctl mount -b /dev/nvme0n1p3
: /run/media/a/DB49-54E7/ but is it possible to have /run/media/a/nvme-WDS250G3X0C-00SJG0_185250422455-part3/ instead?
Thanks.
The name is created from several sources - first the filesystem label, then the filesystem UUID, falling back to plain disk, see https://github.com/storaged-project/udisks/blob/8ffd11c8c4e865413fba80e7fe20ca1db95797db/src/udiskslinuxfilesystem.c#L790-L801
In practice almost every filesystem has an UUID. I think there's currently no other way to specify custom mountpoint name, other than putting it in /etc/fstab.
Impossible? Why?
Although it's possible to have 2 partitions with the same UUID, on a PC, e.g. if I plug an USB flash drive from a friend (then we play the lottery).
On the contrary an ID depends on the unique hardware serial number, then the number of the partition https://wiki.archlinux.org/title/Persistent_block_device_naming.
It would be nice to have the setting, why not the path etc too.
I didn't say it's impossible, just currently not possible. Generally dynamically created mountpoints are not stable and never were. If there's a directory with the same name, UDisks will choose a new name, typically with -1, -2, etc. suffix. If you need stable names for your further operations, having a /etc/fstab record is the preferred way. Or just take a reference to the UDisksBlockObject and fetch actual mountpoint path from the org.freedesktop.UDisks2.Filesystem.MountPoints interface property.
Editing /etc/fstab is a bad patch for me, e.g. I don't wanna do it every time I plug a new drive.
I still don't understand why it's currently not possible:
ls -l /dev/disk/by-id|grep nvme0n1p3|head -n 1|awk '{print$9}'
nvme-WDS250G3X0C-00SJG0_185250422455-part3
...
Or just take a reference to the UDisksBlockObject and fetch actual mountpoint path from the org.freedesktop.UDisks2.Filesystem.MountPoints interface property.
How? I edit the code of udisks myself?
https://bbs.archlinux.org/viewtopic.php?id=302709 request for close by discard
?