[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Partman-Auto - Multi-Disk OR Use Existing Layout via Preseed



As for the parted item:

This did what I mentioned earlier:

# Partitioning
## Dump everything from the installer
# We ARE going to overwrite everything. Really.
d-i     partman-md/confirm_nooverwrite  boolean true
partman-lvm     partman-lvm/confirm_nochanges   boolean true
partman-base    partman/confirm_nochanges       boolean true
partman-md      partman-md/confirm      boolean true
partman-crypto  partman-crypto/confirm_nochanges        boolean true
partman-partitioning partman-partitioning/confirm_resize boolean true
d-i     partman-crypto/confirm_nooverwrite      boolean true
d-i     partman-lvm/confirm     boolean true
partman-lvm     partman-lvm/confirm     boolean true
partman-partitioning partman-partitioning/confirm_write_new_label boolean true
partman-crypto  partman-crypto/confirm  boolean true
partman-partitioning    partman-partitioning/confirm_new_label  boolean true
partman-base    partman/confirm_nooverwrite     boolean true
partman-md      partman-md/confirm_nochanges    boolean true

# use first hard drive SCSI/SATA:
d-i partman-auto/disk string /dev/sdb
d-i partman-auto/method string lvm
d-i partman-auto/choose_recipe select boot-root
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-auto-lvm/new_vg_name string sysvg

d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/device_remove_md  boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-lvm/confirm boolean true

d-i partman/confirm_write_new_label boolean true
d-i partman/confirm boolean true
d-i partman/default_filesystem string ext3
d-i partman/mount_style select uuid
d-i partman/choose_partition \
        select Finish partitioning and write changes to disk

# needed to shut up complaint about unused keep_2 lv
d-i partman-basicmethods/method_only boolean false

d-i partman-auto/expert_recipe string                            \
      boot-root ::                                               \
              510 511 512 ext3                                   \
                      $primary{ } $defaultignore{ } $bootable{ } \
                      method{ format } format{ }                 \
                      use_filesystem{ } filesystem{ ext3 }       \
                      mountpoint{ /boot } label{ /boot }         \
              .                                                  \
              2046 2047 2048 linux-swap                          \
                      $lvmok{ } method{ swap } format{ }         \
                      in_vg{ sysvg } lv_name{ swap1 }            \
              .                                                  \
              4094 4095 4096 ext3                                \
                      $lvmok{ } method{ format } format{ }       \
                      use_filesystem{ } lv_name{ root } in_vg{ sysvg } \
                      filesystem{ ext3 } mountpoint{ / }         \
              .                                                  \
              4063 4064 4065 ext3                                \
                      $lvmok{ } method{ format } format{ }       \
                      use_filesystem{ } lv_name{ var } in_vg{ sysvg } \
                      filesystem{ ext3 } mountpoint{ /var }      \
              .                                                  \
              10238 10239 10240 ext3                             \
                      $primary{ } $defaultignore{ }              \
                      method{ lvm } device{ /dev/sdb }           \
                      vg_name{ sysvg }                           \
              .                                                  \
              50000 80000 -1 ext3                                \
                      $primary{ } method{ keep }                 \

Then in the late command, you'll have to do something like this (I haven't cause I'm lazy):
pvcreate <largest partition> xen_vg
parted /dev/sda < create partition - have to look up syntax> ext3
mkfs.ext3 /dev/sda1 -L /boot
mkdir /target/newboot
mount /dev/sda1 /target/newboot
cp -par /target/boot/* /target/newboot
grep -v /boot /target/etc/fstab > /target/etc/fstab.new
echo "/dev/sda1 /boot ext3 defaults 0 0" >> /target/etc/fstab.new
mv /target/etc/fstab /target/etc/fstab.bak
mv /target/etc/fstab.new /target/etc/fstab
umount /target/boot
umount /target/newboot
mount /dev/sda1 /target/boot
in-target grub-install /dev/sda
in-target update-grub

Then you've done what the RH installer can do for me fairly easily. (Trust me, there's tons to hate about Anaconda, but this part is ok.)


On 05/01/2012 03:06 PM, Andrew M.A. Cater wrote:
On Sat, Apr 28, 2012 at 01:54:40PM -0400, Tom H wrote:
On Thu, Apr 26, 2012 at 1:41 PM, Matthew Drobnak<mdrobnak@appnexus.com>  wrote:
On 04/26/2012 08:50 AM, Tom H wrote:
The only, somewhat unhelpful, thing that I can contribute is that I've
only been able to use two disks with pressed when creating an mdraid
array. It hasn't worked for me either to add a second PV (even though
the "device{ }" value is specifically mentioned in the LVM section of
the documentation) or to have "/usr" and/or "/var" on a second disk.
Well, that's at least comforting to know that I'm not crazy. :)

I wish there was an easy way to get the partitioner code from FAI into d-i.
They use parted on the backend as well, but their syntax is a lot simpler,
and supports multiple disks. I just can't bring myself to go the whole FAI
route just because partitioning doesn't work the way I'd like. I am going to
try something hacky but not that bad, and see if I can get this to work:

Explicitly say the volume group for sysvg is 10GBs. Define the LVs inside
there. Define an additional unused partition to fill the disk.

In post, remove the extra partition from sdb, copy everything in /boot to
/dev/sda1, and reinstall grub. That should work.
It's too bad that kickstart isn't fully functional on Debian and Ubuntu...

It's barely functional on Red Hat :) I find that I have to do an isntall using
kickstart to get an initial config then cut it to shreds to remove the stuff
I don't need :(


Reply to: