LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-09-2014, 11:23 PM   #1
Tadaen
Member
 
Registered: Sep 2005
Distribution: Arch
Posts: 210

Rep: Reputation: 39
Mounts ignoring /etc/fstab


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 #####

Last edited by Tadaen; 05-09-2014 at 11:26 PM.
 
Old 05-10-2014, 01:25 AM   #2
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
This sounds like your desktop environment's automatic mounting overriding fstab. When you plug the devices in does your DE show any kind of notification you could click? I know the first time the DE sometimes asks what you would like to do with the attached drive and in your case that would be to ignore it if that option is available.
If you can't find anything useful let us know which DE you're using and if I can't find anything I'm sure others will be along who can help.
 
1 members found this post helpful.
Old 05-10-2014, 02:01 PM   #3
Tadaen
Member
 
Registered: Sep 2005
Distribution: Arch
Posts: 210

Original Poster
Rep: Reputation: 39
Yes it is popping up the notification. Gnome Shell. Can't find anything settings for deciding automounts or not.
 
Old 05-11-2014, 11:07 AM   #4
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Could this be an answer if nothing else is found?
https://bbs.archlinux.org/viewtopic.php?id=120146
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding mounts to /etc/fstab ted_chou12 Linux - Newbie 1 08-11-2012 08:09 PM
samba mounts in fstab Zurvan Linux - Networking 5 04-17-2005 10:13 AM
boot ignoring my fstab? Feminista Slackware 1 02-11-2005 12:20 AM
fstab to define mounts on boot PhiMati Fedora 1 06-18-2004 05:29 PM
switching mounts in fstab elpresidente Linux - General 6 07-09-2002 07:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration