uvol: lvm: make 'up' call reliable

Changing a volume right after activation doesn't work well due to some
caching or race-condition issue.
Perform activation as last lvchange operation as a work-around.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle 2021-07-30 02:14:39 +01:00
parent 23023e08f5
commit 27c16a70b1
No known key found for this signature in database
GPG key ID: 5A8F39C31C3217CA

View file

@ -179,8 +179,8 @@ activatevol() {
*) *)
[ "$lv_active" = "active" ] && return 0 [ "$lv_active" = "active" ] && return 0
uvol_uci_commit "$1" uvol_uci_commit "$1"
lvm_cmd lvchange -a y "$lv_full_name" || return $?
lvm_cmd lvchange -k n "$lv_full_name" || return $? lvm_cmd lvchange -k n "$lv_full_name" || return $?
lvm_cmd lvchange -a y "$lv_full_name" || return $?
return 0 return 0
;; ;;
esac esac