Using kickstart to resize existing LVM partitions during a rebuild
Barry O'Rourke
barry at orodor.org.uk
Tue Nov 11 11:09:18 UTC 2008
Hi,
> why don't you use %pre to do you resizing and %include the partitions
> information?
I'm back at work today so have had more of a chance to play around with
this. I have added the following to the beginning of the %pre section;
/usr/sbin/lvm lvmresize -L30G /dev/mapper/ifp-slash
/usr/sbin/resize2fs -f /dev/ifp/slash 30G
and I'm including the following partition information;
echo "# Create Logical Volumes with a growing /scratch partition
generated in %pre " > ${LOGVOL}
echo "logvol / --fstype ext3 --name=slash --vgname=ifp --size=${SLASH}
--useexisting" >> ${LOGVOL}
echo "logvol /var --fstype ext3 --name=var --vgname=ifp --size=${VAR}
--useexisting" >> ${LOGVOL}
echo "logvol /var/log --fstype ext3 --name=log --vgname=ifp
--size=${LOG} --useexisting" >> ${LOGVOL}
echo "logvol swap --fstype swap --name=swap --vgname=ifp --recommended
--useexisting" >> ${LOGVOL}
echo "logvol /scratch --fstype ext3 --name=scratch --vgname=ifp
--size=10 --grow --noformat" >> ${LOGVOL}
where the disk sizes are;
SLASH="30720"
VAR="2048"
LOG="${VAR}"
SCRATCH="1024"
Thanks,
Barry
More information about the Kickstart-list
mailing list