Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to preseed an installation of Debian on a system with 12 HDD.

Each drive have :

  • a 1M GPT partition
  • a 300MB RAID 1 /boot
  • a 20GB RAID 6 /
  • remaining space on a RAID 6 /data partition

It does not match my rules as:

  • an extra partition of 186 GB is created after the 4 first disks and parted identifies it as a swap partition
  • the "/data" size on these 8 last drives is reduced.

My preseed partitioning rules are the following:

d-i partman-auto/method string raid
d-i partman-auto/disk string /dev/sdl /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdi /dev/sdj /dev/sdk 
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_lvm_span boolean true
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm_nochanges boolean true
d-i partman-auto/choose_recipe select boot-root
d-i partman-auto/expert_recipe string                  \
     multiraid ::                                      \
          1 1 1 free                                   \
               $iflabel{ gpt }                         \
               method{ biosgrub }                      \
               .                                       \
          300 300 300 raid                           \
               $primary{ }                             \
               $bootable{ }                            \
               method{ raid }                          \
               .                                       \
          19999 19999 19999 raid                       \
               $primary{ }                             \
               method{ raid }                          \
               .                                       \
          3795144 3795144 1000000000 raid                \
               $primary{ }                             \
               method{ raid }                          \
               .                                       
d-i partman-auto-raid/recipe string                    \
     1 12 0 ext4 /boot                                  \
          /dev/sda2#/dev/sdb2#/dev/sdc2#/dev/sdd2#/dev/sde2#/dev/sdf2#/dev/sdg2#/dev/sdh2#/dev/sdi2#/dev/sdj2#/dev/sdk2#/dev/sdl2\
     .                                                 \
     6 12 0 ext4 /                                      \
          /dev/sda3#/dev/sdb3#/dev/sdc3#/dev/sdd3#/dev/sde3#/dev/sdf3#/dev/sdg3#/dev/sdh3#/dev/sdi3#/dev/sdj3#/dev/sdk3#/dev/sdl3\
     .                                                 \
     6 12 0 ext4 /data                                  \
          /dev/sda4#/dev/sdb4#/dev/sdc4#/dev/sdd4#/dev/sde4#/dev/sdf4#/dev/sdg4#/dev/sdh4#/dev/sdi4#/dev/sdj4#/dev/sdk4#/dev/sdl4\
     .                                                 
d-i mdadm/boot_degraded boolean true
d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman/confirm boolean true
d-i partman-md/confirm_nooverwrite boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman/alignment select minimal

However when fully installed the layout is the following:

Model: ATA ST4000NC000-1FR1 (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      20.5kB  1016kB  995kB                      bios_grub
 2      1016kB  301MB   300MB                      raid
 3      301MB   20.3GB  20.0GB                     raid
 4      20.3GB  4001GB  3980GB                     raid


Model: ATA ST4000NC000-1FR1 (scsi)
Disk /dev/sdb: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      20.5kB  1016kB  995kB                      bios_grub
 2      1016kB  301MB   300MB                      raid
 3      301MB   20.3GB  20.0GB                     raid
 4      20.3GB  4001GB  3980GB                     raid


Model: ATA ST4000NC000-1FR1 (scsi)
Disk /dev/sdc: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      20.5kB  1016kB  995kB                      bios_grub
 2      1016kB  301MB   300MB                      raid
 3      301MB   20.3GB  20.0GB                     raid
 4      20.3GB  4001GB  3980GB                     raid


Model: ATA ST4000NC000-1FR1 (scsi)
Disk /dev/sdd: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      20.5kB  1016kB  995kB                      bios_grub
 2      1016kB  301MB   300MB                      raid
 3      301MB   20.3GB  20.0GB                     raid
 4      20.3GB  4001GB  3980GB                     raid


Model: ATA ST4000NC000-1FR1 (scsi)
Disk /dev/sde: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system     Name  Flags
 1      20.5kB  1016kB  995kB
 2      1016kB  301MB   300MB                         raid
 3      301MB   20.3GB  20.0GB                        raid
 4      20.3GB  3815GB  3795GB                        raid
 5      3815GB  4001GB  186GB   linux-swap(v1)


Model: ATA ST4000NC000-1FR1 (scsi)
Disk /dev/sdf: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system     Name  Flags
 1      20.5kB  1016kB  995kB
 2      1016kB  301MB   300MB                         raid
 3      301MB   20.3GB  20.0GB                        raid
 4      20.3GB  3815GB  3795GB                        raid
 5      3815GB  4001GB  186GB   linux-swap(v1)


Model: ATA ST4000NC000-1FR1 (scsi)
Disk /dev/sdi: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system     Name  Flags
 1      20.5kB  1016kB  995kB
 2      1016kB  301MB   300MB                         raid
 3      301MB   20.3GB  20.0GB                        raid
 4      20.3GB  3815GB  3795GB                        raid
 5      3815GB  4001GB  186GB   linux-swap(v1)


Model: ATA ST4000NC000-1FR1 (scsi)
Disk /dev/sdh: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system     Name  Flags
 1      20.5kB  1016kB  995kB
 2      1016kB  301MB   300MB                         raid
 3      301MB   20.3GB  20.0GB                        raid
 4      20.3GB  3815GB  3795GB                        raid
 5      3815GB  4001GB  186GB   linux-swap(v1)


Model: ATA ST4000NC000-1FR1 (scsi)
Disk /dev/sdj: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system     Name  Flags
 1      20.5kB  1016kB  995kB
 2      1016kB  301MB   300MB                         raid
 3      301MB   20.3GB  20.0GB                        raid
 4      20.3GB  3815GB  3795GB                        raid
 5      3815GB  4001GB  186GB   linux-swap(v1)


Model: ATA ST4000NC000-1FR1 (scsi)
Disk /dev/sdl: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system     Name  Flags
 1      20.5kB  1016kB  995kB
 2      1016kB  301MB   300MB                         raid
 3      301MB   20.3GB  20.0GB                        raid
 4      20.3GB  3815GB  3795GB                        raid
 5      3815GB  4001GB  186GB   linux-swap(v1)


Model: ATA ST4000NC000-1FR1 (scsi)
Disk /dev/sdk: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system     Name  Flags
 1      20.5kB  1016kB  995kB
 2      1016kB  301MB   300MB                         raid
 3      301MB   20.3GB  20.0GB                        raid
 4      20.3GB  3815GB  3795GB                        raid
 5      3815GB  4001GB  186GB   linux-swap(v1)


Model: ATA ST4000NC000-1FR1 (scsi)
Disk /dev/sdg: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system     Name  Flags
 1      20.5kB  1016kB  995kB
 2      1016kB  301MB   300MB                         raid
 3      301MB   20.3GB  20.0GB                        raid
 4      20.3GB  3815GB  3795GB                        raid
 5      3815GB  4001GB  186GB   linux-swap(v1)


Model: Linux Software RAID Array (md)
Disk /dev/md0: 300MB
Sector size (logical/physical): 512B/4096B
Partition Table: loop

Number  Start  End    Size   File system  Flags
 1      0.00B  300MB  300MB  ext4


Model: Linux Software RAID Array (md)
Disk /dev/md1: 200GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop

Number  Start  End    Size   File system  Flags
 1      0.00B  200GB  200GB  ext4


Model: Linux Software RAID Array (md)
Disk /dev/md2: 37.9TB
Sector size (logical/physical): 512B/4096B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  37.9TB  37.9TB  ext4

Do you have any idea to correct this layout?

Thanks!

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.