mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
0ecf232194
@ -123,7 +123,7 @@ Command is executed with environmental variable
|
|||||||
in this environment will not try to interact with dmeventd.
|
in this environment will not try to interact with dmeventd.
|
||||||
To see the fullness of a thin pool command may check these
|
To see the fullness of a thin pool command may check these
|
||||||
two environmental variables
|
two environmental variables
|
||||||
\fBDMEVENTD_THIN_POOL_DATA\fP and \fBDMEVENTD_THIN_POOL_DATA\fP.
|
\fBDMEVENTD_THIN_POOL_DATA\fP and \fBDMEVENTD_THIN_POOL_METADATA\fP.
|
||||||
Command can also read status with tools like \fBlvs\fP(8).
|
Command can also read status with tools like \fBlvs\fP(8).
|
||||||
.
|
.
|
||||||
.SH ENVIRONMENT VARIABLES
|
.SH ENVIRONMENT VARIABLES
|
||||||
|
@ -33,7 +33,7 @@ aux prepare_md_dev 1 64 2 "$dev1" "$dev2"
|
|||||||
|
|
||||||
mddev=$(< MD_DEV)
|
mddev=$(< MD_DEV)
|
||||||
pvdev=$(< MD_DEV_PV)
|
pvdev=$(< MD_DEV_PV)
|
||||||
|
sleep 3
|
||||||
mdadm --stop "$mddev"
|
mdadm --stop "$mddev"
|
||||||
|
|
||||||
# copy fake PV/VG header PV3 -> PV2 (which is however md raid1 leg)
|
# copy fake PV/VG header PV3 -> PV2 (which is however md raid1 leg)
|
||||||
@ -52,7 +52,7 @@ sleep 3
|
|||||||
# print what blkid thinks about each PV
|
# print what blkid thinks about each PV
|
||||||
for i in "$dev1" "$dev2" "$dev3" "$dev4"
|
for i in "$dev1" "$dev2" "$dev3" "$dev4"
|
||||||
do
|
do
|
||||||
blkid "$i"
|
blkid -c /dev/null -w /dev/null "$i" || echo "Unknown signature"
|
||||||
done
|
done
|
||||||
|
|
||||||
# expect open count for each PV to be 0
|
# expect open count for each PV to be 0
|
||||||
@ -74,20 +74,21 @@ sleep 3
|
|||||||
dmsetup info -c
|
dmsetup info -c
|
||||||
|
|
||||||
# if for any reason array went up - stop it again
|
# if for any reason array went up - stop it again
|
||||||
mdadm --detail "$mddev" && {
|
if mdadm --detail "$mddev" ; then
|
||||||
mdadm --stop "$mddev"
|
mdadm --stop "$mddev"
|
||||||
aux udev_wait
|
aux udev_wait
|
||||||
should not mdadm --detail "$mddev"
|
should not mdadm --detail "$mddev"
|
||||||
}
|
fi
|
||||||
|
|
||||||
# now reassemble array from PV1 & PV2
|
# now reassemble array from PV1 & PV2
|
||||||
mdadm --assemble --verbose "$mddev" "$dev1" "$dev2"
|
mdadm --assemble --verbose "$mddev" "$dev1" "$dev2"
|
||||||
aux udev_wait
|
aux udev_wait
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
# and let 'fake hdr' to be fixed from master/primary leg
|
# and let 'fake hdr' to be fixed from master/primary leg
|
||||||
mdadm --action=repair "$mddev"
|
# (when mdadm supports repair)
|
||||||
sleep 1
|
if mdadm --action=repair "$mddev" ; then
|
||||||
|
sleep 1
|
||||||
# should be showing correctly PV3 & PV4
|
# should be showing correctly PV3 & PV4
|
||||||
pvs
|
pvs
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user