Menu

LVM Clone Problem - LVM Volume Setting Not Found

Scott
2013-08-08
2020-07-26
1 2 > >> (Page 1 of 2)
  • Scott

    Scott - 2013-08-08

    I am trying to clone a disk with LVM as an image. It has no problem saving sda1, but when it attempts to clone sda2, I get an error saying

    "The LVM Physical volume setting was not found. Unable to save LVM image."

    Is there a setting I can change somewhere in the options to avoid this or is it a problem with the disk itself?

     
  • Steven Shiau

    Steven Shiau - 2013-08-15

    I guess it's because your LVM is not on any partitions (e.g /dev/sda1...), instead it's on disk (e.g /dev/sda). If so, this is still an issue in Clonezilla.
    We will have to improve that in the future.

    Steven.

     
  • Roman Mironov

    Roman Mironov - 2013-10-06

    Dear Steven,

    Is there any workaround for this problem?

    Thank you,
    Roman

     
  • Steven Shiau

    Steven Shiau - 2013-10-13

    Sorry, for the past few weeks we did not work on this issue, and no workaround AFAIK.

    Steven.

     
  • Dinesh

    Dinesh - 2015-02-26

    Dear Steven,

    I am having the same issue. Is there any workaround yet?

    Thanks,
    Dinesh.

     
  • Steven Shiau

    Steven Shiau - 2015-03-07

    Which version of Clonezilla live did you use? For the latest stable one, i.e. 2.3.2-22 or 20150217-utopic, the issue should have been solved:
    http://clonezilla.org/downloads.php

    Steven.

     
  • Uditha De Silva

    Uditha De Silva - 2015-03-10

    Hi,

    I've just tried to image a multipathed disk with /boot on sdb1 and a LVM diskgroup on sdb2, and it failed with this error message.

    The version used is:

    0403ca414acdfb09ac5d4e0bbfc54c5c clonezilla-live-20150217-utopic-amd64.iso

    I had the same error earlier with 2.3.2-22.

    c18e3a27725a7b22b82e022eef44b688 clonezilla-live-2.3.2-22-amd64.iso

     

    Last edit: Uditha De Silva 2015-03-10
  • Uditha De Silva

    Uditha De Silva - 2015-03-11

    The problem is that, although the kernel has the mpath modules available to it, the rest of multipathd etc. is not enabled. So, each of the paths to the target device on the storage is seen as a separate device.

    Then, when vgscan is invoked, LVM is not filtered so it ends up successively not using certain paths to the devices.

    So, when you use pvscan, you see this:

    root@utopic:/etc/lvm# pvscan
      Found duplicate PV 5Lr7lBFZwjYukNvhqnAQ5vQ1KML077LU: using /dev/sde2 not /dev/sdb2
      Found duplicate PV D4ag0zTSHcQlv55oDsUSUNg0yJbFZ40q: using /dev/sdf1 not /dev/sdc1
      Found duplicate PV 8wiex3AbtTpXY79BlxSO3OjPWqpfdxOb: using /dev/sdg1 not /dev/sdd1
      Found duplicate PV 5Lr7lBFZwjYukNvhqnAQ5vQ1KML077LU: using /dev/sdh2 not /dev/sde2
      Found duplicate PV D4ag0zTSHcQlv55oDsUSUNg0yJbFZ40q: using /dev/sdi1 not /dev/sdf1
      Found duplicate PV 8wiex3AbtTpXY79BlxSO3OjPWqpfdxOb: using /dev/sdj1 not /dev/sdg1
      Found duplicate PV 5Lr7lBFZwjYukNvhqnAQ5vQ1KML077LU: using /dev/sdk2 not /dev/sdh2
      Found duplicate PV D4ag0zTSHcQlv55oDsUSUNg0yJbFZ40q: using /dev/sdl1 not /dev/sdi1
      Found duplicate PV 8wiex3AbtTpXY79BlxSO3OjPWqpfdxOb: using /dev/sdm1 not /dev/sdj1
      PV /dev/sdm1   VG datavg   lvm2 [299.96 GiB / 29.96 GiB free]
      PV /dev/sdl1   VG appsvg   lvm2 [39.97 GiB / 25.22 GiB free]
      PV /dev/sdk2   VG rootvg   lvm2 [29.47 GiB / 10.47 GiB free]
      PV /dev/sda1   VG swapvg   lvm2 [136.69 GiB / 72.69 GiB free]
      Total: 4 [506.09 GiB] / in use: 4 [506.09 GiB] / in no VG: 0 [0   ]
    

    So, when I try to backup /dev/sda, it doesn't find any LVM devices on /dev/sda2, and that whole part just fails.

    but if I then edit lvm.conf to ONLY contain the one device I am interested in (the a//, and filter out all the others (the r// part):

    root@utopic:/etc/lvm# diff lvm.conf lvm.conf.new
    68c68
    <     filter = [ "a/.*/" ]
    ---
    >     filter = [ "a/sdb/", "r/.*/" ]
    

    and repeat the pvscan:

    root@utopic:/etc/lvm# pvscan
      PV /dev/sdb2   VG rootvg   lvm2 [29.47 GiB / 10.47 GiB free]
      Total: 1 [29.47 GiB] / in use: 1 [29.47 GiB] / in no VG: 0 [0   ]
    

    This is seen correctly, and I am then able to subsequently back up all the logical volumes within /dev/sdb2.

    So, the "proper" answer is to include the multipathd process, and to "prefer" the /dev/mapper/mpath* devices for LVM, but in the interim, a quick-and-dirty approach of editing the LVM filter line to match the device selected earlier should work.

     

    Last edit: Uditha De Silva 2015-03-11
  • Uditha De Silva

    Uditha De Silva - 2015-03-11

    I've got a patch that seems to work:

    $ diff -ru usr/share/drbl/sbin/ocs-functions{.orig,}
    --- usr/share/drbl/sbin/ocs-functions.orig      2015-03-11 11:54:43.000000000 +0000
    +++ usr/share/drbl/sbin/ocs-functions   2015-03-11 11:53:15.000000000 +0000
    @@ -5730,8 +5730,9 @@
       [ -z "$report_msg" ] && report_msg="Saved $image_name_,"
       rm -f $PV_PARSE_CONF $LOGV_PARSE_CONF
       ocs-lvm2-start
    -  echo "Parsing LVM layout..." | tee --append $OCS_LOGFILE
    -  LC_ALL=C pvscan 2>/dev/null 3<&- 4<&- | grep -Ew lvm2 | while read LINE; do
    +  echo "Parsing LVM layout for ${target} ..." | tee --append $OCS_LOGFILE
    +  TF="devices { filter = [ 'a:(${target/ /|})\$:', 'r:.*:' ] }"
    +  LC_ALL=C pvscan --config "$TF" | 2>/dev/null 3<&- 4<&- | grep -Ew lvm2 | while read LINE; do
         DEV="$(LC_ALL=C echo $LINE | tr -s ' ' | cut -d' ' -f2)"
         if [ "$(LC_ALL=C echo $LINE | tr -s ' ' | cut -d' ' -f3)" = "VG" ]; then
           VG="$(LC_ALL=C echo $LINE | tr -s ' ' | cut -d' ' -f4)"
    

    This forces pvscan to use a filter specific to the partitions on the target device, and once this has gotten the list of volume groups affected, it can then correctly process the logical volumes within those volume groups.

     

    Last edit: Uditha De Silva 2015-03-12
  • Steven Shiau

    Steven Shiau - 2015-03-26

    Thanks for sharing the patch. We will review/test it and if there is no problem, it will be used in the next Clonezilla release.

    Steven.

     
  • Steven Shiau

    Steven Shiau - 2015-03-31

    This patch was applied, and now it's used in testing Clonezilla live, i.e. Clonezilla live 2.4.0-7, 20150330-*:
    http://clonezilla.org/downloads.php
    If you can, please give it a try and let us know the results.
    Thanks.

    Steven.

     

    Last edit: Steven Shiau 2015-03-31
  • Hilario Fochi Silveira

    I tried to use the stable releases - 2.4.2-10 to clone a SSD with Centos 7 and had the same issue.

    Are there any instructions to work around this problem?

     
  • Steven Shiau

    Steven Shiau - 2015-06-20

    When you said "clone", did you mean to clone a disk to another disk?
    Or did you mean to save an image for the whole disk?
    How did you install the CentOS 7?
    Please run the following commands on Clonezilla live prompt:
    1. sudo -i
    2. parted -s /dev/sda print
    3. blkid
    4. pvscan
    5. lvscan
    Please post the results of (2)-(5)
    Besides, please also post the file /var/log/clonezilla.log after you encounter the issue when using Clonezilla.
    BTW, here I did a test to save CentOS 7 with all default settings when installation, I do not have any problem to save it.

    Steven.

     
  • Hilario Fochi Silveira

    Hello Steven,

    I am trying to make an image of this SSD to a samba share. The first two partitions are saved ok and the third fails with "The LVM physical volume setting was not found."

    The Centos 7 installation was very straight forward, with the exception that I eliminated the /home partition and increased the root partition to use all available space.
    The filesystem is ext4 instead of Centos' default xfs.
    Also due to a incompatibility of Centos 7 kernel version 3.10 with the logitech mouse, after the install, I upgraded the kernel to latest elrepo.org 4.x kernel.

    the answers to your other questions are in the two attached files.

    Thanks for taking your time to help me.

    Hilário

     

    Last edit: Hilario Fochi Silveira 2015-06-20
  • Hilario Fochi Silveira

    I also tried to clone disk to disk, but in the end I had to fsck the new disk.

     
  • SLLabs Louis

    SLLabs Louis - 2015-07-24

    Hello,

    I've also got the error message "LVM setting was not found" and I've found a bug into the
    clonezilla ocs-functions file (/usr/share/drbl/sbin/ocs-functions).

    root@debian:/usr/share/drbl/sbin# diff -u ocs-functions{.orig,}
    --- ocs-functions.orig  2015-07-24 23:15:47.280002603 +0000
    +++ ocs-functions   2015-07-24 23:16:06.828002763 +0000
    @@ -5588,7 +5588,7 @@
       # Ref: https://sourceforge.net/p/clonezilla/discussion/Open_discussion/thread/075d3f5a/
       # Thanks to Uditha De Silva for providing a better mechanism to parse the PV we are interested here.
       # Was using: LC_ALL=C pvscan 2>/dev/null 3<&- 4<&- | grep -Ew lvm2 | while read LINE; do
    -  TF="devices { filter = [ 'a:(${target/ /|})\$:', 'r:.*:' ] }"
    +  TF="devices { filter = [ 'a:(${target// /|})\$:', 'r:.*:' ] }"
       LC_ALL=C pvscan --config "$TF" 2>/dev/null 3<&- 4<&- | grep -Ew lvm2 | while read LINE; do
         DEV="$(LC_ALL=C echo $LINE | tr -s ' ' | cut -d' ' -f2)"
         if [ "$(LC_ALL=C echo $LINE | tr -s ' ' | cut -d' ' -f3)" = "VG" ]; then
    

    Without the modification (in my case, target="sda1 sda2 sda3 sda5"), the substitution was not done correctly :
    TF="devices { filter = [ 'a:(sda1|sda2 sda3 sda5)$:', 'r:.*:' ] }"

    With the modification :
    TF="devices { filter = [ 'a:(sda1|sda2|sda3|sda5)$:', 'r:.*:' ] }"

    and no more error ;)

    I've observed this bug in the stable 2.4.2-10 version but also in the testing 2.4.2-21 (and 20150608-vivid) version.

    Hope this can help !

    Louis.

     
    • Shaun Rowland

      Shaun Rowland - 2015-07-30

      The patch above really helped me out, but I still had a problem because we are using LVM snapshots too. I added more to the patch to fix that problem as well. It includes the patch above, and it also has extra comments which probably shouldn't be included in the file. This might not be the best way to deal with the problem, but it solved my issue in the /usr/share/drbl/sbin/ocs-functions file:

      --- ocs-functions.orig  2015-05-29 10:33:01.000000000 -0400
      +++ ocs-functions       2015-07-30 00:37:38.394637911 -0400
      @@ -5594,7 +5594,7 @@
         # Ref: https://sourceforge.net/p/clonezilla/discussion/Open_discussion/thread/075d3f5a/
         # Thanks to Uditha De Silva for providing a better mechanism to parse the PV we are interested here.
         # Was using: LC_ALL=C pvscan 2>/dev/null 3<&- 4<&- | grep -Ew lvm2 | while read LINE; do
      -  TF="devices { filter = [ 'a:(${target/ /|})\$:', 'r:.*:' ] }"
      +  TF="devices { filter = [ 'a:(${target// /|})\$:', 'r:.*:' ] }"
         LC_ALL=C pvscan --config "$TF" 2>/dev/null 3<&- 4<&- | grep -Ew lvm2 | while read LINE; do
           DEV="$(LC_ALL=C echo $LINE | tr -s ' ' | cut -d' ' -f2)"
           if [ "$(LC_ALL=C echo $LINE | tr -s ' ' | cut -d' ' -f3)" = "VG" ]; then
      @@ -5651,7 +5651,21 @@
      
         # find LV for chosen PV.
         LC_ALL=C lvscan 2>/dev/null 3<&- 4<&- | grep "/.*/" | while read LINE; do
      -    LOGV="$(LC_ALL=C echo $LINE | tr -s ' ' | cut -d' ' -f2 | tr -d "'")"
      +    # The next line was broken because we use snapshots. There is extra text in
      +    # the second column of the first entries in the output, like this example:
      +    #
      +    #  ACTIVE   Original '/dev/vg0/root' [19.11 GiB] inherit
      +    #  ACTIVE   Snapshot '/dev/vg0/snap-factory' [19.18 GiB] inherit
      +    #  ACTIVE   Snapshot '/dev/vg0/snap-update' [19.18 GiB] inherit
      +    #  ACTIVE            '/dev/vg1/vault' [100.00 MiB] inherit
      +    #  ACTIVE            '/dev/vg1/rescue' [3.90 GiB] inherit
      +    #
      +    # That breaks the following line:
      +    #
      +    # LOGV="$(LC_ALL=C echo $LINE | tr -s ' ' | cut -d' ' -f2 | tr -d "'")"
      +    #
      +    # This replacement works though:
      +    LOGV="$(LC_ALL=C echo $LINE | cut -f 2 -d \')"
           # LOGV is like: /dev/vg3/lvol0
           while read vg dev uuid; do
            if [ "$vg" = "/NOT_FOUND" ]; then
      
       

      Last edit: Shaun Rowland 2015-07-30
      • Andrzej ..

        Andrzej .. - 2015-07-31

        Thnx Shaun, your patch works for me!

         
  • Steven Shiau

    Steven Shiau - 2015-07-31

    @Shaun,
    Thanks for the patch. I have applied this patch in clonezilla 3.16.24.

    Steven.

     
  • Steven Shiau

    Steven Shiau - 2015-07-31

    @SLLabs Louis,
    Thanks for the patch. As mentioned in the previous post, your patch is aslo included.
    Appreciate.

    Steven.

     
  • Steven Shiau

    Steven Shiau - 2015-08-01

    Dear all,
    I have uploaded some versions of Clonezilla live to address this issue:
    20150731-wily
    20150731-vivid
    and
    2.4.2-29
    You can find them on
    http://clonezilla.org/downloads.php
    These releases all include the above patches.
    If you can, please give that a try and let me know the results.
    Thanks.

    Steven.

     

    Last edit: Steven Shiau 2015-08-01
  • Andrzej ..

    Andrzej .. - 2015-08-03

    I have checked 20150731-vivid version for LVM compatibility (backup and restore) and must admit - works great.

     
  • Michael Walsh

    Michael Walsh - 2015-10-18

    I have tried ver clonezilla-live-2.4.2-32-i586.iso and still have problems.
    I have been experimenting by installing various Linux distributions onto an Acer netbook which has an Intel Atom CPU, an 8GB SSD, and 1 GB RAM, to see which one runs well and is not too slow. After I install each Operating System I make an image of it so that I can replace it easily. I use Clonezilla to create an image of each installation, and write the image onto an external USB 500 GB HDD.
    I used Clonezilla clonezilla-live-2.4.2-10-i586.iso, and I could easily create, and re-install images of:
    1) The original Linux installation, Linux Linpus Lite v 1.0.3.E
    2) Linux Mint 17 Cinnamon, and
    3) Lubuntu 14.04.3

    However when I installed Centos 6.6, and upgraded it to 6.7, Clonezilla would not make a disk image that included all the partitions.
    The Centos 6.7 installation uses LVM and creates partitions sda1, sda2 and sda3.
    When I ask Clonezilla (2.4.2-32) to create an image of the entire disk, it sees sda, and all three partitions, and it indicates that it will create an image that will include all three partitions, but it only createsan image of sda1.

    I tried clonezilla-live-2.4.2-32-i586.iso, but it too will only create an image of sda1. The other two partitions, sda2 and sda3, are ignored.

    Thank you
    Michael Walsh

     
    • Michael Walsh

      Michael Walsh - 2015-10-18

      Stephen,
      I have some more information on this issue.
      I had also installed CentOS 6.7 on an 80GB Seagate HDD, so I ran Clonezilla 2.4.2-10 to create an image of the HDD. I found that Clonezilla DOES see the LVM partitions, and DOES copy them to an image when CentOS 6.7 is installed on a hard disk drive.

      So it looks like Clonezilla WILL create all partitions of the CentOS 6.7 installation if it is on a HDD, but Clonezilla will NOT create images of all partions of CentOS 6.7 if CentOS is installed on an SSD. I don't know if this behaviour is confined to CentOS, or to all LVM partitioning systems, or just to certain types of SSDs. ?

      I have various bits of hardware lying around and I am capable of putting them together in various combinations, so I can try further tests if it would help, but I am not a Linux expert; I'm just a competent beginner.

      Regards

      Michael Walsh

       

      Last edit: Michael Walsh 2015-10-18
  • Steven Shiau

    Steven Shiau - 2015-10-31

    If this issue only happens on SSD, then maybe this is due to Linux kernel/hardware support issue. In this case, we have to wait for newer Linux kernel to support that.

    Steven.

     
1 2 > >> (Page 1 of 2)

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.