9.6. Disabling caching for a logical volume
This procedure disables dm-cache or dm-writecache caching that is currently enabled on a logical volume.
Conditions préalables
- Caching is enabled on a logical volume.
Procédure
Deactivate the logical volume:
lvchange --activate n <vg>/<main-lv>
# lvchange --activate n <vg>/<main-lv>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace vg with the volume group name, and main-lv with the name of the logical volume where caching is enabled.
Detach the
cachevolorcachepoolvolume:lvconvert --splitcache <vg>/<main-lv>
# lvconvert --splitcache <vg>/<main-lv>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace the following values:
Replace vg with the volume group name, and main-lv with the name of the logical volume where caching is enabled.
Exemple 9.7. Detaching the
cachevolorcachepoolvolumelvconvert --splitcache vg/main-lv
# lvconvert --splitcache vg/main-lv Detaching writecache already clean. Logical volume vg/main-lv writecache has been detached.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification steps
Check that the logical volumes are no longer attached together:
lvs --all --options +devices <vg>
# lvs --all --options +devices <vg> LV Attr Type Devices fastvol -wi------- linear /dev/fast-pv main-lv -wi------- linear /dev/slow-pvCopy to Clipboard Copied! Toggle word wrap Toggle overflow