LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 05-23-2011, 08:38 AM   #1
nokangaroo
Member
 
Registered: Nov 2009
Posts: 141

Rep: Reputation: 25
/etc/mtab and /proc/mounts do not show tune2fs mount option


I just discovered that you can automount an ext4 filesystem with acl enabled by running "tune2fs -o acl". (I knew about tune2fs but did not dare to use it until now). However, the acl mount option does not show up in /etc/mtab and /proc/mounts. Can I ignore this, or is there a way of telling the system about the actual mount options?

Edit: I can do "tune2fs -l <device> | grep acl | awk '{print $4}'" and if that isn't empty I can update /etc/mtab with "mount -f -o remount,acl <device>", but like the udev rule I previously messed with this seems lumberingly unelegant to me. Isn't there a better way? Linux developers, please speak up!

Last edited by nokangaroo; 05-23-2011 at 09:20 AM.
 
Old 05-23-2011, 02:09 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi there,

Yes you can use tune2fs to do so but I am not getting why you are looking in /etc/mtab

You can simply add up a line in /etc/fstab for that like following:

Code:
/dev/sda1         /             ext4             defaults,acl          1 2
where,

/dev/sda1 is the device you can use the UUID or label instead of device name
/ is the mount point
ext4 is the file system type
defaults,acl are the mount option

Also you can mount a file system with acl using the following command:

Code:
mount -o remount,acl /dev/sda1
Remember this command is only valid till the system reboots. If you want to make the changes permanent then you have to make changes in /etc/fstab as mentioned above. Also make sure that you take a backup of /etc/fstab before making any modifications.

I hope this helps
 
Old 05-23-2011, 04:16 PM   #3
nokangaroo
Member
 
Registered: Nov 2009
Posts: 141

Original Poster
Rep: Reputation: 25
Thank you, but that is not what I meant. I was talking about automounting external disks with acl option, without an entry in fstab (I have been using acls in fstab for a long time). I tried it with a udev rule, which worked after a fashion (but no "safely remove drive"), and when I do it with tune2fs the disk automounts with acls enabled but the acl option does not show up in /etc/mtab and /proc/mounts. There may be a reason for this, but it has nothing to do with fstab.

The reason why I want to update /etc/mtab is that it will make it easier to write scripts that depend on it.

Last edited by nokangaroo; 05-24-2011 at 03:41 AM.
 
  


Reply

Tags
acl, automount, ext4, ubuntu



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
Certain NFS mount options not showing in /proc/mounts. larold Linux - Enterprise 1 05-21-2010 08:30 PM
/etc/mtab not up-to-date compared to /proc/mounts kenneho Linux - Server 2 07-07-2009 02:28 AM
cannot mount internal hard drive: .hal-mtab and .hal-mtab-lock messed up extremewaffles Linux - Newbie 3 07-01-2009 05:15 PM
/etc/mtab vs. /proc/self/mounts ciotog Slackware 1 10-10-2005 04:31 AM
/proc/mounts and /etc/mtab differs pradi_net Linux - Software 0 05-19-2004 09:47 AM

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

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

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