On Sun, 31 May 2026 21:36:36 +0200
Patrick Dupre via users <[email protected]> wrote:

> I made
> touch /etc/systemd/system/mnt-pdupre.automount
> touch /etc/systemd/system/mnt-pdupre.mount
> and 
> systemctl daemon-reload
 
> but it is still the same behavior.
 
> Do I need to create empty real files?

No.

> Or I need to fill the files properly?

Yes, I showed the needed content in my original post.

Proceed as follow being root:

Create the .mount and .automount files:

    cat > /etc/systemd/system/mnt-pdupre.mount <<EOF
[Unit]
Description=%n

[Mount]
What=LABEL=pdupre
Where=/mnt/pdupre
EOF

    cat > /etc/systemd/system/mnt-pdupre.automount <<EOF
[Unit]
Description=%n

[Automount]
Where=/mnt/pdupre

[Install]
WantedBy=multi-user.target
EOF

Then execute:

    systemctl daemon-reload
    systemctl enable mnt-pdupre.autmount
    systemctl start mnt-pdupre.autmount

    ls -l /mnt/pdupre
    findmnt /mnt/pdupre

> However, if I need to specify /dev/sde8, it is not going to work,
> because it can be /dev/sdx8 depending on what is already mounted.
 
Right, it will work because the What= line specifies the label of this
filesystem, not the current device path.

-- 
francis
-- 
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to