RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2013894 - Can not mount XFS partition on CentOS-Stream-GenericCloud-9 qcow2 on older platforms
Summary: Can not mount XFS partition on CentOS-Stream-GenericCloud-9 qcow2 on older pl...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: rhel-guest-image
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-14 03:17 UTC by Ian Wienand
Modified: 2023-03-14 18:56 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-08 11:18:33 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-99754 0 None None None 2021-10-14 03:19:26 UTC

Description Ian Wienand 2021-10-14 03:17:53 UTC
If I do the following

---
$ wget http://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20211013.3.x86_64.qcow2
$ sudo guestfish -a ./CentOS-Stream-GenericCloud-9-20211013.3.x86_64.qcow2
...
><fs> list-filesystems 
/dev/sda1: xfs
><fs> mount /dev/sda1 /
libguestfs: error: mount: /dev/sda1 on / (options: ''): mount: /sysroot: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error.
><fs> 
---

I can not open this filesystem on a wide variety of platforms; Ubuntu Bionic, Focal and CentOS 8 all fail.  The problem seems to be

---
[Thu Oct 14 00:46:33 2021] XFS (dm-0): Superblock has unknown read-only compatible features (0x8) enabled.
[Thu Oct 14 00:46:33 2021] XFS (dm-0): Superblock has unknown incompatible features (0x8) enabled.
[Thu Oct 14 00:46:33 2021] XFS (dm-0): Filesystem can not be safely mounted by this kernel.
[Thu Oct 14 00:46:33 2021] XFS (dm-0): SB validate failed with error -22.
---

It does not work trying to mount ro, either; I've tried making it a loop device and mounting directly without guestfish too

---
$ sudo mount -o nouuid,ro /dev/mapper/loop0p1 /tmp/mnt
mount: /tmp/mnt: wrong fs type, bad option, bad superblock on /dev/mapper/loop0p1, missing codepage or helper program, or other error.
---

In <insert search engine> I can not find any reference at all to "feature (0x8)"?  What is it, and is there any way around this?

I can seem to mount this on a Fedora 34 system.  So I assume it is something in a very recent kernel making the disk format incompatible.

We use this to do customisation of images.  It makes it a chicken-and-egg problem if the only place we can customise the centos-9 image is on centos-9 itself.

Could we please do something to these images to make the FS a lowest-common-denominator that can be mounted/modified pretty-much anywhere?

Comment 1 Josh Boyer 2021-10-14 11:22:16 UTC
Eric, is this related to bug 1937973?  If so, I thought e.g. RHEL 8 would have backported code to allow this to mount?

Comment 2 Eric Sandeen 2021-10-14 13:25:26 UTC
Yes, it is related to the new features enabled by default in bug 1937973. One of those features is for Y2038 compatibility.

As far as I know, there has never been a requirement that older RHEL relesases must support all disk formats present in newer RHEL releases. For example, when we added metadata CRC support to XFS in RHEL8 by default, we did not backport that support to RHEL7.

That said, the two features added by default for RHEL9 are less invasive, and most likely could be enabled in RHEL8.  TBH the userspace component would be the most work. We'd need to plan for it, but it's probably not too late to have it by RHEL8.6 if it /is/ considered a requirement.

Another option could be that for OS images we expect to be hosted on on RHEL releases, we *could* turn those features back off with the associated lack of functionality (primarily Y2038 support.)

Comment 3 Steve Baker 2021-10-14 22:21:18 UTC
I have just compared the xfs_info output of the latest 9-stream image with the latest rhel-9 compose:

CentOS-Stream-GenericCloud-9-20211014.0.x86_64.qcow2
meta-data=/dev/nbd0p1            isize=512    agcount=4, agsize=512000 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1    bigtime=1
data     =                       bsize=4096   blocks=2048000, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

rhel-guest-image-9.0-20211013.10.x86_64.qcow2
meta-data=/dev/nbd1p3            isize=512    agcount=4, agsize=648829 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1    bigtime=0
data     =                       bsize=4096   blocks=2595315, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

Given that rhel-9 is apparently not enabling bigtime, and the support lifecycle of 9-stream will end well short of 2038, either of these could justify switching off bigtime in 9-stream built images.

Comment 4 Ian Wienand 2021-10-20 21:41:22 UTC
Just for anyone's reference who finds this; a 5.10 kernel is sufficient to mount such a partition.  I think that you can mount it on centos 8-stream (but not 8) and we have now switched our builder system to Debian Bullseye which can also mount it.

Still, it is probably good for the image to be mountable on the previous major release, IMO

Comment 5 Eric Sandeen 2021-10-20 22:00:35 UTC
If it's not on in RHEL9 at this point, that's an oversight.  It's our current plan to enable this, at least by RHEL9 GA.

However:

# cat /etc/redhat-release 
Red Hat Enterprise Linux release 9.0 Beta (Plow)
# rpm -qf /etc/redhat-release 
redhat-release-9.0-2.8.el9.x86_64
# rpm -q xfsprogs
xfsprogs-5.12.0-4.el9.x86_64
# xfs_info / | grep bigtime
         =                       reflink=1    bigtime=1 inobtcount=1

It appears to be turned on in RHEL9 beta.

FWIW, Y2038 timestamps may matter before the year 2038; it's uncommon, but there are cases where times can be set ahead. And boxes don't burn to the ground when the support lifecycle ends. It felt prudent to get ahead of it.

If it's a hard requirement to have RHEL9 filesystems mountable on older RHELs, we need to know that ASAP so we can make plans, either to backport the features to RHEL8 (RHEL8.6 at best, it will not happen for RHEL7), or to disable it by default in RHEL9 and give the customer clear instructions for feature upgrade under RHEL9 when needed...

Comment 6 John Ferlan 2021-10-29 10:41:47 UTC
Assigned to Rick for initial triage per bz process and age of bug created or assigned to virt-maint without triage.

Comment 7 Rick Barry 2021-11-05 20:59:59 UTC
Eric, based on the previous comments, this is not an issue specific to rhel-guest-image. From what I understand, the changes from bug 1937973 has implications across a major release that need to be discussed and worked out by your team.

Are you OK with taking this BZ to move it forward?

Comment 8 Alex Iribarren 2021-11-19 16:48:13 UTC
I've just hit this issue as well. I'm building CS9 images in our CS8 Koji builders and I need to be able to extract the root fs UUID so I can tell Openstack Ironic where to find it.

I tried to work around this issue by producing a CS9 image with bigtime=0, but now I'm just hitting another problem:

---
> LIBGUESTFS_BACKEND=direct guestfish --ro -a cs9-cloud-20211119-8.x86_64.raw -i cat /etc/fstab
libguestfs: error: inspect_os: lstat: /grub/menu.lst: Input/output error
> LIBGUESTFS_BACKEND=direct guestfish --ro -a cs9-cloud-20211119-8.x86_64.raw

Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: ‘help’ for help on commands
      ‘man’ to read the manual
      ‘quit’ to quit the shell

><fs> trace 1
><fs> run
libguestfs: trace: launch
libguestfs: trace: max_disks
libguestfs: trace: max_disks = 255
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_sockdir
libguestfs: trace: get_sockdir = "/run/user/17954"
libguestfs: trace: get_backend_setting "gdb"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: launch = 0
><fs> list-filesystems 
libguestfs: trace: list_filesystems
libguestfs: trace: list_filesystems = ["/dev/sda1", "xfs", "/dev/sda14", "unknown", "/dev/sda15", "vfat"]
/dev/sda1: xfs
/dev/sda14: unknown
/dev/sda15: vfat
><fs> mount /dev/sda1 /
libguestfs: trace: mount "/dev/sda1" "/"
libguestfs: trace: vfs_type "/dev/sda1"
libguestfs: trace: vfs_type = "xfs"
libguestfs: trace: mount = -1 (error)
libguestfs: error: mount: mount exited with status 32: mount: /sysroot: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error.
><fs>
---

What's the other new xfs feature enabled by default that I need to disable to make this work? (I don't have access to bug 1937973)

Comment 9 Brian Stinson 2021-11-19 16:54:21 UTC
inobtcount is the other feature that is involved here

Comment 10 Eric Sandeen 2021-11-19 19:23:34 UTC
(In reply to Rick Barry from comment #7)
> Eric, based on the previous comments, this is not an issue specific to
> rhel-guest-image. From what I understand, the changes from bug 1937973 has
> implications across a major release that need to be discussed and worked out
> by your team.
> 
> Are you OK with taking this BZ to move it forward?

there's nothing for me to do here as far as I can tell, what you have encountered is a new on-disk feature on by default in rhel9 which is not currently supported in RHEL8. That's not a bug, though - it's an intentional and necessary change, with the side-effect of incompatibilities with older kernels.

However, I have opened bug 2022903 and bug 2024201 to enable these features in RHEL8, should land in RHEL8.6.

Brian - you are correct. mkfs.xfs -m bigtime=0,inobtcount=0 should disable both new features and make a rhel8 compatible filesystem.

Comment 11 Rick Barry 2021-12-02 20:34:24 UTC
> (In reply to Rick Barry from comment #7)
> > Eric, based on the previous comments, this is not an issue specific to
> > rhel-guest-image. From what I understand, the changes from bug 1937973 has
> > implications across a major release that need to be discussed and worked out
> > by your team.
> > 
> > Are you OK with taking this BZ to move it forward?
> 
> there's nothing for me to do here as far as I can tell, what you have
> encountered is a new on-disk feature on by default in rhel9 which is not
> currently supported in RHEL8. That's not a bug, though - it's an intentional
> and necessary change, with the side-effect of incompatibilities with older
> kernels.
> 
> However, I have opened bug 2022903 and bug 2024201 to enable these features
> in RHEL8, should land in RHEL8.6.

Thanks, Eric. If those features are available in RHEL 8.6, it seems that would resolve the issue for RHEL, but not for the other use cases mentioned in the BZ description.

I'm including Troy Dawson and Tom Gundersen here. (As of RHEL 8.4 and 9.0, Image builder is used to build the rhel-guest-image, but this is not the case for CentOS Stream 9. I'm not sure if a rhel-guest-image that's built by Image Builder also exhibits the same behavior.)

Troy/Tom, could you review this BZ and see if you think there's anything that should be done from an image build perspective? Or is having the features back-ported to RHEL 8.6 as currently planned the best solution?

Comment 12 Brian Stinson 2021-12-02 21:38:15 UTC
Having those features backported to RHEL 8.6 is the ideal case here, if it's feasible.

Comment 13 Rick Barry 2021-12-03 16:22:18 UTC
(Adding Wei Shi from Virt QE)

Comment 14 Troy Dawson 2021-12-10 13:55:55 UTC
We have updated the kickstart files for the CentOS Stream 9 kvm and ec2 images to use -m bigtime=0,inobtcount=0
At this time the composes are having some issues, so we don't have anything for you to test yet, but we are working on it.

Comment 15 Eric Sandeen 2021-12-10 14:20:44 UTC
Thanks. If the built images differ from a default RHEL9 install, I think that would be something that is worth clearly documenting - though I'm not exactly sure where to do so.  I understand the need to alter the install, but differing capabilities depending on the OS source may be confusing, and documentation might help.

The most user-visible difference will be an inability to read or write timestamps beyond 2038.

-Eric

Comment 17 Wei Shi 2022-03-08 11:18:33 UTC
Verified with CentOS-Stream-GenericCloud-9-20220302.0.x86_64.qcow2


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