improve lvm

This commit is contained in:
illiliti 2020-04-15 23:03:07 +03:00
parent 9645b8c3c4
commit a44fa55f2b

View File

@ -223,7 +223,17 @@ install_lvm()
lvm_opts="$lvm_opts" \ lvm_opts="$lvm_opts" \
>> "${workdir}/etc/config" >> "${workdir}/etc/config"
mkdir -p "${workdir}/etc/lvm" lvm_config="
devices {
write_cache_state = 0
}
backup {
backup = 0
archive = 0
}
global {
use_lvmetad = 0
}"
# word splitting is safe by design # word splitting is safe by design
# shellcheck disable=2086 # shellcheck disable=2086
@ -231,22 +241,13 @@ install_lvm()
for opt; do case "$opt" in for opt; do case "$opt" in
config | config=1) config | config=1)
lvmconfig > "${workdir}/etc/lvm/lvm.conf" embed_lvm_config=1
return
;; ;;
esac; done esac; done
printf "%s\n" \ mkdir -p "${workdir}/etc/lvm"; lvmconfig \
'devices {' \ --config "$lvm_config" \
'write_cache_state = 0' \ ${embed_lvm_config:+--mergedconfig} \
'}' \
'backup {' \
'backup = 0' \
'archive = 0' \
'}' \
'global {' \
'use_lvmetad = 0' \
'}' \
> "${workdir}/etc/lvm/lvm.conf" > "${workdir}/etc/lvm/lvm.conf"
} }