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

Problems mounting XFS volume clones / restored snapshots #482

Open
jsafrane opened this issue May 26, 2021 · 5 comments
Open

Problems mounting XFS volume clones / restored snapshots #482

jsafrane opened this issue May 26, 2021 · 5 comments

Comments

@jsafrane
Copy link
Contributor

XFS does not allow to mount two volumes that have the same UUID on the same machine. The second mount fails with:

[44557.612032] XFS (vde): Filesystem has duplicate UUID fadf19ab-bbcc-4f40-8d4f-44550e822db1 - can't mount

This is problematic when using a cloned volume or a restored snapshot - the original volume and the new volume cannot be mounted on the same compute node.

On what level should be the issue solved?

  • CSI spec could mention that it's CSI plugin problem to make sure cloned / restored volumes are usable on the same node as the original vol (e.g. by using -o nouuid mount opt. for xfs volumes or using xfs_admin -U genereate to re-generate UUID on the first mount after volume restore / clone).

  • CSI spec could mention that it's CO problem to pass e.g. -o nouuid mount option to all XFS NodeStage/NodePublish calls.

In both cases, someone must check that XFS is used and know that it needs a special handling.

@jdef
Copy link
Member

jdef commented May 26, 2021 via email

@saad-ali
Copy link
Member

Agreed with @jdef. We discussed this at the community meeting today, see Notes

Conclusion:

  • For this bug:
    1. Pick a random CSI driver to fix this issue in the driver
    2. Write an E2E test to catch this issues
    3. Make the E2E test opt-in and send messages to CSI announce to encourage other CSI drivers to fix this issue.
    4. At some point in the future make the test required.
  • For this class of bug:
    • Must do the same as above for each similar bug we discover.

@humblec
Copy link
Contributor

humblec commented May 27, 2021

Ceph CSI was hit on this issue at clone time , ceph/ceph-csi#966 (comment) , nouuid or regenerating UUID (- depends on xfsprogs version..etc) could be the possible fixes.

@jsafrane
Copy link
Contributor Author

jsafrane commented Jun 1, 2021

i. Pick a random CSI driver to fix this issue in the driver
ii. Write an E2E test to catch this issues

I'm experimenting with a Kubernetes e2e test and AWS EBS CSI driver fix in kubernetes-sigs/aws-ebs-csi-driver#913

@jsafrane
Copy link
Contributor Author

jsafrane commented Jun 3, 2021

Turned into real e2e test in Kubernetes: kubernetes/kubernetes#102538

Akrog added a commit to embercsi/ember-csi that referenced this issue Jan 25, 2022
As mentioned in a CSI issue [1], XFS does not allow to mount two volumes
that have the same UUID on the same machine.

This is problematic when using a cloned volume or a restored snapshot -
the original volume and the new volume cannot be mounted on the same
compute node.

This patch fixes this issue by mounting XFS volumes with the "nouuid"
option, since regenerating the UUID requires mounting the volume on the
controller, and now the latest e2e tests [1] pass.

[1]: container-storage-interface/spec#482
[2]: kubernetes/kubernetes#102538
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants