Menu

Not recognizing CentOS LVM2 partition

Help
MikeD
2008-12-04
2013-04-05
  • MikeD

    MikeD - 2008-12-04

    I have successfully created and implemented and image using XP, and tried to use Clonezilla for a CentOS4.6 machine with LVM2. It is setup as /dev/sda1 as boot and /dev/sda2 as the LVM.  When I attempt to create the disk image, it only "sees" the sda1 as having data and wants to create an image of only 103Mb, which I know is not correct for an 80Gb hard drive. What would cause this?

    Filesystem           1K-blocks      Used Available Use% Mounted o
    /dev/mapper/VolGroup00-LogVol00
                          74667184   8869872  62004416  13% /
    /dev/sda1               101086     16708     79159  18% /boot
    none                    508712         0    508712   0% /dev/shm

    cat56!root
    $ fdisk -l

    Disk /dev/sda: 80.0 GB, 80000000000 bytes
    255 heads, 63 sectors/track, 9726 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1          13      104391   83  Linux
    /dev/sda2              14        9726    78019672+  8e  Linux LVM

     
    • MikeD

      MikeD - 2008-12-04

      Update:  I just attempted the Clonezilla experimental version with the same result...

       
      • Steven Shiau

        Steven Shiau - 2008-12-08

        Please boot into clonezilla live on your CentOS machine, then enter command line:
        1. sudo su -
        2. lvscan
        3. vgscan
        4. pvscan

        Then post the results of 2-4.

         
    • Steven Shiau

      Steven Shiau - 2008-12-06

      Could you please let us know which version (e.g. 1.2.1-17) of clonezilla live are you using ? It will be easier for us to reproduce the problem.

       
    • MikeD

      MikeD - 2008-12-08

      I have tried using version 1.2.1-17.  In troubleshooting, I tried a FC6 hard drive in the same machine and Clonezilla recognized the LVM partition then.  Is there something different with centOS?

       
    • MikeD

      MikeD - 2008-12-08

      2.lvscan
      inactive '/dev/VolGroup00/LogVol00' [72.34 GB] inherit
      inactive '/dev/VolGroup00/LogVol01' [1.94 GB] inherit

      3.vgscan
      Reading all physical volumes.  This may take a while...
      Found volume group "VolGroup00" using metadata type lvm2

      4.pvscan
      PV /dev/sda2   VG VolGroup00   lvm2 [74.38 GB / 96.00 MB free]
      Total: 1 [74.38 GB] / in use: 1 [74.38 GB] / in no VG: 0 [0   ]

       
      • Steven Shiau

        Steven Shiau - 2008-12-09

        MikeD,
        Yes, this looks normal.
        So how about if you run:
        /opt/drbl/sbin/ocs-lvm2-start
        Then run
        lvs
        What's the results.
        BTW, if you can post the error messages (as more as possible) when clonezilla live saving your CentOS 4.6, that's better. It's easier for us know why it failed. "screen" is a good program for you to copy and paste the output on screen. You can enter screen then run "/opt/drbl/sbin/clonezilla" to start clonezilla.

         
    • MikeD

      MikeD - 2008-12-09

      Ok, here we go...

      running ocs-lvm2-start yields:
      Setting up the Logical Volume Manager
        2 logical volume(s) in volume group "VolGroup00" now active

      running lvs gives:
        LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Convert
        LogVol00 VolGroup00 -wi-a- 72.34G                                     
        LogVol01 VolGroup00 -wi-a-  1.94G                 

      Here's what it wants to do when creating an image:
      PS. Next time you can run this command directly:
      /opt/drbl/sbin/ocs-sr -q -c -z1 -i 0 -p true savedisk "Dell-755-Centos-img" "sda"
      This command is also saved as this file name for later use if necessary: /tmp/ocs-Dell-755-Centos-img-2008-12-09-11-55
      Press "Enter" to continue...
      Activating the partition info in /proc... done!
      Selected device [sda] found!
      The selected devices: sda
      Searching for data partition(s)...
      Excluding busy partition or disk...
      Unmouted partitions (including extended or swap): sda1 sda2
      Getting /dev/sda1 info...
      Getting /dev/sda2 info...
      Searching for swap partition(s)...
      Excluding busy partition or disk...
      Unmouted partitions (including extended or swap): sda1 sda2
      Getting /dev/sda1 info...
      Getting /dev/sda2 info...
      The data partition to be saved:   sda1
      The swap partition to be saved:
      Activating the partition info in /proc... done!
      Selected device [sda1] found!
      The selected devices: sda1
      Finding the serial no of sda...
      Getting /dev/sda1 info...
      *****************************************************.
      The following step is to save the harddisk/partition(s) in this machine as image:
      *****************************************************.
      Machine: OptiPlex 755
      sda (80.0GB_Hitachi_HDS72168_PVFB34ZLTMDZ4P)
      sda1 (107MB_ext3(In_Hitachi_HDS72168))
      *****************************************************.
      -> "/home/partimag/Dell-755-Centos-img".
      Are you sure you want to continue ? ? (y/N)

      For some reason it does not "see" the logical volumes on sda2, or if it does, it's not integrating them into the image file.                   

       
      • Steven Shiau

        Steven Shiau - 2008-12-10

        MikeD,
        Thanks for your report. I think I have to find a CentOS 4 machine to test it. It's easier for me to see why.

         
    • MikeD

      MikeD - 2008-12-09

      Update:  I reinstalled Centos4 and manually setup the patitioning without LVM, and low and behold, Clonezilla worked.  There is obviously an issue with Clonezilla and at least Centos' version of LVM.  So until a fix comes about, I will create a new image from scratch without LVM.

       
    • MikeD

      MikeD - 2008-12-12

      Good luck and thanks for your input!  I bet (hope) it's something simple! I just ran a disk to image with a FC4 drive using an LVM Volume Group with no prob.  Going to do some investigating...

       
      • Steven Shiau

        Steven Shiau - 2008-12-14

        MikeD,
        I can _not_ produce the problem here...
        Today I installed a CentOS 4 (it's 4.7 now), used all the default config when installation. The partitions created by the installer are /dev/hda1 and /dev/hda2, where hda2 includes 2 LVs,  one for CentOS file system and the other one is swap.
        I can use Clonezilla live to save the whole disk successfully. The created image contains:
        -rw-r--r--  1 root root    4 2008-12-14 13:40 disk
        -rw-------  1 root root 6.4M 2008-12-14 13:32 hda1.aa
        -rw-r--r--  1 root root   36 2008-12-14 13:31 hda-chs.sf
        -rw-r--r--  1 root root  512 2008-12-14 13:31 hda-mbr
        -rw-r--r--  1 root root  336 2008-12-14 13:31 hda-pt.parted
        -rw-r--r--  1 root root  259 2008-12-14 13:31 hda-pt.sf
        -rw-r--r--  1 root root  14K 2008-12-14 13:40 Info-dmi.txt
        -rw-r--r--  1 root root  27K 2008-12-14 13:40 Info-lshw.txt
        -rw-r--r--  1 root root  247 2008-12-14 13:40 Info-packages.txt
        -rw-r--r--  1 root root  270 2008-12-14 13:32 lvm_logv.list
        -rw-r--r--  1 root root   60 2008-12-14 13:32 lvm_vg_dev.list
        -rw-------  1 root root 1.4K 2008-12-14 13:32 lvm_VolGroup00.conf
        -rw-r--r--  1 root root   10 2008-12-14 13:40 parts
        -rw-r--r--  1 root root   53 2008-12-14 13:40 swappt-VolGroup00-LogVol01.info
        -rw-------  1 root root 853M 2008-12-14 13:40 VolGroup00-LogVol00.aa

        So do you have something special (e.g. encrypted partiton...) on your CentOS 4.6 ?

         
    • MikeD

      MikeD - 2008-12-16

      Not sure if I do, but it is the old 4.6 version, so that might have something to do with it... at any rate I'm just going to redo the image without LVM and go from there. Thank you so much for your help!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.