<div> </div>
<div>Hello all,</div>
<div> </div>
<div>Is there any other solution available to preserve some of the existing LVM partitions?</div>
<div>I am also facing exactly the same issue that Steve has mentioned.</div>
<div> </div>
<div>Thanks,</div>
<div>Ajay</div>
<div> </div>
<div> </div>
<div><br><br> </div>
<div><span class="gmail_quote">On 1/5/07, <b class="gmail_sendername">Steve Robson</b> <<a href="mailto:srobson@cadence.com">srobson@cadence.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi all,<br><br>  I'm trying to install the OS onto a system, reusing the existing LVM<br>partitions thereon.
<br><br>  I'm using some LVM commands in a %pre section of the config file to<br>scan for and create the device nodes and they appear to be executed as<br>indicated by their logs.  However, the device node files don't get
<br>created, hence anaconda complains that it can't locate the partitions I<br>requested in the "--onpart" directive and stops.<br><br>  Using the console at alt-f2, if I execute verbatim the exact same<br>commands, the device nodes are created.  The logs of running the
<br>commands manually are identical to those when run from %pre.  Can anyone<br>offer any help or advice?  Thanks in advance.<br><br>-Steve<br><br>Herewith, some supporting evidence:<br>  Error on the console:<br>    Unable to locate partition mapper/vg00-lroot to use for /.
<br>    Press 'OK' to reboot your system<br><br>Relevant sections from my kickstart config file:<br>  # reusing existing partitions<br>  part / --onpart=/dev/mapper/vg00-lroot<br>  part /boot --onpart=/dev/hda1<br>
  part /opt --onpart=/dev/mapper/vg00-lopt<br>  part /var --onpart=/dev/mapper/vg00-lvar<br>  part /export/home --onpart=/dev/mapper/vg00-lhome --noformat<br>  part swap --onpart=/dev/mapper/vg00-lswap<br><br>  %pre --interpreter /bin/sh
<br>  # Import LVM data to preserve existing partitions<br>  /usr/sbin/lvm vgscan --mknodes --ignorelockingfailure --verbose \<br>    > /tmp/vgscan.log 2>&1<br>  /usr/sbin/lvm vgchange -a y --ignorelockingfailure --verbose \
<br>    > /tmp/vgchange.log 2>&1<br><br>Contents of above named log files:<br>  vgscan.log:<br>    Creating directory "/var/lock/lvm"<br>    Wiping cache of LVM-capable devices<br>    Wiping internal VG cache
<br>    Finding all volume groups<br>    Finding volume group "vg00"<br>    Creating directory "/etc/lvm/archive"<br>    Archiving volume group "vg00" metadata (seqno 6).<br>    Creating directory "/etc/lvm/backup"
<br>    Creating volume group backup "/etc/lvm/backup/vg00" (seqno 6).<br>    Finding all logical volumes<br>    Reading all physical volumes.  This may take a while...<br>    Found volume group "vg00" using metadata type lvm2
<br><br>  vgchange.log<br>    Finding all volume groups<br>    Finding volume group "vg00"<br>    Found volume group "vg00"<br>    Creating vg00-lroot<br>    Loading vg00-lroot table<br>    Resuming vg00-lroot (253:0)
<br>    Found volume group "vg00"<br>    Creating vg00-lopt<br>    Loading vg00-lopt table<br>    Resuming vg00-lopt (253:1)<br>    Found volume group "vg00"<br>    Creating vg00-lvar<br>    Loading vg00-lvar table
<br>    Resuming vg00-lvar (253:2)<br>    Found volume group "vg00"<br>    Creating vg00-lswap<br>    Loading vg00-lswap table<br>    Resuming vg00-lswap (253:3)<br>    Found volume group "vg00"<br>    Creating vg00-lhome
<br>    Loading vg00-lhome table<br>    Resuming vg00-lhome (253:4)<br>    Activated logical volumes in volume group "vg00"<br>  5 logical volume(s) in volume group "vg00" now active<br><br>Inspecting /dev/mapper reveals only a character file called "control".
<br>  $ ls -l /dev/mapper<br>  crw-------  1 root 0  10, 63 Jan  3 11:45 control<br><br>  $ ls -l /dev/vg00<br>  ls: /dev/vg00: No such file or directory<br><br>After running the commands manually:<br>  $ ls -l /dev/mapper
<br>  crw-------  1 root 0  10, 63 Jan  3 11:45 control<br>  brw-rw----  1 root 6 253,  2 Jan  3 12:09 vg00-lvar<br>  brw-rw----  1 root 6 253,  3 Jan  3 12:09 vg00-lswap<br>  brw-rw----  1 root 6 253,  0 Jan  3 12:09 vg00-lroot
<br>  brw-rw----  1 root 6 253,  1 Jan  3 12:09 vg00-lopt<br>  brw-rw----  1 root 6 253,  4 Jan  3 12:09 vg00-lhome<br><br>  $ ls -l /dev/vg00<br>  lrwxrwxrwx  1 root 0 22 Jan  3 12:09 lhome -> /dev/mapper/vg00-lhome<br>
  lrwxrwxrwx  1 root 0 21 Jan  3 12:09 lopt -> /dev/mapper/vg00-lopt<br>  lrwxrwxrwx  1 root 0 22 Jan  3 12:09 lroot -> /dev/mapper/vg00-lroot<br>  lrwxrwxrwx  1 root 0 22 Jan  3 12:09 lswap -> /dev/mapper/vg00-lswap
<br>  lrwxrwxrwx  1 root 0 21 Jan  3 12:09 lvar -> /dev/mapper/vg00-lvar<br><br>  I added a "df" and an "lsmod" at the beginning of the %pre section to<br>see whether the filesystems aren't mounted when the commands try to run,
<br>but they are.  Which of course they must be otherwise the commands<br>wouldn't be found.  Anyway. here are the df and lsmod results for good<br>measure.<br><br>  Filesystem            Size  Used Avail Use% Mounted on
<br>  rootfs                6.0M  4.0M  1.8M  70% /<br>  /dev/root.old         6.0M  4.0M  1.8M  70% /<br>  bnkick:/images/2007/RHEL4.0_WS_x86<br>                        121G   87G   28G  76% /mnt/source<br>  /tmp/loop0            174M  174M     0 100% /mnt/runtime
<br><br>  Module                  Size  Used by    Not tainted<br>  cramfs 42421 1 - Live 0xf886f000<br>  dm_mirror 30637 0 - Live 0xf8939000<br>  dm_mod 59605 3 dm_snapshot,dm_mirror,dm_zero, Live 0xf8a0e000<br>  dm_snapshot 17285 0 - Live 0xf89cd000
<br>  dm_zero 2369 0 - Live 0xf88b5000<br>  ds 17349 44 - Live 0xf8918000<br>  e100 33733 0 - Live 0xf899c000<br>  edd 9505 0 - Live 0xf886b000<br>  ext3 116809 0 - Live 0xf8a90000<br>  fat 44001 2 msdos,vfat, Live 0xf8896000
<br>  floppy 58481 0 - Live 0xf88fb000<br>  hermes 7617 2 orinoco_pci,orinoco, Live 0xf8835000<br>  jbd 71513 1 ext3, Live 0xf89fb000<br>  lockd 64105 1 nfs, Live 0xf88b7000<br>  loop 15817 2 - Live 0xf8888000<br>  mii 5185 1 e100, Live 0xf88a4000
<br>  msdos 10177 0 - Live 0xf8932000<br>  nfs 232905 1 - Live 0xf8943000<br>  nfs_acl 3777 1 nfs, Live 0xf883d000<br>  orinoco 45261 1 orinoco_pci, Live 0xf89a6000<br>  orinoco_pci 7245 0 - Live 0xf892f000<br>  parport 37129 1 parport_pc, Live 0xf8a1e000
<br>  parport_pc 24577 0 - Live 0xf8a29000<br>  pcmcia_core 63481 2 ds,yenta_socket, Live 0xf891e000<br>  raid0 7617 0 - Live 0xf8936000<br>  raid1 20033 0 - Live 0xf89b3000<br>  raid5 25281 0 - Live 0xf89be000<br>  raid6 101713 0 - Live 0xf89e1000
<br>  scsi_mod 122573 2 sr_mod,sd_mod, Live 0xf897d000<br>  sd_mod 17217 0 - Live 0xf88a9000<br>  sr_mod 17381 0 - Live 0xf88af000<br>  sunrpc 162597 5 nfs,nfs_acl,lockd, Live 0xf88d2000<br>  uhci_hcd 31065 0 - Live 0xf88c8000
<br>  vfat 14529 0 - Live 0xf888e000<br>  vga16fb 12201 1 - Live 0xf8829000<br>  vgastate 8257 1 vga16fb, Live 0xf882d000<br>  xor 13641 2 raid6,raid5, Live 0xf89b9000<br>  yenta_socket 18881 0 - Live 0xf890b000<br><br>_______________________________________________
<br>Kickstart-list mailing list<br><a href="mailto:Kickstart-list@redhat.com">Kickstart-list@redhat.com</a><br><a href="https://www.redhat.com/mailman/listinfo/kickstart-list">https://www.redhat.com/mailman/listinfo/kickstart-list
</a><br></blockquote></div><br>