Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# The method should be set to "raid".
d-i partman-auto/method string raid
# Specify the disks to be partitioned. They will all get the same layout,
# so this will only work if the disks are the same size.
d-i partman-auto/disk string /dev/sda /dev/sdb /dev/sdc /dev/sdd
# Next you need to specify the physical partitions that will be used.
d-i partman-auto/expert_recipe string \
multiraid :: \
10000 10 10000 raid \
$primary{ } method{ raid } \
. \
50000 10 50000 raid \
method{ raid } \
. \
10000 10 10000 raid \
method{ raid } \
. \
500 10000 1000000000000 raid \
method{ raid } \
.
# Last you need to specify how the previously defined partitions will be
# used in the RAID setup. Remember to use the correct partition numbers
# for logical partitions. RAID levels 0, 1, 5, 6 and 10 are supported;
# devices are separated using "#".
# Parameters are:
# <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \
# <devices> <sparedevices>
d-i partman-auto-raid/recipe string \
1 2 2 ext4 / /dev/sda1#/dev/sdb1 /dev/sdc1#/dev/sdd1 \
. \
1 2 2 swap - /dev/sda5#/dev/sdb5 /dev/sdc5#/dev/sdd5 \
. \
1 2 2 ext4 /var /dev/sda6#/dev/sdb6 /dev/sdc6#/dev/sdd6 \
. \
1 2 2 ext4 /var/log /dev/sda7#/dev/sdb7 /dev/sdc7#/dev/sdd7 \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment