PartMan
LeslieCarr (Talk | contribs) |
LeslieCarr (Talk | contribs) |
||
| Line 41: | Line 41: | ||
filesystem{ X } use ext3, murderfs, xfs, etc in here to tell it what filesystem to run | filesystem{ X } use ext3, murderfs, xfs, etc in here to tell it what filesystem to run | ||
mountpoint{ X } use things like /, /mnt/sda3, etc | mountpoint{ X } use things like /, /mnt/sda3, etc | ||
| − | + | ||
| − | pre> | + | <pre> |
# Parameters are: | # Parameters are: | ||
# <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \ | # <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \ | ||
| Line 51: | Line 51: | ||
. | . | ||
</pre> | </pre> | ||
| − | + | This snippet is telling us to make a raid 1, with 2 devices, 0 spares, ext3 filesystem, mounted at /, and across /dev/sda1 and /dev/sda2 | |
<pre> | <pre> | ||
d-i partman-md/confirm boolean true | d-i partman-md/confirm boolean true | ||
| + | </pre> | ||
| + | Theoretically now it confirms stuff automatically. It doesn't. Partman lies | ||
| + | <pre> | ||
d-i partman-md/device_remove_md boolean true | d-i partman-md/device_remove_md boolean true | ||
| + | </pre> | ||
| + | |||
| + | This lets partman remove any existing raids | ||
| + | |||
| + | <pre> | ||
d-i partman/confirm_write_new_label boolean true | d-i partman/confirm_write_new_label boolean true | ||
d-i partman/choose_partition select finish | d-i partman/choose_partition select finish | ||
| Line 63: | Line 71: | ||
d-i mdadm/boot_degraded boolean true | d-i mdadm/boot_degraded boolean true | ||
</pre> | </pre> | ||
| + | Most of these possibly do what they appear to do. | ||
| + | |||
| + | Boot degraded is important - if we have a disk failure we'd still like the system to boot, just warn us. | ||
Revision as of 18:54, 21 October 2011
Contents |
Basic Info
Partman is an incomprehensible automatic partitioning language.
Help Files
These files are in the Debian and Ubuntu packages, and give some explanation
Dissecting a Semi-working configuration
# Automatic software RAID 1 with LVM partitioning d-i partman-auto/method string raid
This sentence makes partman know that it will be making a raid
# Use the first two disks d-i partman-auto/disk string /dev/sda /dev/sdb
after d-i partman-auto/disk you must put the list of hard drives that are going to be used
# Define physical partitions
d-i partman-auto/expert_recipe string \
multiraid :: \
400000 1000 9500000 raid \
$primary{ } method{ raid } \
. \
4000 1200 4100 linux-swap \
$primary{ } method{ swap } format{ } \
.
An interesting thing about partman is that you can put everything on one line, or you can break lines using the character "\". Use a "." in between hard drives. $primary{ } is needed to make the partition a primary partition. method { } is used to tell it what type to format. You can use swap, raid, or format. format { } tells partman to format the partition. Don't put this statement in a section that you will be using for the raid. use_filesystem{ } makes partman use a file system (don't know why this isn't done by the filesystem command) filesystem{ X } use ext3, murderfs, xfs, etc in here to tell it what filesystem to run mountpoint{ X } use things like /, /mnt/sda3, etc
# Parameters are:
# <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \
# <devices> <sparedevices>
d-i partman-auto-raid/recipe string \
1 2 0 ext3 / \
/dev/sda1#/dev/sdb1 \
.
This snippet is telling us to make a raid 1, with 2 devices, 0 spares, ext3 filesystem, mounted at /, and across /dev/sda1 and /dev/sda2
d-i partman-md/confirm boolean true
Theoretically now it confirms stuff automatically. It doesn't. Partman lies
d-i partman-md/device_remove_md boolean true
This lets partman remove any existing raids
d-i partman/confirm_write_new_label boolean true d-i partman/choose_partition select finish d-i partman/confirm boolean true d-i partman-lvm/device_remove_lvm boolean true d-i mdadm/boot_degraded boolean true
Most of these possibly do what they appear to do.
Boot degraded is important - if we have a disk failure we'd still like the system to boot, just warn us.