Is an USB external HD mounted automatically when plugged ?

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
cmoulliard
Posts: 39
Joined: Tue Jan 19, 2021 11:51 am

Is an USB external HD mounted automatically when plugged ?

Post by cmoulliard »

Hi,

Is an USB external HD mounted automatically when plugged on the RockPro64 SBC by DietPi ?
Can we change manually the /etc/fstab and add the external disk ? Will a conflict occurs at boot time if we do that ? Why such a question --> I see at boot time the message "A start job is running for /dev/disk/by-uuid/9859-E8F8" ?
1611648904746.jpg
Cheers

Charles
User avatar
Joulinar
Posts: 4836
Joined: Sat Nov 16, 2019 12:49 am

Re: Is an USB external HD mounted automatically when plugged ?

Post by Joulinar »

usb devices will get ready for the operation system during boot. Depending on what is set inside /etc/fstab, device will be mounted on boot or on first user access to that file system.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
cmoulliard
Posts: 39
Joined: Tue Jan 19, 2021 11:51 am

Re: Is an USB external HD mounted automatically when plugged ?

Post by cmoulliard »

Something else.

- Why driver_manager imposes us to use as mount point "/mnt" - https://github.com/MichaIng/DietPi/blob ... nager#L301 ?
- Could we extend the driver_manager UI to allow to provide another volume path such as "/media/...." ?
User avatar
Joulinar
Posts: 4836
Joined: Sat Nov 16, 2019 12:49 am

Re: Is an USB external HD mounted automatically when plugged ?

Post by Joulinar »

I guess the why could be explained by the developer @MichaIng
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3032
Joined: Sat Nov 18, 2017 6:21 pm

Re: Is an USB external HD mounted automatically when plugged ?

Post by MichaIng »

It was like this forever, but I agree there is not really a reason to not be more flexible.

Only thing is that e.g. dietpi-backup currently excludes external drives based on /mnt/* path, which are usually no essential system parts but contain often large data that one does not want to have included into a system backup. So when other paths are used, those would need to be excluded manually as we cannot reasonably guess which mount is essential for the system or which holds userdata, if it is mounted somewhere below regular system paths. And maybe there are other parts of our scripts which expect that location for mounts, but nothing breaks if others are used.

/media btw mostly is used by automount implementations (mount on plug), while /mnt is more intended for manual mounts. So to avoid conflicts, /mnt is probably the better default.
Post Reply