LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Anyone here familiar with the GUI util "gnome disks" able to explain to me what exactly "mount at startup" means? rsync issues. (https://www.linuxquestions.org/questions/linux-newbie-8/anyone-here-familiar-with-the-gui-util-gnome-disks-able-to-explain-to-me-what-exactly-mount-at-startup-means-rsync-issues-4175735981/)

wh33t 04-13-2024 11:27 AM

Anyone here familiar with the GUI util "gnome disks" able to explain to me what exactly "mount at startup" means? rsync issues.
 
So I have a 2TB drive that is set to mount at startup, I'm not sure this is actually happening.

I'm using Mint Cinnamon, 21.3.

When I open up the file manager and click on my 2TB drive it takes a moment to populate the drives contents, almost like it's mounting only when I try to view the files. Either way, that's not my main issue.

My main issue is that I want my computer to rsync the contents of a directory when my machine boots to a different machine on my LAN. I used to be able to do this quite easily with cron but it hasn't been working lately. So I tried creating a systemd service file and it also doesn't appear to be working and I think it's because this 2TB drive isn't actually mounted at "boot", rather I think it's mounted at "my user login" and thus both cron and systemd is failing to rsync the directory.

Tips? Suggestions? Please and thank you so much.

Ps. If I run the command used in the cron/systemd service manually from the terminal it runs just fine as expected.

computersavvy 04-13-2024 01:05 PM

"mount at startup" means exactly what it says. Mount the device when the machine is booted up. However, that also depends upon how the system has configured it. -- in your case it may mean "at login" rather than "at boot"

To confirm if the device is mounted at the beginning use the "mount" command to see what devices are mounted and at what location (before using files to access the file system on the device).

To ensure a drive is properly mounted at boot time the simplest and most certain way would be to add a line into /etc/fstab to mount the device. Entries in /etc/fstab are processed at boot time. Entries elsewhere may wait on the user to take action to mount the device. If it is a removable drive and you are using it on multiple machines you might choose to add the "nofail" option on that line so the system does not hang during boot if the drive is not connected.

You should never have two different things doing the same process (cron & systemd). Either one or the other but never something that may conflict.

frankbell 04-13-2024 08:23 PM

I second the suggestion to add the partition to your /etc/fstab files, identifying it by UUID and adding the "auto" flag. Here's a good tutorial.


All times are GMT -5. The time now is 09:27 PM.