Support multiple disks in partman-auto-lvm
We now support preseeded partitioning of multiple disks when using the
"lvm" method. On top of that recipes can now optionally specify:
- partitions holding Physical Volumes,
- the Volume Group held by a Physical Volume,
- in which Volume Group a Logical Volume will be.
Disks that are going to be partitioned are specified in
partman-auto/disk. Partitions that are neither on a Logical Volumes,
nor have a specific device specified (e.g. /boot) will default on being
on the first disk.
To explicitely declare a Physical Volume, use the following in the
recipe:
100 1000 1000000000 ext3 \
$defaultignore{ } \
$primary{ } \
method{ lvm } \
device{ /dev/hdb } \
vg_name{ vg00 } \
.
Both "device{ ... }" and "vg_name{ }" are optional.
The device *must* be listed in partman-auto/disk.
The Volume Group holding a Logical Volume can be specified using
"in_vg{ }", e.g.:
96 512 300% linux-swap \
$lvmok{ } \
in_vg{ vg00 } \
lv_name{ myswap } \
method{ swap } \
format{ } \
.
Some implementation details:
* autopartition-lvm and auto_lvm_perform() now takes multiple devices
as their first argument.
* display.d/initial_auto has been updated to give all disks to
autopartition-lvm at once.
* auto_lvm_prepare() will create a map of VGs to PVs in the form of
files in /var/lib/partman/auto_lvm_map. These files will be used by
auto_lvm_perform() to create all known Volume Groups and create their
Logical Volumes.
Based on a patch by Grégory Oestreicher.
(Closes: #385220, #462396)
r55267
Jérémy Bobbio
15 years ago
19 | 19 |
* Rename auto_init_disk() to auto_init_disks() as it can now initialize
|
20 | 20 |
multiple disks at once. autopartition has been updated accordingly.
|
21 | 21 |
Breaks: partman-auto-lvm (<< 29)
|
|
22 |
* Call autopartition-lvm on all disks in partman-auto/disk at once to enable
|
|
23 |
proper support of multiple disks partitioning.
|
|
24 |
Depends: partman-auto-lvm (>= 29)
|
22 | 25 |
|
23 | 26 |
-- Jérémy Bobbio <[email protected]> Fri, 01 Aug 2008 22:49:11 +0000
|
24 | 27 |
|
55 | 55 |
;;
|
56 | 56 |
lvm)
|
57 | 57 |
search-path autopartition-lvm || exit 1
|
|
58 |
ids=""
|
58 | 59 |
for disk in $disks; do
|
59 | 60 |
id=$(dev_to_partman "$disk") || true
|
60 | |
if [ "$id" ]; then
|
61 | |
autopartition-lvm "$id"
|
62 | |
exit 0
|
63 | |
fi
|
|
61 |
ids="${ids:+$ids }$id"
|
64 | 62 |
done
|
|
63 |
if [ "$ids" ]; then
|
|
64 |
autopartition-lvm "$ids"
|
|
65 |
exit 0
|
|
66 |
fi
|
65 | 67 |
exit 1
|
66 | 68 |
;;
|
67 | 69 |
crypto)
|