Can't reuse LVM partitions during non-interactive install

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

 



Hi all,

A few weeks ago I reported that I couldn't get kickstart to reuse existing LVM partitions. I've done some more detailed research and I have to conclude that there is a bug with the implementation of LVM in anaconda. Can anyone help with this?

The desired situation is this: I want to reinstall the OS (RHEL4 update 4) onto a system already running RHEL4 update 1 which is already partitioned using LVM.

My first attempts at declaring the desired partitions using "--onpart=/dev/vg00/lroot" caused the install to fail, reporting

    Unable to locate partition vg00/lroot to use for /.
    Press 'OK' to reboot your system

Inspecting the /dev tree bore this out; there were no LVM node files in /dev nor /dev/mapper. Next I added some LVM scanning commands into %pre in order to create them. I put a "sleep" at the end of %pre so I could take a look, and lo and behold, the requsite files are now present.

%pre --interpreter /bin/sh
# Import LVM data to preserve existing partitions and data
/usr/sbin/lvm vgscan --mknodes --ignorelockingfailure
/usr/sbin/lvm vgchange -a y --ignorelockingfailure
sleep 60

List of /dev/vg00:
lrwxrwxrwx  1 root 0 22 Jan  23 12:09 lhome -> /dev/mapper/vg00-lhome
lrwxrwxrwx  1 root 0 21 Jan  23 12:09 lopt -> /dev/mapper/vg00-lopt
lrwxrwxrwx  1 root 0 22 Jan  23 12:09 lroot -> /dev/mapper/vg00-lroot
lrwxrwxrwx  1 root 0 22 Jan  23 12:09 lswap -> /dev/mapper/vg00-lswap
lrwxrwxrwx  1 root 0 21 Jan  23 12:09 lvar -> /dev/mapper/vg00-lvar

List of /dev/mapper:
crw-------  1 root 0  10, 63 Jan  23 11:45 control
brw-rw----  1 root 6 253,  2 Jan  23 12:09 vg00-lvar
brw-rw----  1 root 6 253,  3 Jan  23 12:09 vg00-lswap
brw-rw----  1 root 6 253,  0 Jan  23 12:09 vg00-lroot
brw-rw----  1 root 6 253,  1 Jan  23 12:09 vg00-lopt
brw-rw----  1 root 6 253,  4 Jan  23 12:09 vg00-lhome

Tail end of anaconda.log:
* modules to insert md raid0 raid1 xor raid5 raid6 msdos jbd ext3 reiserfs jfs xfs dm-mod dm-zero dm-mirror dm-snapshot
* loaded raid0 from /mnt/runtime/modules/modules.cgz
* loaded raid1 from /mnt/runtime/modules/modules.cgz
* loaded xor from /mnt/runtime/modules/modules.cgz
* loaded raid5 from /mnt/runtime/modules/modules.cgz
* loaded raid6 from /mnt/runtime/modules/modules.cgz
* loaded msdos from /mnt/runtime/modules/modules.cgz
* loaded jbd from /mnt/runtime/modules/modules.cgz
* loaded ext3 from /mnt/runtime/modules/modules.cgz
* loaded dm-mod from /mnt/runtime/modules/modules.cgz
* loaded dm-zero from /mnt/runtime/modules/modules.cgz
* loaded dm-mirror from /mnt/runtime/modules/modules.cgz
* loaded dm-snapshot from /mnt/runtime/modules/modules.cgz
* module(s) md reiserfs jfs xfs not found
* inserted /tmp/raid0.ko
* inserted /tmp/raid1.ko
* inserted /tmp/xor.ko
* inserted /tmp/raid5.ko
* inserted /tmp/raid6.ko
* inserted /tmp/msdos.ko
* inserted /tmp/jbd.ko
* inserted /tmp/ext3.ko
* inserted /tmp/dm-mod.ko
* inserted /tmp/dm-zero.ko
* inserted /tmp/dm-mirror.ko
* inserted /tmp/dm-snapshot.ko
* load module set done
* loading parallel port drivers...
* modules to insert parport parport_pc
* loaded parport from /mnt/runtime/modules/modules.cgz
* loaded parport_pc from /mnt/runtime/modules/modules.cgz
* inserted /tmp/parport.ko
* inserted /tmp/parport_pc.ko
* load module set done
* looking for USB mouse...
* NFS install method detected, will use RHupdates/
* Running anaconda script /usr/bin/anaconda
* Display mode = t
* Method = nfs://mnt/source/.
* anaconda floppy device is fd0
* Running kickstart %pre script(s)

So far so good. Once the sleep finishes, anaconda trundles along a bit further, with the log file additionally recording:

* All kickstart %pre script(s) have been run
* moving (1) to step partitionobjinit
* pv is /dev/hda2 in vg vg00, size is 59894661120
* vg vg00, size is 59894661120, pesize is 32768
* lv is vg00/lhome, size of 10737418240
* lv is vg00/lopt, size of 4294967296
* lv is vg00/lroot, size of 8589934592
* lv is vg00/lswap, size of 536870912
* lv is vg00/lvar, size of 536870912
* moving (1) to step autopartitionexecute

However, and here's the scoop, the install fails with the above noted "unable to locate partition" error, and inspecting /dev reveals that /dev/vg00 has gone and /dev/mapper is now empty (apart from "mapper/control").

  There is a new log file "lvmout" containing:
File descriptor 3 left open
File descriptor 4 left open
File descriptor 5 left open
File descriptor 6 left open
File descriptor 7 left open
File descriptor 8 left open
File descriptor 9 left open
File descriptor 10 left open
File descriptor 11 left open
File descriptor 12 left open
File descriptor 13 left open
File descriptor 14 left open
File descriptor 15 left open
File descriptor 16 left open
File descriptor 17 left open
File descriptor 18 left open
File descriptor 19 left open
File descriptor 20 left open
File descriptor 21 left open
File descriptor 22 left open
File descriptor 23 left open
File descriptor 24 left open
File descriptor 25 left open
File descriptor 26 left open
File descriptor 27 left open
File descriptor 28 left open
File descriptor 29 left open
File descriptor 30 left open
File descriptor 31 left open
File descriptor 32 left open
File descriptor 33 left open
File descriptor 34 left open
File descriptor 35 left open
File descriptor 36 left open
File descriptor 37 left open
File descriptor 38 left open
File descriptor 39 left open
File descriptor 40 left open
File descriptor 41 left open
File descriptor 42 left open
File descriptor 43 left open
File descriptor 44 left open
File descriptor 45 left open
File descriptor 47 left open
File descriptor 48 left open
File descriptor 49 left open
File descriptor 50 left open
File descriptor 52 left open
  0 logical volume(s) in volume group "vg00" now active
nal VG cache
    Finding all volume groups
    Finding volume group "vg00"
  Reading all physical volumes.  This may take a while...
  Found volume group "vg00" using metadata type lvm2

--
  Regards,
  Steve

IT Support - UNIX/Linux                        Cadence Design Systems
Tel:    +44 (0)1344 866523                     Bagshot Road
Mobile: +44 (0)7901 855046                     Bracknell BERKSHIRE
Fax:    +44 (0)1344 869647                     RG12 0PH   UK


[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