Re: [Clonezilla-live] Bug found in lvm restoration, patch for this & test new lives CD
A partition and disk imaging/cloning program
Brought to you by:
steven_shiau
From: Steven S. <st...@nc...> - 2008-02-14 15:27:58
|
Hi Gerald, That's great. Thanks for this bug report. We will patch this in the next release. When a newer one is released, I will let you know and please give it a try then. Thanks again. Regards, Steven. Gerald HERMANT wrote: > Hello Steven, > > Thanks for your very good job in Clonezilla. > > I find a pb in lvm restoration in some case. > The problem: > - Restoration process seems good, but kernel can't find his root (in LVM). > > Analyse : > - pvdisplay => PV is created > - vgdisplay => No VG is created > My source data (/home/partimage) are remote on a samba server. > in ocs-functions (and ocs-onthefly) the section is > > # create PV first > echo "Creating the PV... " > while read vg dev uuid; do > pvcreate -ff --yes --uuid $uuid $dev > done < $PV_PARSE_CONF > echo "done!" > > # Restore the vg conf > echo "Restoring the VG config... " > while read vg dev uuid; do > vgcfgrestore -f *$target_dir/lvm_$vg.conf* $vg 2>/dev/null > done < $PV_PARSE_CONF > echo "done!" > # > > I notice 2 things : > > * vgcfgrestor -f $target_dir/lvm_$vg.conf $vg => Use system function > mmap for read the file, and this mmap function is not available on > every remote filesystem (not in samba in my case). Then because of > this call failed, and restoration of vg failed. > * It could be better to use : pvcreate -ff --yes --uuid $uuid > ---restorefile /tmp/lvm_$vg.conf $dev, because, pvcreate in this > case, create pv much identical than without (same topology if > possible - see man pvcreate). pvcreate use mmap syustem call to. > > Patchs : > --- ocs-functions-ORIG 2008-02-14 08:50:36.732643764 +0000 > +++ ocs-functions 2008-02-14 09:42:13.013189303 +0000 > @@ -3307,14 +3307,20 @@ > # create PV first > echo "Creating the PV... " > while read vg dev uuid; do > - pvcreate -ff --yes --uuid $uuid $dev > + cp $target_dir/lvm_$vg.conf /tmp/ # mmap not available on remote disk > + pvcreate -ff --yes --uuid $uuid --zero y --restorefile > /tmp/lvm_$vg.conf $dev > + rm /tmp/lvm_$vg.conf > done < $PV_PARSE_CONF > echo "done!" > > # Restore the vg conf > echo "Restoring the VG config... " > while read vg dev uuid; do > - vgcfgrestore -f $target_dir/lvm_$vg.conf $vg 2>/dev/null > + cp $target_dir/lvm_$vg.conf /tmp # mmap failed on some network fs > + vgcfgrestore -f /tmp/lvm_$vg.conf $vg 2>/dev/null > + rm /tmp/lvm_$vg.conf > done < $PV_PARSE_CONF > echo "done!" > # > > Same patch should be apply to ocs-onthefly. > With this, all things is OK. I only copy localy file before starting > commands, and after remote temporary file. > Don't you think it could be good to add command exit code for stop > restoration if pre-requires are not done ? [I know it could be difficult > in bash, but...] > > > I test both new .iso images : > -clonezilla-live-1.0.9-8.iso => kernel is to old, and my nic carte > e1000 (last model in HP desktop), is not recognize. > -clonezilla-live-20080211-hardy-experimental.iso => Work well, and my > e1000, is well seen. > > Thanks. > > Gerald > > -- > ASTREL "Raison & Télécom" > ghe...@as... - http://www.astrel.fr > -- Steven Shiau <steven _at_ nchc org tw> <steven _at_ stevenshiau org> National Center for High-performance Computing, Taiwan. http://www.nchc.org.tw Public Key Server PGP Key ID: 1024D/9762755A Fingerprint: A2A1 08B7 C22C 3D06 34DB F4BC 08B3 E3D7 9762 755A |