I'm essentially trying to put /usr/local/
on /dev/sdb
, and the normal boot/root/swap on sda. To complicate things, I've had to use GPT since the disk is >6TB. Seems no matter what I try, the SDB drive is never used. Here's my current attempt:
d-i partman-basicfilesystems/choose_label string gpt
d-i partman-basicfilesystems/default_label string gpt
d-i partman-partitioning/choose_label string gpt
d-i partman-partitioning/default_label string gpt
d-i partman/choose_label string gpt
d-i partman/default_label string gpt
d-i partman-partitioning/choose_label select gpt
d-i partman-auto/disk string /dev/sda /dev/sdb
d-i partman-auto/expert_recipe string \
boot-root-datab :: \
1 1 1 free \
$primary{ } \
method{ biosgrub } \
$iflabel{ gpt } \
device { /dev/sda } \
. \
300 300 300 ext4 \
$primary{ } \
$bootable{ } \
method{ format } format{ } \
$iflabel{ gpt } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /boot } \
device { /dev/sda } \
. \
40000 10000 -1 ext4 \
$primary{ } \
method{ format } format{ } \
$iflabel{ gpt } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
device { /dev/sda } \
. \
4000 1500 12% linux-swap \
$primary{ } \
method{ swap } format{ } \
$iflabel{ gpt } \
device { /dev/sda } \
. \
200000 200000 -1 ext4 \
$primary{ } \
method{ format } format{ } \
$iflabel{ gpt } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /usr/local } \
options/noatime{ noatime } options/nodelalloc{ nodelalloc } options/nodiratime{ nodiratime } \
device { /dev/sdb } \
.
d-i partman-auto/choose_recipe select boot-root-datab
Any suggestions on what could possibly make this work? It seems partman ignores the device { /dev/sdb } altogether, and then of course screws up the sda layout to the point that / doesn't have enough space to install the kernel. Also, is there a bible for partman somewhere? Something that actually illustrates every single command/example/explanation would be, well, golden…
Best Answer
Currently, most folks seem to achieve the partitioning of additional drives using the preseed/late_command functionality:
Of course, this is suboptimal, and I would much prefer writing partman recipes that actually work for multiple block devices without RAID/LVM.
I wish I was totally wrong and someone would correct me with an example that works...