Re: Use entire disk as PV.

Pablo Iranzo Gómez <[email protected]>
Newsgroups gmane.linux.redhat.kickstart.general
Message-ID <4333592.1409.1304008963472.JavaMail.javamailuser@localhost>
Hi

----- Mensaje original -----
> De: "Andy Speagle" <[email protected]>
> Para: "Discussion list about Kickstart" <[email protected]>
> Enviados: Jueves, 28 de Abril 2011 17:57:23
> Asunto: RE: Use entire disk as PV.
> > > > 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?
> >
> > > Have you tried something like:
> > >
> > > part pv.01 --size=1 --grow --ondisk=sdb
> >
> > Aye... I think the problem with it is the entire "part" command...
> > it's
> > creating a partition. There just doesn't seem to be a way to use a
> > disk
> > without partitioning it first.
> >
> > Thoughts?
> >
> 
> > I would've thought volgroup would be the way to go but reading the
> > docs it
> > seems like you have to create a partition:
> >
> > Volgroup:
> > Create the partition first, create the logical volume group, and
> > then
> > create the logical volume. For example:
> > part pv.01 --size 3000
> > volgroup myvg pv.01
> > logvol / --vgname=myvg --size=2000 --name=rootvol
> 
> Aye... precisely the issue. There's no way to get around the partition
> is would seem. Is there perhaps another way to get this configure
> using a %pre script? Or do I need to start looking at adding
> functionality to anaconda?

%pre
set $(list-harddrives)
d1=$1 # 1st hd device

lvm pvcreate $d1
lvm vgcreate "Test" $d1

and then setup logvols or just keep creating with lvm

Regards
Pablo

-- 

Pablo Iranzo Gómez ([email protected])
Senior Global Profesional Services Consultant (RHCA, RHCSS, RHCDS, RHCVA, RHCE, RHCSP) #804006196923216
Phone: +34 645 01 01 49 (CET/CEST)
GnuPG KeyID: 0xFAD3CF0D


_______________________________________________
Kickstart-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/kickstart-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.