1
0
Fork 0
Cheatsheets for use with Navi
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
694 B

% lvm
# Stop caching a volume and free its cache volume
sudo lvconvert --uncache <lv>
# Use spare space on a physical volume for (unencrypted) swap
sudo lvcreate -n <swaplv> -l100%PVS <vg> <pv> && sudo mkswap /dev/<vg>/<swaplv> && sudo swapon -p20 /dev/<vg>/<swaplv>
# Drop and free a swap volume
sudo swapoff /dev/<vg>/<swaplv> && sudo lvremove /dev/<vg>/<swaplv>
# Use spare space on a physical volume for writeback caching another logical volume
sudo lvcreate -n <cachepool> -l100%PVS <vg> <pv> && sudo lvconvert --type cache --cachemode writeback --cachepool <cachepool> <vg>/<targetlv>
# Tell a volume to flush all cache without uncaching
sudo lvchange --cachepolicy cleaner <lv>