Simple setup. Debian testing ( Gnome if it matters ). 2 usb backup locations, a flash drive and a usb hard drive. Both flash and hdd are in the /etc/fstab via uuid with the noauto and user flags on them. They were copy pasted from a ls -l /dev/disk/by-uuid directly into the /etc/fstab. This is on a laptop and I have a rsync script that runs every 30 minutes for the flash drive, every 6 hours for the hard drive. This script will mount the drive if its not mounted. This is a laptop so sometimes the drives aren't plugged in.
When I get home from wherever with the laptop I plug in power and usb hub ( drives are in hub ), turn on and when I log in both drives are mounted as root, the hdd in the proper location but mounted as root not user. The flash drive as root mounted to /media/usb0. I can't figure why they are ignoring the fstab directives.
Any suggestions? To fix this I have to manually sudo umount both drives, then when the next backup occurs by the script it will mount them properly as user. The whole idea of this was to make it so I had to do nothing but plug them in / unplug them but having to manually umount them after a power on is defeating the purpose.
/etc/fstab for reference
Code:
# my additions
# usb hdd backup
UUID=3cbfd266-983a-4700-bb97-78a54a656103 /media/backups/hdd ext4 noauto,user 0 0
# usb fdd backup
UUID=6de6b375-5328-4be1-a1bb-ff9714f472ce /media/backups/fdd ext4 noauto,user 0 0
script, not sure this part matters
Code:
#!/bin/bash
#Name = myusbbu
#Author = Tadaen Sylvermane
#Purpose = Cron backups - Usb drives
#Last Edit = 2014/5/6 - 1427
##### begin script #####
if ! mountpoint -q $2 ; then
mount $2 && rsync -au --delete --include-from="${1}.include" --exclude="/*" $1 $2
else
rsync -au --delete --include-from="${1}.include" --exclude="/*" $1 $2
fi
##### end script #####