automount configuration?

  • Hello,

    I just got a rock pi4 with sata hat and tried nightly build. I'm so excited as sata works ootb. The drives are already mounted.

    If I got it right, partitions are mounted according their label - so if two partitions have the same label, they are mounted to the same directory ...

    ... and sata drives are mounted at /var/media as well as usb-drives.

    I'd like to change (and fix) the location where the sata drives are mounted, but I did not find the one that does the mounting.

    /etc/fstab does not exists or is empty ...

    Where do I best configure the mount location of the sata drives?

  • Drives are mounted via udevil so you would need to clone the udev rule that mounts removable drives to /storage/.config/udev.rules.d and edit it to mount them somewhere else. NB: If you have two drives with the same LABEL the second one to mount will be LABEL-1 so they will not mount to the same name. You can't control probe order (which determines mount order) so it's best to ensure they have unique names.

  • Thank you very much for your support!

    I found udevil*.rules at /usr/lib/udev/rules.d - may I ask for additional help?

    I researched how to differentiate internal and external drives, as both have dev-names like sd*

    and I found the key in /dev/disk/by-id:

    Does /etc/fstab work?

    I'd like udevil act on those partitions only, that have their id start with "usb-"

    Don't know, whether partitions that start with mmc- need handling of udevil too.

    Which might be the same as: udevil should not work on partitions with an id of ata-* or wwn*

    Is that possible and how could I do that?