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

fix(xfs): clearing the xfs log before generating UUID #64

Merged
merged 3 commits into from
Mar 26, 2020

Conversation

pawanpraka1
Copy link
Contributor

@pawanpraka1 pawanpraka1 commented Mar 20, 2020

xfs_admin command to generate the new UUID for the cloned
volume fails without returning error if there is log available
in the filesystem :

ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed. Mount the filesystem to replay the log, and unmount it before
re-running xfs_admin. If you are unable to mount the filesystem, then use
the xfs_repair -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.

No UUID will be generated in this case and application can not mount the volume.

Here mounting the filesystem to the temp location with "nouuid" mount option first
so that it can replay the logs first and system is in clean state and then unmount it
and after that generating the UUID with the xfs_admin command.

Signed-off-by: Pawan pawan@mayadata.io

xfs_admin command to generate the new UUID for the cloned
volume fails without returning error if there is log available
in the filesystem :

ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed.  Mount the filesystem to replay the log, and unmount it before
re-running xfs_admin.  If you are unable to mount the filesystem, then use
the xfs_repair -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.

No UUID will be generated in this case and application can not mount the volume.
Here clearing the xfs log before generating the UUID.

Signed-off-by: Pawan <pawan@mayadata.io>
@pawanpraka1 pawanpraka1 requested a review from kmova March 20, 2020 08:09
pkg/zfs/zfs_util.go Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Mar 20, 2020

Codecov Report

Merging #64 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #64   +/-   ##
=======================================
  Coverage   23.57%   23.57%           
=======================================
  Files          14       14           
  Lines         475      475           
=======================================
  Hits          112      112           
  Misses        362      362           
  Partials        1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 468bf66...704d9d5. Read the comment docs.

@pawanpraka1 pawanpraka1 added the bug Something isn't working. label Mar 20, 2020
@pawanpraka1 pawanpraka1 added this to the v0.6.0 milestone Mar 20, 2020
Signed-off-by: Pawan <pawan@mayadata.io>
xfs_admin command to generate the new UUID for the cloned
volume fails without returning error if there is log available
in the filesystem :

ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed.  Mount the filesystem to replay the log, and unmount it before
re-running xfs_admin.  If you are unable to mount the filesystem, then use
the xfs_repair -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.

No UUID will be generated in this case and application can not mount the volume.

Here mounting the filesystem to the temp location with "nouuid" mount option first
so that it can replay the logs first and system is in clean state and then unmount it
and after that generating the UUID with the xfs_admin command.

Signed-off-by: Pawan <pawan@mayadata.io>
@kmova kmova merged commit 27517c6 into openebs:master Mar 26, 2020
@pawanpraka1 pawanpraka1 deleted the xfs branch March 27, 2020 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants