Initialize all disks at once when doing RAID autopartitioning
In order to avoid extra partman restarts which will result in a broken
state, all disks that are autopartitioned using the "raid" method will
now be initialized at once.
r55270
Jérémy Bobbio
15 years ago
22 | 22 |
* Call autopartition-lvm on all disks in partman-auto/disk at once to enable
|
23 | 23 |
proper support of multiple disks partitioning.
|
24 | 24 |
Depends: partman-auto-lvm (>= 29)
|
|
25 |
* Call auto_init_disks() with all disks that are going to be used in a
|
|
26 |
"raid" method in order to avoid bogus partman restarts.
|
25 | 27 |
|
26 | 28 |
-- Jérémy Bobbio <[email protected]> Fri, 01 Aug 2008 22:49:11 +0000
|
27 | 29 |
|
80 | 80 |
raid)
|
81 | 81 |
# Partition all the disks given ready for
|
82 | 82 |
# partman-auto-raid
|
|
83 |
ids=""
|
83 | 84 |
for disk in $disks; do
|
84 | 85 |
id=$(dev_to_partman "$disk") || true
|
85 | |
if [ "$id" ]; then
|
86 | |
autopartition "$id"
|
87 | |
fi
|
|
86 |
ids="${ids:+$ids }$id"
|
|
87 |
done
|
|
88 |
auto_init_disks $ids || exit $?
|
|
89 |
for id in $ids; do
|
|
90 |
autopartition "$id"
|
88 | 91 |
done
|
89 | 92 |
exit 0
|
90 | 93 |
;;
|