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
mount-utils: force-format xfs-filesystems too #104923
Conversation
@davidkarlsen: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
66c9fbf
to
04f759b
Compare
addda76
to
2d30874
Compare
Signed-off-by: David J. M. Karlsen <david@davidkarlsen.com>
2d30874
to
e16f755
Compare
/assign @jingxu97 |
@saad-ali ptal? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/assign @jingxu97 For approval. |
I'd like to make sure I understand this: Format shouldn't happen if there is no filesystem. What would cause this code path to be hit (i.e. no filesystem detected, but format fails because a filesystem exists)? I couldn't quite follow openebs/lvm-localpv#135 I checked the PR that introduced force for ext3/ext4 formatting (kubernetes/utils#127) and I didn't see a good explanation there either. |
The code relies on underlying OS tooling which simply checks the volume for traces of file systems, and gives you a warning that you are about to overwrite a file system you possibly hold dear - "are you really sure...". The default behavior of This is fine in a manual environment, but with regards to automatically provisioning file systems this will only halt provisioning needlessly. You create and remove file systems all the time, so there will quickly be traces of old file systems.
When creating a logical volume, lvm will take what is marked as available. This is your security. Then mkfs comes in and creates a file system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You create and remove file systems all the time, so there will quickly be traces of old file systems.
Yes, there are traces of an old file system there, it is to be expected, and must be bypassed, hence the -f.
SGTM, thanks!
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: davidkarlsen, pohly, saad-ali 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 |
Signed-off-by: David J. M. Karlsen david@davidkarlsen.com
What type of PR is this?
/kind bug
/sig storage
What this PR does / why we need it:
XFS filesystems are not force-formatted, this might lead to failures as initially experienced in openebs/lvm-localpv#135
Which issue(s) this PR fixes:
Fixes: openebs/lvm-localpv#135
Fixes: kubernetes/mount-utils#4
Should I maybe clone the issue into this repo?
Special notes for your reviewer:
See similar behaviour for ext3/4 filesystems.
Does this PR introduce a user-facing change?
NONE
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: