Bug 9884 - /usr failed to be mounted during boot as XFS does not support the 'acl' option
Summary: /usr failed to be mounted during boot as XFS does not support the 'acl' option
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: 3
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-27 03:40 CEST by Glen Ogilvie
Modified: 2013-05-03 21:50 CEST (History)
2 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
sosreport.txt (199.42 KB, text/plain)
2013-04-27 03:41 CEST, Glen Ogilvie
Details

Description Glen Ogilvie 2013-04-27 03:40:49 CEST
Ideally, please look at this before Mageia 3 is released.. Some users may be affected during installation.


Description of problem:
System won't boot after installation,
because, it fails to mount /usr.

It fails to mount /usr, with the following mount error:
drakcut: drakcut: Mounting /usr with -o relatime,acl,relatime

The above, looks like it has relatime twice, which may be an error, however,
the problem appears to be the acl option.

From drakcut, Running:
mount -o relatime /dev/mapper/vg--mga-usr /sysroot/usr
works OK,
but:
mount -o relatime,acl /dev/mapper/vg--mga-usr /sysroot/usr
fails, with the same error that is displayed by drakcut.



How reproducible:
It can be reliably reproduced, against:Mageia-3-RC-x86_64-DVD.iso
date: Wed Apr 24 18:49:47 CEST 201


Steps to Reproduce:

Install, with the following partition layout:

First partition
/   ext4  2GB
Second partition (extended, vda5), Type: LVM

On LVM
swap 1 GB
/usr XFS 5 GB




Reproducible: 

Steps to Reproduce:
Comment 1 Glen Ogilvie 2013-04-27 03:41:40 CEST
Created attachment 3824 [details]
sosreport.txt
Comment 2 Glen Ogilvie 2013-04-27 03:55:03 CEST
The reason this fails, is that "acl" is not a valid mount option for an XFS file system.
Manuel Hiebel 2013-04-27 12:41:26 CEST

CC: (none) => mageia, thierry.vignaud
Version: 3 => Cauldron

Comment 3 Thierry Vignaud 2013-04-27 14:09:33 CEST
You should not have enabled 'acl' option :-)
Fixed in SVN, now this option is only enabled for fses that support it
Thanks for the report & thks for finding the issue

Status: NEW => RESOLVED
Resolution: (none) => FIXED
Summary: /usr failed to be mounted during boot => /usr failed to be mounted during boot as XFS does not support the 'acl' option

Comment 4 Glen Ogilvie 2013-04-28 02:03:45 CEST
(In reply to Thierry Vignaud from comment #3)
> You should not have enabled 'acl' option :-)
> Fixed in SVN, now this option is only enabled for fses that support it
> Thanks for the report & thks for finding the issue

Just to be clear, I didn't enable the ACL option, it seemed to default on.  I didn't even go to advanced mode in the installer where the ACL option can be set.

Version: Cauldron => 3

Comment 5 Glen Ogilvie 2013-04-28 12:29:43 CEST
I have not had a chance to test this yet from cauldron, but just a thought.

Could this bug also be in drakcut?  I ask this, because in the image that didn't work for me, fstab didn't have the acl option, although it was still being tried by drakcut on boot.   I guess it might just have been the way the installer wrote the initrd file..
Comment 6 Thierry Vignaud 2013-04-28 13:08:21 CEST
I guess dracut just uses the initial mount options from /etc/fstab
Comment 7 Glen Ogilvie 2013-04-29 11:48:21 CEST
Tested today:  Using stage2: 15.45

I an confirm that under advanced mode, ACL is not an option in the installer.

However, boot still fails as it still has the acl option for the xfs filesystem in /usr... On a complete fresh install fro
m cauldron.

Md5sum of stage2 I tested:
9bcfa5717163ff75c76273250d5268ed  x86_64/install/stage2/mdkinst.sqfs




Further debugging:
In installed system which won't boot: /etc/fstab is correct, it does not have the acl option.

If I boot into rescue mode, bind mount the needed file systems, chroot and rebuild initrd, it still has the same problem.

After a bit of digging:
I suspect this bug is actually in dracut:
dracut-025/modules.d/98usrmount/mount-usr.sh

It looks to me like, that dracut's script to mount /usr, just uses the same options as is set for the root file system maybe?

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 8 Colin Guthrie 2013-04-29 12:24:28 CEST
(In reply to Glen Ogilvie from comment #7)
> After a bit of digging:
> I suspect this bug is actually in dracut:
> dracut-025/modules.d/98usrmount/mount-usr.sh
> 
> It looks to me like, that dracut's script to mount /usr, just uses the same
> options as is set for the root file system maybe?

Hmm, can you point out where it reuses the root opts? To me it looks very much like it uses the $NEWROOT/etc/fstab to find the /usr mount and then appends it to the initramfs's /etc/fstab before it is mounted. It does adjust the options slightly in that it will do some btrfs specific tweaks and it will append "ro" or "rw" to the options if needed.

So I'm confused... can you point out where you think the error lies?

Can you confirm the /etc/fstab in the initramfs contains the wrong options for /sysroot/usr entry?
Comment 9 Glen Ogilvie 2013-04-29 12:56:34 CEST
The /etc/fstab within the initramfs does contain the wrong options. 

But the one in /sysroot/etc/fstab is correct.

I was just struggling to set where $_opts got set.  So was wondering if it came from the root fs.  One reason for wondering this, is that the mount command that fails has relatime twice.. so was wondering if it's reading the options from both file systems and joining them together. (I have not found proof of this).

Do you know how the /etc/fstab within the initramfs gets created?

Glen
Comment 10 Colin Guthrie 2013-04-29 13:21:26 CEST
The system's fstab is read as part of a while loop which filters the entries any only extracts the /usr one then appends that to the initramfs's fstab.

The code that does that is here:

http://colin.guthr.ie/git/boot/dracut/tree/modules.d/98usrmount/mount-usr.sh?h=mga-025#n57

I can't see how it would result in things looking as strange as it does for you :(

Can you post your system /etc/fstab? Perhaps something is in there that is messing up the parsing code linked above for some reason?
Comment 11 Colin Guthrie 2013-05-02 11:50:02 CEST
Did you manage to poke at this any more Glen? It's a bit tricky to work with so debugging can be slow :)
Comment 12 Glen Ogilvie 2013-05-02 13:25:44 CEST
Hi Colin,

I am keen to have a go at fixing this, but I've had a flat out week, so am not sure think I won't be able to look at this until the weekend.  So, I still have it in mind.

What I can get you now, is my filesystem layout on the test system. It's a little unusual, but that's the point, since I am testing the unusual:

2 x 4GB disks, each with 1 partition on them, (/dev/vda1 and /dev/vda2), both of type: 8e (lvm).

Both partitions are added to a volume group.
in the volume group, I have the following LVs.

boot (368MB), xfs filesystem
ntfs (688MB), ntfs filesystem
opt (160MB), reiserFS
root (5.65GB), encrypted XFS.
swap  (492m)


In the installer, when I first open up the VG and click on the encrypted partition, it shows an encrypted, and the file system type as brtfs (which it is not)..  When I click the use button, it asks me for the passphrase.  After entering it, the tab is not refreshed and goes blank, however, if I switch to a disk tab, then switch back to the volume group tab, it shows up correctly, and I can click on the encrypted xfs partition and click view, to view the files.

It is configured with grub2.

The above test system won't actually boot up, because it didn't cope with the encrypted root file system, so it ends up in drakcut, complaining about not being able to find /dev/mapper/crypt_vg_mga_root, however, that's not what this bug is about.
Comment 13 Glen Ogilvie 2013-05-02 13:28:20 CEST
(In reply to Glen Ogilvie from comment #12)
> Hi Colin,
> 
> I am keen to have a go at fixing this, but I've had a flat out week, so am
> not sure think I won't be able to look at this until the weekend.  So, I
> still have it in mind.
> 
> What I can get you now, is my filesystem layout on the test system. It's a
> little unusual, but that's the point, since I am testing the unusual:

---> Sorry.
the rest of the above comment was meant for bug #5661.
Comment 14 Colin Guthrie 2013-05-02 13:33:30 CEST
It's OK, I understood. I'd still like to get that one fixed too. Time for a new test VM methinks :D
Comment 15 Glen Ogilvie 2013-05-02 13:43:10 CEST
(In reply to Colin Guthrie from comment #10)
> 
> Can you post your system /etc/fstab? Perhaps something is in there that is
> messing up the parsing code linked above for some reason?

system fstab is not complex:

It contains:  /sysroot/etc/fstab
======================================

# Entry for /dev/vda1 :
UUID=4dadb83a-8a4d-4fb9-84b3-e9f3717f88e8 / ext4 acl,relatime 1 1
none /proc proc defaults 0 0
/dev/vg-mga/usr /usr xfs relatime 1 2
/dev/vg-mga/swap swap swap defaults 0 0
========================================




The fstab that is visible from drakcut: /etc/fstab
========================================
/dev/disk/by-uuid/4dadb83a-8a4d-4fb9-84b3-e9f3717f88e8 /sysroot ext4 acl,relatime 0 1
/dev/vg-mga/usr /sysroot/usr xfs relatime,acl,relatime 1 2
========================================
Comment 16 Colin Guthrie 2013-05-03 17:45:38 CEST
Reproduced in a test VM.
Comment 17 Colin Guthrie 2013-05-03 18:23:47 CEST
And found the problem. Very obvious after putting in some debug statements. I just need to tidy up my dracut packaging a bit (I've got some uncommitted patches etc.) and will push out an update.
Comment 18 Colin Guthrie 2013-05-03 21:50:03 CEST
Should now be fixed (after dracut is pushed). It was a missing " && \" for what it's worth:

http://svnweb.mageia.org/packages/cauldron/dracut/current/SOURCES/0514-usrmount-Fix-miss-detection-of-btrfs-subvolumes.patch?revision=412190&view=markup

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.