/ must be on a partition or LV that will be formatted. Reusing an existing / is not allowed.

David Lehman dlehman at redhat.com
Wed Oct 19 15:31:00 UTC 2011


On Tue, 2011-10-18 at 21:57 -0500, Chris Adams wrote:
> Once upon a time, David Lehman <dlehman at redhat.com> said:
> > I just tried it and it worked fine. If you put your ks.cfg and
> > the /tmp/storage.log from your install somewhere I can take a look and
> > tell you what went wrong.
> 
> Okay, I'm probably doing it wrong then.  Here's my simplified ks.cfg.
> It is a simplified example of partitioning and setting up LVM in %pre
> (this example obviously doesn't do anything special, but I have actual
> kickstarts that do), but I switched to letting anaconda make the
> filesystems.  I set a couple of simple ext4 options that stand out
> clearly after the fact.  Looking at program.log, the "-T myopt" didn't
> get passed to mke2fs.

You found a bug. We don't honor fsprofile when --useexisting is passed
to the logvol command. If you file a bug it can be fixed pretty easily.
Or, if you just let anaconda create your logical volumes for you you
won't hit the bug.

Out of curiosity, why are you doing the partitioning and lvm stuff in %
pre?

Dave

> 
> If you still want the storage.log (i.e. I'm not doing something
> obviously wrong), I'll send it to you off-list (it is 83K).
> 
> ########################################################################
> repo --name="Fedora 16 Beta" --baseurl=http://mirror.hiwaay.net/pub/fedora/linux/releases/test/16-Beta/Fedora/x86_64/os/
> 
> rootpw testpw
> sshpw --username=root testpw --plaintext
> network --device=eth0 --bootproto dhcp
> lang en_US.UTF-8
> install
> text
> skipx
> halt
> selinux --permissive
> keyboard us
> timezone --utc America/Chicago
> auth --useshadow --passalgo=sha512
> firewall --disabled
> # See BZ 720027
> bootloader --location=mbr --append="rd.plymouth=0 console=tty0 console=ttyS0,115200"
> 
> part /boot --onpart=vda1 --fstype=ext4 --fsprofile=myopt
> part pv.1 --onpart=vda2 --noformat
> volgroup fdev pv.1 --noformat
> logvol / --vgname=fdev --name=root --fstype=ext4 --useexisting --fsprofile=myopt
> logvol swap --vgname=fdev --name=swap --fstype=ext4 --useexisting
> 
> %packages --nobase
> @ Core --nodefaults
> yum
> %end
> 
> %pre --erroronfail
> set -e
> 
> cat >> /etc/mke2fs.conf <<EOF
> 	myopt = {
> 		inode_ratio = 65536
> 		options = stride=32,stripe-width=64
> 	}
> EOF
> 
> dd if=/dev/zero bs=512 count=63 of=/dev/vda
> parted -s /dev/vda "unit s" "mklabel msdos" \
>     "mkpart primary ext2 2048 1048575" \
>     "mkpart primary ext2 1048576 -1" \
>     "set 2 lvm on"
> lvm pvcreate -ff -y /dev/vda2
> lvm vgcreate -ff -s 16M fdev /dev/vda2
> lvm lvcreate -n root -L 1500M fdev
> lvm lvcreate -n swap -L 1000M fdev
> lvm vgchange -an
> %end
> ########################################################################
> 
> -- 
> Chris Adams <cmadams at hiwaay.net>
> Systems and Network Administrator - HiWAAY Internet Services
> I don't speak for anybody but myself - that's enough trouble.




More information about the test mailing list