This allows preseeding of a fully configured RAIDed system by setting
partman-auto/method to "raid" and using partman-auto-raid/recipe to tell
it how to construct the RAID array(s).

The preseedable parameter partman-auto-raid/recipe should consist of comma
separated recipes and recipes are of the form:

<raidtype> <devcount> <sparecount> <fstype> <mountpoint> <devices> <sparedevices>

where <devices> is a hash separated list of the devices to make up the RAID
and <sparedevices> is a hash separated list of the spare devices in the
array.

e.g.
1 2 0 ext3 / /dev/discs/disc0/part1#/dev/discs/disc1/part1 .
1 2 0 swap / /dev/discs/disc0/part5#/dev/discs/disc1/part5 .
(but without the line break)

This makes the first RAID device that was created by this udeb be a RAID1 of
two disks disc0/part1 and disc1/part1 and be formatted as ext3 and mounted
on /.  The second is also a RAID1 and used as swap (and the mountpoint
ignored).

-- Simon Huggins <huggie@earth.li>
sponsored by Black Cat Networks http://www.blackcatnetworks.co.uk/

It is also possible to preseed LVM over RAID.  The following example will
create a RAID 1 setup on two hard drives with:

  /dev/md0 as /boot (ext3)
  /dev/md1 as a LVM physical volume
  /dev/mapper/<hostname>-root as / (ext3)
  /dev/mapper/<hostname>-swap_1 as swap
  /dev/mapper/<hostname>-home as /home (ext3)

--- 8< ---
d-i partman-auto/method string raid

d-i partman-auto/disk string /dev/sda /dev/sdb

# raidid can be anything, as long as it doesn't contain spaces or slashes
# and matches something in raidid{ } in partman-auto/expert_recipe. You can
# use hash separated lists of ordinary device names instead if you prefer.
d-i partman-auto-raid/recipe string			\
	1 2 0 ext3 /boot raidid=1 .			\
	1 2 0 lvm - raidid=2 .

# Please note that RAID partitions are tagged as "lvmignore"
# and LVM logical volumes as "defaultignore" and "lvmok".
d-i partman-auto/expert_recipe string			\
	multiraid ::					\
		100 512 256 raid			\
			$lvmignore{ }			\
			$primary{ }			\
			method{ raid }			\
			raidid{ 1 }			\
		.					\
		900 5000 4000 raid			\
			$lvmignore{ }			\
			method{ raid }			\
			raidid{ 2 }			\
		.					\
		700 5000 4000 ext3			\
			$defaultignore{ }		\
			$lvmok{ }			\
			method{ format }		\
			format{ }			\
			use_filesystem{ }		\
			filesystem{ ext3 }		\
			mountpoint{ / }			\
		.					\
		64 512 300% linux-swap			\
			$defaultignore{ }		\
			$lvmok{ }			\
			method{ swap }			\
			format{ }			\
		.					\
		100 1000 1000000000 ext3		\
			$defaultignore{ }		\
			$lvmok{ }			\
			method{ format }		\
			format{ }			\
			use_filesystem{ }		\
			filesystem{ ext3 }		\
			mountpoint{ /home }		\
		.
--- >8 ---
