I'm running Kubuntu 12.04 with KDE 4.11.1. I have a 2TB hard drive mounted in an external USB enclosure. The drive label is Backup. The drive is not automatically mounted when I boot. There are two ways I wish to mount it:
- I have a root cron entry that will mount the drive if it is not already mounted. This is part of my nightly backup script.
- As a normal user, I can click the drive label in Dolphin's Places panel and the drive will be mounted.
Previously, the drive would mount at /media/Backup in both cases.
I manually created the directory /media/Backup previously and it still exists. The directory is required so that my backup script can mount this disk before the backup runs. As I said, this was working as intended before some recent system updates. I want the drive to mount at the same location in both the situations above.
However, with recent system updates (apparently the LTS Raring HWE stack) the drive mounts at /media/myusername/Backup from Dolphin if I mount it from Dolphin as a normal user. It mounts as /media/root/Backup if I mount it as root user.
There are a variety of ways this new Ubuntu scheme can fail under my scenario. In fact, it is rountinely failing and my nightly backups are not happening anymore. I won't list all the ways I have seen it fail in my troubleshooting so far. I would simply like to restore the previous behavior for this disk or achieve something that works reliably under the new system. Specifically, what I would like to see is:
- the drive isn't mounted at boot and isn't mounted unless/until needed.
- whether mounted by my normal user via Dolphin or via a script run as root, the drive is always mounted at the same place (so my backup script can find it).
- if the drive hasn't been mounted yet (i.e., via Dolphin), my backup script (run as root) is able to mount it at the intended location and then proceed with the backup.
- file permissions on files and directories on the mounted drive work as expected
Here's all I needed in my root crontab previously. I'd like to get this working again.
00 03 * * * mount -L Backup /media/Backup >> /var/log/backup.log
05 03 * * * /opt/storeBackup/bin/storeBackup.pl -f /configfile
I prefer not to change my system-wide default behavior. Therefore, this solution doesn't seem ideal: https://askubuntu.com/a/276670/36661 (and I don't yet know if I have the udisk version that would support that solution).
I would appreciate comments on this possible solution: