I am trying to add an SSD to a LVM VG. Here are the steps I did for it:
Running boniie++ on the vm I am not seeing any difference in the performance with the cache enabled. Have I done all the needed steps? Also looks like if new lv are added by creating and new vm disk or moving a disk, the cache pool needs to be attached manually. And if a disk/lv is moved off the vg, the cache needs to be detached before it is moved.
- created an new Linux LVM partition on the ssd: fdisk /dev/sdd
- created the physical volume on the ssd: pvcreate /dev/sdd1
- extended the VG in question: vgextend vm2-lvm /dev/sdd1
- created the cache lv: lvcreate -n DataLVcache -L58G vm2-lvm /dev/sdd1
- created the meta lv: lvcreate -n DataLVcacheMeta -L58M vm2-lvm /dev/sdd1
- activated the cache: lvconvert --type cache-pool --cachemode writeback --poolmetadata vm2-lvm/DataLVcacheMeta vm2-lvm/DataLVcache
- attached the cache to an existing vm's lv: lvconvert --type cache --cachepool DataLVcache vm2-lvm/vm-104-disk-0
Running boniie++ on the vm I am not seeing any difference in the performance with the cache enabled. Have I done all the needed steps? Also looks like if new lv are added by creating and new vm disk or moving a disk, the cache pool needs to be attached manually. And if a disk/lv is moved off the vg, the cache needs to be detached before it is moved.