Ubuntu
反向“lvconvert –splitcache”?
為了擴展邏輯卷,我不得不從中分離記憶體:
root@server:/home# lvextend -L+50G /dev/vg1/home Unable to resize logical volumes of cache type. root@server:/home# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert home vg1 Cwi-aoC--- 250.00g [homeCache] [home_corig] 100.00 9.29 0.00 newvar vg1 Cwi-aoC--- 200.00g [Cvar_cache] [newvar_corig] 100.00 0.92 0.00 root_lv vg1 -wi-ao---- 93.07g var vg1 -wi-ao---- 120.00g root@server:/home# lvconvert --splitcache /dev/vg1/home Logical volume vg1/home is not cached and cache pool vg1/homeCache is unused. root@server:/home# lvextend -L+50G /dev/vg1/home Size of logical volume vg1/home changed from 250.00 GiB (64000 extents) to 300.00 GiB (76800 extents). Logical volume home successfully resized. root@server:/home# resize2fs !$ resize2fs /dev/vg1/home resize2fs 1.42.13 (17-May-2015)
如何將拆分記憶體重新附加到 LV?我應該使用 –uncache 來銷毀記憶體然後重建它嗎?如果是這樣,我下一步要銷毀舊記憶體以不浪費空間嗎?
如果有人正在尋找這個(或未來的我),請回答:
lvconvert --type cache --cachepool cache-pool vg/lv
所以在這種情況下:
lvconvert --type cache --cachepool homeCache vg1/home
您可以通過以下方式查看所有 LV,包括記憶體:
lvs -a