/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! |
@ 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 /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 I hope this helps |
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. |
All times are GMT -5. The time now is 05:15 PM. |