mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
blkdeactivate: cleanup
Use a different variable for translated name in dm/md_deactivate fn Fix dmraidoption/dmraidoptions in man page.
This commit is contained in:
parent
bdccab07f9
commit
b0f4e0fcec
@ -63,7 +63,7 @@ all the paths are unavailable for any underlying device-mapper multipath
|
|||||||
device.
|
device.
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
.BR -r ", " --mdraidoption \ \fImdraid_options\fP
|
.BR -r ", " --mdraidoptions \ \fImdraid_options\fP
|
||||||
Comma-separated list of MD RAID specific options:
|
Comma-separated list of MD RAID specific options:
|
||||||
.RS
|
.RS
|
||||||
.IP \fIwait\fP
|
.IP \fIwait\fP
|
||||||
|
@ -211,14 +211,15 @@ deactivate_holders () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
deactivate_dm () {
|
deactivate_dm () {
|
||||||
local name=$(printf "%s" "$name")
|
local xname
|
||||||
test -b "$DEV_DIR/mapper/$name" || return 0
|
xname=$(printf "%s" "$name")
|
||||||
|
test -b "$DEV_DIR/mapper/$xname" || return 0
|
||||||
test -z "${SKIP_DEVICE_LIST["$kname"]}" || return 1
|
test -z "${SKIP_DEVICE_LIST["$kname"]}" || return 1
|
||||||
|
|
||||||
deactivate_holders "$DEV_DIR/mapper/$name" || return 1
|
deactivate_holders "$DEV_DIR/mapper/$xname" || return 1
|
||||||
|
|
||||||
echo -n " [DM]: deactivating $devtype device $name ($kname)... "
|
echo -n " [DM]: deactivating $devtype device $xname ($kname)... "
|
||||||
if eval "$DMSETUP" $DMSETUP_OPTS remove "$name" "$OUT" "$ERR"; then
|
if eval "$DMSETUP" $DMSETUP_OPTS remove "$xname" "$OUT" "$ERR"; then
|
||||||
echo "done"
|
echo "done"
|
||||||
else
|
else
|
||||||
echo "skipping"
|
echo "skipping"
|
||||||
@ -280,9 +281,10 @@ deactivate_lvm () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
deactivate_md () {
|
deactivate_md () {
|
||||||
local name=$(printf "%s" "$name")
|
local xname
|
||||||
|
xname=$(printf "%s" "$name")
|
||||||
local sync_action
|
local sync_action
|
||||||
test -b "$DEV_DIR/$name" || return 0
|
test -b "$DEV_DIR/$xname" || return 0
|
||||||
test -z "${SKIP_DEVICE_LIST["$kname"]}" || return 1
|
test -z "${SKIP_DEVICE_LIST["$kname"]}" || return 1
|
||||||
|
|
||||||
# Skip MD device deactivation if MD tools missing.
|
# Skip MD device deactivation if MD tools missing.
|
||||||
@ -291,7 +293,7 @@ deactivate_md () {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
deactivate_holders "$DEV_DIR/$name" || return 1
|
deactivate_holders "$DEV_DIR/$xname" || return 1
|
||||||
|
|
||||||
echo -n " [MD]: deactivating $devtype device $kname... "
|
echo -n " [MD]: deactivating $devtype device $kname... "
|
||||||
|
|
||||||
@ -307,7 +309,7 @@ deactivate_md () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if eval "$MDADM" $MDADM_OPTS -S "$name" "$OUT" "$ERR"; then
|
if eval "$MDADM" $MDADM_OPTS -S "$xname" "$OUT" "$ERR"; then
|
||||||
echo "done"
|
echo "done"
|
||||||
else
|
else
|
||||||
echo "skipping"
|
echo "skipping"
|
||||||
|
Loading…
Reference in New Issue
Block a user