Commit 0e130ccd authored by Vitaly Lipatov's avatar Vitaly Lipatov

update lvm_cache

parent 464ef5d6
...@@ -10,7 +10,7 @@ CSSDDEV=$(realpath $SSDDEV) ...@@ -10,7 +10,7 @@ CSSDDEV=$(realpath $SSDDEV)
lv_check() lv_check()
{ {
local LV="$1" local LV="$1"
lvs | grep -q "${LV}_cache" lvs | grep $VOL | grep -q "${LV}_cache"
} }
lv_create() lv_create()
...@@ -28,11 +28,12 @@ lv_create() ...@@ -28,11 +28,12 @@ lv_create()
lv_disable() lv_disable()
{ {
local LV="$1" local LV="$1"
lvconvert --splitcache $VOL/${LV} || return
lvremove $VOL/${LV}_cache lvremove $VOL/${LV}_cache
lvremove $VOL/${LV}_cache_meta lvremove $VOL/${LV}_cache_meta
} }
pvscan | grep "PV $CSSDDEV" || vgextend $VOL $SSDDEV pvscan | grep "VG $VOL" | grep "PV $CSSDDEV" || vgextend $VOL $SSDDEV
#lv_disable vz #lv_disable vz
#lv_disable ipfs2 #lv_disable ipfs2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment