RE: Use entire disk as PV.

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

 



Hi Team,

 

Iâve progressed a bit on this issue. What Iâm presently trying to do is use a simple %pre script to generate a temp file with the commands to be included in the partitioning section of the kickstart. So, I run the %pre script, it creates /tmp/custom-part, which is included in the partitioning section using:

 

%include /tmp/custom-part

 

All of that works duckilyâ however anaconda refuses to use ârootvgâ without it being defined using the âvolgroupâ command in the partitioning section. And sadly, I canât get the âvolgroupâ command to work without a PV defined. If I try to specify the partition by passing the --useexisting and --onpart options to the âpartâ commandâ that fails too â so I continue to be stuck. This is what I do to have the /tmp/custom-part created:

 

echo "part /boot --fstype=ext3 -- > /tmp/custom-part

echo "volgroup rootvg --useexisting" >> /tmp/custom-part

echo "logvol / --fstype=ext3 --name=root --vgname=rootvg --size=4096" >> /tmp/custom-part

echo "logvol swap --fstype=swap --name=swap --vgname=rootvg --size=2048" >> /tmp/custom-part

echo "logvol /var --fstype=ext3 --name=var --vgname=rootvg --size=2048" >> /tmp/custom-part

echo "logvol /var/tmp --fstype=ext3 --name=vartmp --vgname=rootvg --size=1024" >> /tmp/custom-part

echo "logvol /home --fstype=ext3 --name=home --vgname=rootvg --size=2048" >> /tmp/custom-part

echo "logvol /tmp --fstype=ext3 --name=tmp --vgname=rootvg --size=1024" >> /tmp/custom-part

echo "logvol /opt --fstype=ext3 --name=opt --vgname=rootvg --size=2048" >> /tmp/custom-part

 

Has anyone actually done this? Is there some magic Iâm missing?

 

-Andy

 

From: kickstart-list-bounces@xxxxxxxxxx [mailto:kickstart-list-bounces@xxxxxxxxxx] On Behalf Of Callahan, Tom
Sent: Tuesday, May 03, 2011 5:45 AM
To: Discussion list about Kickstart
Cc: Discussion list about Kickstart
Subject: Re: Use entire disk as PV.

 

Most storage arrays can grow existing disks, which doesn't work as nicely if the disk has a partition. Making a PV out of the entire disk allows much easier PV/VG/LV expansion, without mucking with a partition table.

 

As for the training piece, I'd expect an admin would do some verification a disk is not in use before blindly assuming it's not in use, and overwriting data. There is no standard practice with how to create a PV, it depends on the site.


On May 3, 2011, at 5:30 AM, "Moray Henderson" <Moray.Henderson@xxxxxxxxxxxxxxxx> wrote:

From: Speagle, Andy [mailto:andy.speagle@xxxxxxxxxxx]


Iâm trying to setup the partitioning section of my kickstarts in such a way that rather than partitioning a disk and using /dev/sdX1 as the PV for my root VG, that I can instead use the entire disk. 

 

The reason for doing this would be to make PV resizing a bit easier for virtual machines.  Otherwise, I must muck around with the partition table and blah blah â not a show-stopper, but potentially dangerous for junior admins.

 

I suspect that the functionality just isnât thereâ but does anyone know the magic syntax to get it to use the entire drive (aka. /dev/sdb) as a PV during kickstart?

 

Why do you need to resize PVs for virtual machines?  You allocate the extra space to your VM as another virtual drive or partition, then using LVM create another Physical Volume for that drive, add that Physical Volume to your Volume Group and Logical Volume, and extend the filesystem.  No  mucking around with an existing partition table.

 

I would be confused if I encountered a disk without a partition table â Iâd probably assume it wasnât formatted at all.  Better to train your junior admins in standard practice?

 

 

Moray.

âTo err is human; to purr, feline.â

_______________________________________________
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