This could be considered OT however i can''t seem to find an answer to this one. I will appreciate if someone can help me out. I created a new logical volume of 3G, then issued cat of a flat file of centos to it. The flat file is of 1GB. cat /home/anand/images/centos.img > /dev/vgxen/test7 lvscan shows 3GB allocated [root@xen tmp]# lvs LV VG Attr LSize Origin Snap% Move Log Copy% test7 vgxen -wi-a- 3.00G test7-swap vgxen -wi-a- 256.00M after mounting it shows a size of 1GB approx. i.e. the same size as the flat file. df -h /dev/mapper/vgxen-test7 986M 475M 462M 51% /tmp/xen-server-tools.Cl7947 After this when i mount the volume it shows up as 1gb in size and vgs shows 3gb allocated to it. While using flat files i remember i could use resize to get the new flat file size back. However in case of volumes how do i do so ? P.S. Can anyone recommend a better way to create file systems inside volumes than the above method ? -- regards, Anand _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
If i have two volumes test7 and test8. What is most efficient way to copy data from one to another ? I did tests using cat, rsync, dd, cpio and all of them seem to be consuming almost all of my dom0 256MB ram and cpu load goes up to a max 1.65 (athlon 2.6ghz, 1gb ram) Infact dd takes more time to copy the data, ofcourse the reason being the way it operates and copies sector by sector. All other tools averaged time at 4.5 mins, dd took 6+mins. The test7 volume is of 850MB and the test8 volume is of 1GB. The test7 volume is actually the template for the centos which is used for various domains. Can anyone please share their experiences on what they use to copy data most efficiently ? -- regards, Anand _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Are you increasing the block size when you copy with dd??? Or are you just using the default which I believe is 512 bytes. I use dd to create my lvm''s from template files. My template OS''s are around 500M to 1G. For example. inuyasha:~# time dd if=debian3.1 of=/dev/vds/lvol2 bs=1M 512+0 records in 512+0 records out 536870912 bytes transferred in 25.429652 seconds (21112004 bytes/sec) real 0m25.432s user 0m0.000s sys 0m2.090s 25 seconds to copy a 500 meg file to the lvm and as you can see almost no cpu time was used. However if I don''t increase the blocksize I get this. inuyasha:~# time dd if=debian3.1 of=/dev/vds/lvol2 1048576+0 records in 1048576+0 records out 536870912 bytes transferred in 153.342399 seconds (3501125 bytes/sec) real 2m33.345s user 0m0.650s sys 0m3.530s Big difference huh?? 25 seconds to 2.5 minutes. Still doesn''t thrash the processor but this is a dual 2.4ghz xeon with an ultra 160 scsi array. Dave Anand wrote:> If i have two volumes test7 and test8. What is most efficient way to > copy data from one to another ? > > I did tests using cat, rsync, dd, cpio and all of them seem to be > consuming almost all of my dom0 256MB ram and cpu load goes up to a > max 1.65 (athlon 2.6ghz, 1gb ram) > > Infact dd takes more time to copy the data, ofcourse the reason being > the way it operates and copies sector by sector. All other tools > averaged time at 4.5 mins, dd took 6+mins. > > The test7 volume is of 850MB and the test8 volume is of 1GB. The test7 > volume is actually the template for the centos which is used for > various domains. > > Can anyone please share their experiences on what they use to copy > data most efficiently ? > > -- > > regards, > > Anand > >------------------------------------------------------------------------ > >_______________________________________________ >Xen-users mailing list >Xen-users@lists.xensource.com >http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Your problem is that the *filesystem* size is still the same as the original flat file. You have to resize the filesystem. If it is an ext2/ext3 filesystem you can use resize2fs to do the job. It should be able to pick up the new size from the size of the LVM. -Jeff Anand wrote:> This could be considered OT however i can''t seem to find an answer to > this one. I will appreciate if someone can help me out. > > I created a new logical volume of 3G, then issued cat of a flat file of > centos to it. The flat file is of 1GB. > > cat /home/anand/images/centos.img > /dev/vgxen/test7 > > lvscan shows 3GB allocated > [root@xen tmp]# lvs > LV VG Attr LSize Origin Snap% Move Log Copy% > test7 vgxen -wi-a- 3.00G > test7-swap vgxen -wi-a- 256.00M > > after mounting it shows a size of 1GB approx. i.e. the same size as the > flat file. > df -h > /dev/mapper/vgxen-test7 > 986M 475M 462M 51% /tmp/xen-server-tools.Cl7947 > > After this when i mount the volume it shows up as 1gb in size and vgs > shows 3gb allocated to it. While using flat files i remember i could use > resize to get the new flat file size back. However in case of volumes > how do i do so ? > > P.S. Can anyone recommend a better way to create file systems inside > volumes than the above method ? > > -- > > regards, > > Anand > > > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users- -- ============================================================================Jeffrey I. Schiller MIT Network Manager Information Services and Technology Massachusetts Institute of Technology 77 Massachusetts Avenue Room W92-190 Cambridge, MA 02139-4307 617.253.0161 - Voice jis@mit.edu ===========================================================================-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDyydt8CBzV/QUlSsRAiGUAKCcNO4H0rUibykvW4GAPP6PnMjsEACeML2i CjrEqNH/AN7Z+mtDx4kHMb4=aPA2 -----END PGP SIGNATURE----- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 1/16/06, Jeffrey I. Schiller <jis@mit.edu> wrote:> > Your problem is that the *filesystem* size is still the same as the > original flat file. You have to resize the filesystem. If it is an > ext2/ext3 filesystem you can use resize2fs to do the job. It should be > able to pick up the new size from the size of the LVM. >Thanks i was able to get back the size on the lvm. -- regards, Anand _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users