Reinstall and keep data LV

David Lehman dlehman at redhat.com
Mon Aug 30 17:49:07 UTC 2021


On Thu, Aug 26, 2021 at 11:14 AM Markus Falb <wnefal at gmail.com> wrote:

>
>
> > On 19.08.2021, at 22:40, David Barr <dafydd at dafydd.com> wrote:
> >
> > On 8/19/21 12:54, Markus Falb wrote:
> >> error: logical volume "root" given in logvol command does not exist
> >>
> >> What is wrong with my kickstart? What should I change that it works
> >> with RHEL 8 too?
> >>
> >> Best Regards, Markus
> >>
> >
> > I'm going to guess that it can't find the previous root LV that you've
> asked it for with --useexisting. Do you have a way to test without that
> option? Will it build a bare root LV on a new VG?
> >
> > David
>
> I have something that works, but it was somewhat difficult to debug.
>
> Anaconda says “kickstart insufficient” and "error: logical volume "root"
> given in logvol command does not exist”. The message seems clear but after
> complaining anaconda is now in interactive mode and the LVs are visible and
> I can interactive finish the installation. At that point I had the hope
> that the anaconda generated /root/anaconda-ks.cfg would give some hints but
> no news there.
>
> The solution is to activate the LVs in %pre
> It turns out that there is /dev/sda present but not the device files for
> /dev/sdaX.
>
> …snip
> %pre
> mknod /dev/sda2 b 8 2
> pvscan
> vgchange -ay
> %end
> snap…
>
> alternatively this oneliner is working too, interestingly
>
> …snip
> %pre
> parted /dev/sda unit MiB print
> %end
> snip…
>
> Note that with the parted command it is not necessary to vgchange
> afterwards.
>
>
Something is wrong if no device nodes are being created for your
partitions, and I don't think the
problem is in the installer code. That is the job of udev and the kernel
IIRC.


> Is there a builtin kickstart command that accomplishes the same instead of
> some %pre?
> If not, why is %pre necessary? %pre was not necessary with RHEL7. Is this
> by design or is it a bug?
>

Sounds like a bug to me, but not an installer bug. I would start by reading
through the syslog and see
what it says about sda. It might tell you why it isn't creating the
partitions as expected.


>
> Best Regards, Markus
>
>
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://listman.redhat.com/mailman/listinfo/kickstart-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/kickstart-list/attachments/20210830/0ce3dd9d/attachment.htm>


More information about the Kickstart-list mailing list