Re: unmount automatically mounted USB devices by systemd-udevd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you Patick

I didn't know fstab can be used to prevent mountage USS HD .....thank you for the advice.

In every case is better to do it by the script.
My empiric rule works... and I'continue to use it :-).

Still thank you
Angelo

On Mon, Jul 13, 2020, 00:16 Patrick O'Callaghan <pocallaghan@xxxxxxxxx> wrote:
On Sun, 2020-07-12 at 10:10 +0300, Angelo Moreschini wrote:
> Hi,
>
>
> I made a script that (using rsync <linux utility>) run a backup of some
> (particular) data of my computer.
>
> I use an external USB-HD to store data of the backup and, of course, I need
> to mount this HD-device before.
>
>
> A problem come because systemd-udevd automatically mount plugged USB
> devices when they are connected to computer.
>
> I my “simple” mind, I fund that this automatically mounted point is”
>
> */run/media/$USER/partition_label (...this says Gparted…).*

You can change that by adding an fstab entry. I use this for example:

UUID=6cb66da2-147a-4f3c-a513-36f6164ab581       /raid                   ext4    rw,noauto,user  1 1

and the mount happens automatically when the device is plugged in.

> This in OK! (this is working) ! But this is only a my empiric solution to
> the problem, and looking for <”linux how to manually unmounting the
> automatically mounted usb device by system-udevd”> I didn't find nothing
> *exactly* appropriate for my problem.
>
>
> I know that are different solutions (using udev rules) to manage the
> automatic montage of devices, but since I already have a good script that
> work, I only would like find an “official instruction” for the problem to
> manually unmout automatically mounted USB devices by systemd-udev.

How does the system know to unmount the drive unless you tell it? There
are some ways to handle putting disks into standby mode after a timeout
 (see udisks(8)) but it's not clear if they'll work with USB devices.
In my case, I just explicitly unmount the drive within the backup
script. I don't know if there's really a better way to do it.

poc
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
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/users@xxxxxxxxxxxxxxxxxxxxxxx
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
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/users@xxxxxxxxxxxxxxxxxxxxxxx
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux