You are not logged in.

#1 2018-10-22 15:54:28

milton01
Member
Registered: 2018-10-22
Posts: 1

Mount external HDD to specific point

Hi guys,

I already spend hours browsing through the forum and web, but unfortunately I still couldn't figure it out myself.

I want to use an external hard drive for my backup process and want to mount this HDD to a specific mount point every time I plug it in. Currently the HDD will be mounted automatically to "media/some/folder", but I want it to mount to "mnt/backup_hdd" for example. I am trying to do this by defining the following udev rule in "/etc/udev/rules.d":

ENV{ID_FS_UUID}=="94c3b622-9bc8-4bd1-9d4a-87e7751707fe", RUN+="/usr/bin/mount /mnt/backup_hdd"

For some reason it is not working. I switched the "mount" command with some a "/usr/bin/touch /home/milton/Desktop/text.txt" to see if it works and it does. As soon as I plugin the drive the rule will be activated and processed, but not with the mount command in it.

Since the rule is working I guess there might be some permission problem maybe?

Any ideas how to solve this or maybe is this totally wrong approach? Thanks a lot in advance!

Offline

#2 2018-10-22 17:09:57

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Mount external HDD to specific point

Welcome to the forums milton01 smile

This is already covered in the wiki, please search it before posting as set out in our forum Code of Conduct.

https://wiki.archlinux.org/index.php/Ud … s_in_rules


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB