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>
Replace vg with the volume group name, and main-lv with the name of the logical volume where caching is enabled.
Detach the
cachevol
orcachepool
volume:# lvconvert --splitcache <vg>/<main-lv>
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
cachevol
orcachepool
volume# lvconvert --splitcache vg/main-lv Detaching writecache already clean. Logical volume vg/main-lv writecache has been detached.
Verification steps
Check that the logical volumes are no longer attached together:
# lvs --all --options +devices <vg> LV Attr Type Devices fastvol -wi------- linear /dev/fast-pv main-lv -wi------- linear /dev/slow-pv
Ressources supplémentaires
-
The
lvmcache(7)
man page