Hi Tobias, thanks for reporting the issue. You're right it should get the SIZE of the origin image and not the default size.
I have patched it to do what you said. To deploy it, simply replace the lvm/clone script with this one, and then do onehost sync. https://github.com/OpenNebula/one/blob/master/src/tm_mad/lvm/clone please let me know if it isn't working as expeceted. thanks! Jaime On Thu, Feb 21, 2013 at 11:18 PM, Tobias Honacker <[email protected] > wrote: > Hi Jaime, > > great scripts, thanks. but now there are new errors after the VM is in > PROLOG state: > > > ---snip--- > Thu Feb 21 21:55:38 2013 [TM][D]: Message received: LOG I 8 Command > execution fail: /var/lib/one/remotes/tm/lvm/clone localhost:vg-one.lv-one-4 > priv002:/var/lib/one//datastores/0/8/disk.0 8 100 > > Thu Feb 21 21:55:38 2013 [TM][D]: Message received: LOG E 8 clone: Command > " set -e > > Thu Feb 21 21:55:38 2013 [TM][D]: Message received: LOG I 8 mkdir -p > /var/lib/one/datastores/0/8 > > Thu Feb 21 21:55:38 2013 [TM][D]: Message received: LOG I 8* sudo > lvcreate -L512 -n lv-one-4-8-0 vg-one* > > Thu Feb 21 21:55:38 2013 [TM][D]: Message received: LOG I 8 sudo dd > if=/dev/vg-one/lv-one-4 of=/dev/vg-one/lv-one-4-8-0 bs=64k > > Thu Feb 21 21:55:38 2013 [TM][D]: Message received: LOG I 8 ln -s > "/dev/vg-one/lv-one-4-8-0" "/var/lib/one/datastores/0/8/disk.0"" failed: > Warning: Permanently added 'priv002,192.168.255.2' (RSA) to the list of > known hosts. > > Thu Feb 21 21:55:38 2013 [TM][D]: Message received: LOG I 8 *dd: writing > `/dev/vg-one/lv-one-4-8-0': No space left on device* > > Thu Feb 21 21:55:38 2013 [TM][D]: Message received: LOG I 8 8193+0 records > in > > Thu Feb 21 21:55:38 2013 [TM][D]: Message received: LOG I 8 8192+0 records > out > > Thu Feb 21 21:55:38 2013 [TM][D]: Message received: LOG I 8 536870912 > bytes (537 MB) copied, 18.1729 s, 29.5 MB/s > > Thu Feb 21 21:55:38 2013 [TM][D]: Message received: LOG E 8 Error cloning > /dev/vg-one/lv-one-4 to /dev/vg-one/lv-one-4-8-0 > > Thu Feb 21 21:55:38 2013 [TM][D]: Message received: LOG I 8 ExitCode: 1 > > Thu Feb 21 21:55:38 2013 [TM][D]: Message received: TRANSFER FAILURE 8 > Error cloning /dev/vg-one/lv-one-4 to /dev/vg-one/lv-one-4-8-0 > ---snip--- > > [root@priv001 ~]# lvs > LV VG Attr LSize Pool Origin Data% Move Log Copy% > Convert > lv-one-4 vg-one -wi-a--- *8,00g * > > lv-one-4-8-0 vg-one -wi-a--- *512,00m* > > > The script is using the default lv size in lvm.conf. > > in clone file: > > SIZE=$(onevm show -x $VM_ID | $XPATH ) > [ -z "$SIZE" ] && SIZE=$DEFAULT_SIZE > > this command cant find the real size of my lv? (8G) ? > > > > Thanks for support and best regards, > Tobias > > > Am 21.02.2013 um 18:52 schrieb Jaime Melis: > > Oops, you're right. > > Ok, so, can you test the upcoming LVM drivers for OpenNebula 4.0? It > replaces snapshotting with cloning... > > just replace /var/lib/one/remotes/tm/lvm > with the contents of: > https://github.com/OpenNebula/one/tree/master/src/tm_mad/lvm > > and do "onehost sync" afterwards? > > > On Thu, Feb 21, 2013 at 6:41 PM, Tobias Honacker < > [email protected]> wrote: > >> Hi Jaime, >> >> yes you are right. I posted the error log file with TM_MAD="lvm", too. I >> tried both TM_MAD=shared and lvm. >> I will try the links Mihály Héder already posted. But maybe you have got >> any other ideas? >> >> >> Best regards, >> Tobias >> >> >> Am 21.02.2013 um 18:37 schrieb Jaime Melis: >> >> Actually, it's "onedatastore update 100", not "onetemplate"... sorry >> >> >> On Thu, Feb 21, 2013 at 6:22 PM, Jaime Melis <[email protected]>wrote: >> >>> Hi Tobias, >>> >>> your datastore template has the wrong TM_MAD. It should be TM_MAD="lvm" >>> instead of TM_MAD="shared". >>> >>> You can fix it by doing "onetemplate update 100" and editing it >>> in-place. >>> >>> BTW, thanks for sending all the information, it's so much easier to >>> debug these things when you have the logs and the templates... :-) >>> >>> cheers, >>> Jaime >>> >>> -- >>> Jaime Melis >>> Project Engineer >>> OpenNebula - The Open Source Toolkit for Cloud Computing >>> www.OpenNebula.org | [email protected] >>> >> >> >> >> -- >> Jaime Melis >> Project Engineer >> OpenNebula - The Open Source Toolkit for Cloud Computing >> www.OpenNebula.org | [email protected] >> >> >> > > > -- > Jaime Melis > Project Engineer > OpenNebula - The Open Source Toolkit for Cloud Computing > www.OpenNebula.org | [email protected] > > > -- Jaime Melis Project Engineer OpenNebula - The Open Source Toolkit for Cloud Computing www.OpenNebula.org | [email protected]
_______________________________________________ Users mailing list [email protected] http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
