Project

General

Profile

Actions

Bug #18982

closed

How to get out of weird situation after rbd flatten?

Added by Christian Theune about 7 years ago. Updated over 1 year ago.

Status:
Duplicate
Priority:
Normal
Assignee:
Shinobu Kinjo
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Hope this is good for the tracker instead of the mailing list...

We have an image that was cloned from a snapshot:

rbd/foo (parent: rbd/foo-original@after-fixup)

We wanted to clean this up so I ran:

rbd flatten rbd/foo

This took a while as the volume is around 8TiB. At this point in time the volume rbd/foo did have snapshots.

I tried to unprotect the source of the clone, but that didn't work:

rbd snap unprotect rbd/foo-original@after-fixup
2017-02-17 23:14:55.009408 7fcea66087c0 -1 librbd: snap_unprotect: can't unprotect; at least 1 child(ren) in pool rbd
rbd: unprotecting snap failed: (16) Device or resource busy

After that I learned about the "deep flatten" feature. As this wasn't available any longer, I decided to delete the snapshots on rbd/foo. That didn't help either.

The weird thing now is that the metadata structures seem to have become corrupt:

# rbd children rbd/foo-original@after-fixup
rbd/foo

# rbd flatten rbd/foo
rbd flatten rbd/foo
Image flatten: 0% complete...failed.
rbd: flatten error: (22) Invalid argument
2017-02-17 23:19:24.903319 7efd554117c0 -1 librbd: image has no parent

Also, maybe of interest, the source of the clone (rbd/foo-original@after-fixup) has a parent, too.

I'm now keeping duplicate data and can't delete the superfluous copy. This sounds like at least there should be some workaround ... Help. :(

Actions

Also available in: Atom PDF