mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
more dmraid fixes
This commit is contained in:
parent
b70503ad21
commit
780528c7c8
1 changed files with 9 additions and 1 deletions
|
@ -946,7 +946,7 @@ _createpv()
|
||||||
ALREADYINUSE=""
|
ALREADYINUSE=""
|
||||||
# skip physical volume devices
|
# skip physical volume devices
|
||||||
ALREADYINUSE="$(pvs -o pv_name --noheading)"
|
ALREADYINUSE="$(pvs -o pv_name --noheading)"
|
||||||
# skip raidpartions on physical volumes!
|
# skip raidpartitions on physical volumes!
|
||||||
if [ "$(pvs -o pv_name --noheading | grep /dev/md_)" ]; then
|
if [ "$(pvs -o pv_name --noheading | grep /dev/md_)" ]; then
|
||||||
ALREADYINUSE="$ALREADYINUSE $(pvs -o pv_name --noheading | sed -e 's#p[0-9]$##g')"
|
ALREADYINUSE="$ALREADYINUSE $(pvs -o pv_name --noheading | sed -e 's#p[0-9]$##g')"
|
||||||
fi
|
fi
|
||||||
|
@ -954,6 +954,10 @@ _createpv()
|
||||||
for i in $(ls /dev/mapper/* | grep -v control); do
|
for i in $(ls /dev/mapper/* | grep -v control); do
|
||||||
lvs $i --noheading 2>/dev/null && ALREADYINUSE="$ALREADYINUSE $i"
|
lvs $i --noheading 2>/dev/null && ALREADYINUSE="$ALREADYINUSE $i"
|
||||||
done
|
done
|
||||||
|
# skip dmraid main volume
|
||||||
|
for i in $(dmraid -s -c); do
|
||||||
|
ALREADYINUSE="$ALREADYINUSE /dev/mapper/$i"
|
||||||
|
done
|
||||||
for i in $PARTS; do
|
for i in $PARTS; do
|
||||||
# skip harddisks which contain already encrypted partitions!
|
# skip harddisks which contain already encrypted partitions!
|
||||||
for k in $(ls /dev/mapper/* | grep -v control); do
|
for k in $(ls /dev/mapper/* | grep -v control); do
|
||||||
|
@ -1200,6 +1204,10 @@ _luks()
|
||||||
if [ "$(pvs -o pv_name --noheading | grep /dev/md_)" ]; then
|
if [ "$(pvs -o pv_name --noheading | grep /dev/md_)" ]; then
|
||||||
ALREADYINUSE="$ALREADYINUSE $(pvs -o pv_name --noheading | sed -e 's#p[0-9]$##g')"
|
ALREADYINUSE="$ALREADYINUSE $(pvs -o pv_name --noheading | sed -e 's#p[0-9]$##g')"
|
||||||
fi
|
fi
|
||||||
|
# skip dmraid main volume
|
||||||
|
for i in $(dmraid -s -c); do
|
||||||
|
ALREADYINUSE="$ALREADYINUSE /dev/mapper/$i"
|
||||||
|
done
|
||||||
for i in $PARTS; do
|
for i in $PARTS; do
|
||||||
# skip harddisks which contain already encrypted partitions!
|
# skip harddisks which contain already encrypted partitions!
|
||||||
for k in $(ls /dev/mapper/* | grep -v control); do
|
for k in $(ls /dev/mapper/* | grep -v control); do
|
||||||
|
|
Loading…
Reference in a new issue