Bug 345338 - boot.crypto: forgets mount flags
boot.crypto: forgets mount flags
Status: VERIFIED FIXED
Classification: openSUSE
Product: openSUSE 10.3
Classification: openSUSE
Component: Basesystem
Final
x86 All
: P5 - None : Normal (vote)
: ---
Assigned To: Ludwig Nussel
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-30 19:51 UTC by Jan Engelhardt
Modified: 2009-11-23 23:42 UTC (History)
2 users (show)

See Also:
Found By: Beta-Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Engelhardt 2007-11-30 19:51:43 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.
Comment 1 Jan Engelhardt 2007-11-30 19:54:00 UTC
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
Comment 2 Matthias Koenig 2007-12-13 12:07:03 UTC
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.
Comment 3 Jan Engelhardt 2007-12-13 12:30:21 UTC
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.
Comment 4 Jan Engelhardt 2007-12-15 17:12:10 UTC
-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
Comment 5 Ludwig Nussel 2007-12-17 08:13:08 UTC
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.
Comment 6 Jan Engelhardt 2007-12-18 16:23:00 UTC
Not a bug. http://lkml.org/lkml/2007/12/18/151
Comment 7 Ludwig Nussel 2008-01-09 11:18:49 UTC
Ok, so I removed the extra mount check entirely.