Bugzilla – Bug 345338
boot.crypto: forgets mount flags
Last modified: 2009-11-23 23:42:53 UTC
After entering the password for an encrypted xfs volume, I notice that the qflags are reset: [ 58.452696] XFS mounting filesystem dm-0 [ 58.784971] XFS resetting qflags for filesystem dm-0 [ 58.785040] Ending clean XFS mount for filesystem: dm-0 fsck 1.40.2 (12-Jul-2007) [/sbin/fsck.xfs (1) -- /] fsck.xfs -a /dev/disk/by-id/ata-WDC_WD400EB-00CPF0_WD- /sbin/fsck.xfs: XFS file system. fsck succeeded. Mounting root device read-write. [ 58.883097] XFS mounting filesystem dm-0 [ 59.238300] Ending clean XFS mount for filesystem: dm-0 this can only happen when the volume was previously mounted with -o usrquota,grpquota and now has been mounted without them. Hence I assume that the script forgets to mount said volume with the flags I gave in fstab. This omission of fstab flags is *BAD* as it causes a quota rescan on the second mount (see above). On every boot.
It is not the root partition (I just pasted that because the bootlog does not contain /home). Fstab: /dev/mapper/home /home xfs usrquota,grpquota,nobarrier 0 0
Are you using crypttab or cryptotab? Recommended is crypttab, which just calls mount /dev/mapper/$name So, it should automatically use the options from fstab.
crypttab with dm-crypt device and fstab. (Obviously, since I posted an fstab entry in comment #1 ;-)) But according to the kernel and boot.log, the qflags are reset, which only happens when the presence of quota flags changed from presence->absence. I guess I will add #!/bin/bash -x to boot.crypto to see what it is doing exactly. Leaving as NEEDINFO.
-x gives: + mount -t xfs -n -o ro /dev/mapper/home /home Uhuh! Of course that will turn off quota. (In function paranoid_safety_checks()) There are a lot of possibilities where flags are not sourced from /etc/fstab: 1. both DEVICE and MNTPT are specified 2. -o is specified
I guess I should add an option to turn off that extra safety check. OTOH I'd also call this a bug in xfs. It's mounted read-only so it shouldn't modify the file system.
Not a bug. http://lkml.org/lkml/2007/12/18/151
Ok, so I removed the extra mount check entirely.