Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hey all, I'm currently working on a new virtualisation setup using Xen, and Centos for my workplace. We intend to deploy the domUs into LVM volumes. Currently, the only thing preventing this from working as smoothly as we'd like is the Kickstart script's insistence on partitioning. This is the relevant part from our current KS template (which I've been messing with):

# Partitioning
clearpart --all --initlabel --drives=xvda
part / --size=0 --grow --ondisk=xvda --fstype=ext3

This sets up a single partition and installs to it - which would be fine, but I'd prefer if there were no partitions, and installed directly to the existing LVM (so that we could then mount the LVM from the dom0 for backup and maintenance purposes).

It's possible I'm doing something wrong, and should be exporting the volume as xvda1 rather than xvda - which I'm more than happy to amend - but I'm still not sure how I'd navigate the Kickstart!

I'd really appreciate any help :). Cheers in advance!

share|improve this question
I think I've figured it out, will reply with the answer tomorrow if it tests OK. Export the LVM as xvda1 rather than xvda, get rid of the clearpart command, and use --onpart=xvda1 rather than --ondisk=xvda. – frio Jun 25 '09 at 6:40
Did you try use existing option? – chandank Dec 14 '12 at 1:10
up vote 1 down vote accepted

Having Anaconda use a whole disk as a device for a filesystem isn't possible currently with Anaconda according to the Anaconda mailing list. It will be made possible in Fedora 13.

The workaround that was suggested was to do it in the %post section of the kickstart file, eg. umount /mnt/mountpoint, mkfs.ext3 /dev/whatever

share|improve this answer
Hi Tim, yeah, that's what I found all those months ago. I should have updated this! But you're entirely correct; in the end I gave up and just let it do its thing :). – frio Sep 14 '09 at 10:32

You should have one partition on the disk that you add into LVM. It can be the whole disk. Here's the disk-related bits from the kickstart file I'm using for building VMware hosts:

ignoredisk --drives=sdb,sdc
clearpart  --drives=sda --all
part /boot  --fstype ext3 --size=256 --asprimary --ondisk=sda
part pv.01  --grow        --size=100 --asprimary --ondisk=sda
volgroup vg0 pv.01 --pesize=32768
logvol /        --fstype ext3 --name=rootlv --vgname=vg0 --size=5120
logvol swap     --fstype swap --name=swaplv --vgname=vg0 --size=512
share|improve this answer
rm /dev/xvda1
ln -s /dev/xvda /dev/xvda1
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.