ok, thanks for the warning, I will do a test on another virtual disk to get an estimate how long it will take. it's definitely easier to do a dd then setting up an empty system and copying the data, also from a consistency point of view, IMO..




On Wed, Mar 13, 2013 at 3:35 PM, Andrey Repin <anrdaemon@freemail.ru> wrote:
Greetings, Webmin users list!

> ok, this is a brillant idea (stupid me..) - I will give it a try tonight,
> anything to watch for when cloning?

Don't make haste, and make sure your backup is up to date :)
Yes and no. Yes, in essence, it's the right thing to do. No, because it
doesn't mention some caveats necessary when working with filesystems on low
level.
I would recommend to use
dd if=... of=... iflag=direct oflag=direct bs=$((4096*1024))
Means, to use direct IO (to ensure no effect from OS caching layer), and use
4Mb (4096*1024) size blocks to read and write data. Bigger block IO is faster,
than using default 512b block. (Also, you don't want to use blocks smaller,
than 4096b anyway, as your FS is based on them)
Be aware, that no matter, how optimal is the blocks size you choose, copying
1Tb of data would likely take a very, very, very long time.
To check the progress (or to have a running readout), you can send USR1 to a
running dd process.
Or use this monstrocity of shell script:
dd .... & PID=$! ; sleep 10 ; while kill -USR1 $PID ; do sleep 10 ; done

I have to restate the forewarning given in the article you mentioned: DD is a
very powerful tool, you can destroy your system as easy, as save it.
If there's no necessity in using DD (you aren't rescuing a dying HDD or
something to that extent), I'd advise on using
cp -axt /mnt/dest /mnt/src/*
, it'll also save your time, as it'll only clone your data.

> PAT


> On Wed, Mar 13, 2013 at 10:10 AM, Andrey Repin <anrdaemon@freemail.ru>wrote:

>> Greetings, Webmin users list!
>>
>> > problem is, that the VM isn't cloning anymore on the host level (some
>> > internal exi probblem,
>> > http://communities.vmware.com/message/2209760#2209760if you are
>> > interested) ), but it still runs and I'm be able to rsync/backup
>> > everything.
>>
>> If you have free space to duplicate whole VM disks, you can just add a new
>> disks and boot VM from LiveCD. From there, it is a simple case of using dd
>> to
>> duplicate the partitions.
>>
>> > I'm a bit sceptical of rsyncing the *whole* VM - but you would suggest
>> > this? like excluding /tmp /dev/ /proc and rsync over everything?
>>
>> rsync, much like cp, have option to "stay on same filesystem".
>>
>>
>> --
>> WBR,
>> Andrey Repin (anrdaemon@freemail.ru) 13.03.2013, <13:06>
>>
>> Sorry for my terrible english...
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_mar
>> -
>> Forwarded by the Webmin mailing list at
>> webadmin-list@lists.sourceforge.net
>> To remove yourself from this list, go to
>> http://lists.sourceforge.net/lists/listinfo/webadmin-list
>>





--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 13.03.2013, <18:06>

Sorry for my terrible english...


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
-
Forwarded by the Webmin mailing list at webadmin-list@lists.sourceforge.net
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-list



--
Pat Erler 
Gtalk/G+: perler@gmail.com
Skype: pat_erler