Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create_disk: Ensure filesystem journal on rootfs is clean #1482

Merged
merged 1 commit into from
May 27, 2020

Conversation

cgwalters
Copy link
Member

Trying to get osmet to work with RHCOS, I kept being unable to
mount the rootfs and it turned out that while the code I'd added
to unpack the LUKS bits was working fine, mounting the rootfs
was failing because the block device was read-only, but XFS
wanted to replay the journal.

And for some reason I haven't traced through yet, this apparently
isn't affecting FCOS, but the unclean journal is breaking osmet
w/RHCOS.

This of course is the second time I've hit this problem of
"ext4 flushes the journal on umount, XFS doesn't" - see
also ostreedev/ostree#1049

Adding the necessary invocation of xfs_freeze ensures
that our firstboot has a clean XFS journal for / which
is just a good idea anyways.

Trying to get osmet to work with RHCOS, I kept being unable to
mount the rootfs and it turned out that while the code I'd added
to unpack the LUKS bits was working fine, mounting the rootfs
was failing because the block device was read-only, but XFS
wanted to replay the journal.

And for some reason I haven't traced through yet, this apparently
isn't affecting FCOS, but the unclean journal is breaking osmet
w/RHCOS.

This of course is the *second* time I've hit this problem of
"ext4 flushes the journal on umount, XFS doesn't" - see
also ostreedev/ostree#1049

Adding the necessary invocation of `xfs_freeze` ensures
that our firstboot has a clean XFS journal for `/` which
is just a good idea anyways.
@cgwalters
Copy link
Member Author

And for some reason I haven't traced through yet, this apparently
isn't affecting FCOS, but the unclean journal is breaking osmet
w/RHCOS.

Answer: It's not really this, it's that I wasn't making the dm-linear blockdev readonly, so XFS thought it had a writable blockdev but it really didn't.

But still, we should have our filesystems mount cleanly to start.

@lucab
Copy link
Contributor

lucab commented May 27, 2020

/lgtm

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, lucab

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants