Re: Whole disk LVM via kickstart

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

 



Kyle,

I believe that code will create a partition table on on sdb so I would end up with /dev/sdb1 (id 8e) which would be the entire disk. What I'm trying to avoid is creating a partition table all together. That way when I dynamically resize sdb I don't have to deal with managing the partition table.

Chad


----- Original Message ----
From: Kyle Powell <kpowell@xxxxxxxxxx>
To: Discussion list about Kickstart <kickstart-list@xxxxxxxxxx>
Sent: Tue, January 12, 2010 3:34:31 PM
Subject: Re: Whole disk LVM via kickstart

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

darn570-linux@xxxxxxxxx wrote:
> I've been working to see if it is possible to get kickstart to perform an installation in the following disk layout.
> 
> /dev/sda1 = /boot  (512mb)
> /dev/sdb = LVM2 pv, no partitions (LVs /, /home, /usr/local, /opt, swap, /tmp, & /var)
> 
> I'm curious if anyone has been successful in accomplishing a similar setup.
> 
> I figured if I did most of my disk work in the %pre section I would be able to take advantage of some of the --useexisting options on volgroup. I even attempted creating the LVs in the %pre section and using --useexisting with logvol.
> 
> # Begin of %pre
> %pre
> echo 64,,83,* | sfdisk -uS /dev/sda
> 
> echo | fdisk /dev/sdb <<EOF
> o
> w
> EOF
> 
> # create vg00
> lvm.static pvcreate /dev/sdb
> lvm.static vgcreate -s 32m vg00 /dev/sdb
> 
> # End of %pre
> 
> All of my %pre section code is working properly and the vg is activated. My present error is "You have not defined a root partition (/), which is required for installation of Red Hat Enterprise Linux Server to continue.
> 
> This configuration would be aimed at a virtual environment where as growth is required I can dynamically extend sdb and then follow up with rescanning and using LVM2 commands to extend. I am trying to avoid adding additional virtual disks.
> 
> Chad

No need to do anything in %pre. You can do all of this with partition commands:

bootloader --location=mbr
zerombr yes
clearpart --all
part /boot --fstype ext3 --size=512 --ondisk=sda
part pv.01 --size 1 --grow --ondisk=sdb
volgroup VG pv.01
logvol /    --name=LV_ROOT --fstype=ext3 --vgname=VG --size=10240
logvol /var --name=LV_VAR  --fstype=ext3 --vgname=VG --size=2048
logvol swap --name=LV_SWAP --fstype=swap --vgname=VG --recommended
...etc...
- --
Kyle Powell | Red Hat | Senior Consultant, RHCE
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFLTOrn7pTtanQdBU4RAjMUAJ48PAeJIWwLPeyyy3CrQ/XRcSygaQCdF6DV
zy4yjLKKCNvHpKAaFWnK4xk=
=f8Wi
-----END PGP SIGNATURE-----

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list


_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux