If you’ve cached an LV (see yesterday’s post), how do you remove the cache and go back to just a simple origin LV?
It turns out to be simple, but you must make sure you are removing the cache pool (not the origin LV, not the CacheMetaLV):
# lvremove vg_guests/lv_cache Flushing cache for testoriginlv. 0 blocks must still be flushed. Logical volume "lv_cache" successfully removed
This command deletes the CacheDataLV and CacheMetaLV. To reenable the cache you have to go through the process here again.
This is also what you must (currently) do if you want to resize the LV — ie. remove the cache pool, resize the origin LV, then recreate the cache on top. Apparently they’re going to get lvresize to do the right thing in a future version of LVM.
lvconvert –uncache seems a safer option …