Backport #17895
closedtools: snapshotted RBD extent objects can't be manually evicted from a cache tier
Added by David Disseldorp over 7 years ago. Updated over 7 years ago.
Updated by David Disseldorp over 7 years ago
- Status changed from New to Fix Under Review
- Assignee set to David Disseldorp
Submitted via https://github.com/ceph/ceph/pull/11968 .
Updated by Nathan Cutler over 7 years ago
- Copied from Feature #17896: rados: add option to include clones when doing flush or evict added
Updated by Nathan Cutler over 7 years ago
- Description updated (diff)
original description¶
RBD extent objects can't be manually evicted from a cache tier when snapshots exist:
rbd_data.10142ae8944a.00000000000000fc./rados -p rbd-cache cache-flush-evict-all
failed to evict /rbd_data.10142ae8944a.00000000000000fc: (16) Device or resource busy
...
./rados -p rbd-cache listwatchers rbd_data.10142ae8944a.00000000000000fc
echo $?
0
This object is present in both the hot and cold tier:
./ceph osd map rbd-cache rbd_data.10142ae8944a.00000000000000fc
osdmap e18 pool 'rbd-cache' (3) object 'rbd_data.10142ae8944a.00000000000000fc' -> pg 3.76b49b48 (3.0) -> up ([1,2,0], p1) acting ([1,2,0], p1)
find dev/osd1/current/3.0_head/ | grep 10142ae8944a.00000000000000fc
dev/osd1/current/3.0_head/rbd\udata.10142ae8944a.00000000000000fc__head_76B49B48__3
dev/osd1/current/3.0_head/rbd\udata.10142ae8944a.00000000000000fc__5_76B49B48__3
./ceph osd map rbd rbd_data.10142ae8944a.00000000000000fc
osdmap e18 pool 'rbd' (0) object 'rbd_data.10142ae8944a.00000000000000fc' -> pg 0.76b49b48 (0.0) -> up ([0,2,1], p0) acting ([0,2,1], p0)
find dev/osd0/current/0.0_head/ | grep 10142ae8944a.00000000000000fc
dev/osd0/current/0.0_head/rbd\udata.10142ae8944a.00000000000000fc__5_76B49B48__0
dev/osd0/current/0.0_head/rbd\udata.10142ae8944a.00000000000000fc__head_76B49B48__0
The evict request targets the head (non-snapshot) object, and in attempting to evict, _verify_no_head_clones() detects the presence of the snapshot (clone) object, and rejects eviction as a result.
This bug is addressed by the following upstream changes:
commit 383177be07700f9fee067ecb7a27155c322f98dd
Author: Mingxin Liu <mingxin@xsky.com>
Date: Mon Jun 27 14:37:30 2016 +0800
qa/workunits: update test_cache_pool.sh
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
commit 3dd9fa2fb39c76ba3977d7bc09cd28bb3465d56c
Author: Mingxin Liu <mingxin@xsky.com>
Date: Mon Jun 27 14:35:45 2016 +0800
tools/rados: add --with-clones option to include clones for cache-flush/cache-evict
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
commit b1cf2d9276834d04172d45d5f4dd48ca3e99d338
Author: Mingxin Liu <mingxin@xsky.com>
Date: Sat Jun 25 11:19:01 2016 +0800
tools/rados: default to include clone objects when excuting "cache-flush-evict-all"
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
Github SR to follow.
Updated by Nathan Cutler over 7 years ago
- Description updated (diff)
- Status changed from Fix Under Review to In Progress
Updated by Loïc Dachary over 7 years ago
- Subject changed from Snapshotted RBD extent objects can't be manually evicted from a cache tier to tools: snapshotted RBD extent objects can't be manually evicted from a cache tier
Updated by Loïc Dachary over 7 years ago
- Status changed from In Progress to Resolved
- Target version set to v10.2.6