ceph osd pool delete cache cache --yes-i-really-really-mean-it
ceph osd pool delete cache2 cache2 --yes-i-really-really-mean-it
+ # make sure we can't clobber snapshot state
+ ceph osd pool create snap_base 2
+ ceph osd pool create snap_cache 2
+ rbd -p snap_cache create foo --size 10
+ rbd -p snap_cache snap create foo --snap snap1
+ rbd -p snap_cache snap rm foo --snap snap1
+ expect_false ceph osd tier add snap_base snap_cache --force-nonempty
+ ceph osd pool delete snap_base snap_base --yes-i-really-really-mean-it
+ ceph osd pool delete snap_cache snap_cache --yes-i-really-really-mean-it
+
# convenient add-cache command
ceph osd pool create cache3 2
ceph osd tier add-cache slow cache3 1024000
err = -ENOTEMPTY;
goto reply;
}
+ if (!tp->removed_snaps.empty() || !tp->snaps.empty()) {
+ ss << "tier pool '" << tierpoolstr << "' has snapshot state; it cannot be added as a tier without breaking the pool";
+ err = -ENOTEMPTY;
+ goto reply;
+ }
// go
pg_pool_t *np = pending_inc.get_new_pool(pool_id, p);
pg_pool_t *ntp = pending_inc.get_new_pool(tierpool_id, tp);