On 3/30/07, Nico Kadel-Garcia <nkadel@gmail.com> wrote:> > trilok nuwal wrote: > > Ya, this is a file disk made by "dd" and then formatted ext3 file > > system. Thats why i able to mount this as i mention in earlier mail. > By the way, there are a lot of instructions about doing this out there > in the wild that insist on using "dd if=/dev/zero count=[some big > number]" to fill the entire disk image. Don''t do that unless you want to > waste aa lot of time! > > Unless you''re creating swap partitions, or you want to zero partitions > for security reasons, you should skip all of the blocks in the middle. > For example, to use 1 MB sized blocks for ease of counting, and to make > a 10 GB partition, do this:: > > dd bs=1048576 count=1 seek=102339 if=/dev/zero of=targetfileHere i did not get, how to select theses values to create a 4GB disks. As in your''s example it looks like all are random values. Could you please elabrate this a bit ? Voila. All that''s been written to disk is the description of the file,> information about the loations of its blocks, and the end of the file. > There are no *contents* in it except for what''s been left on disk by > previous applications, which for most applications you don''t care about. > This is *MUCH, MUCH, MUCH* faster than the way stated by almost every > old webpage about creating disk partitions in the world. > > Sometimes, it helps to remember when the original shell commands were > written.... >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, Apr 11, 2007 at 01:00:06PM +0530, trilok nuwal wrote:> On 3/30/07, Nico Kadel-Garcia <nkadel@gmail.com> wrote: > > > > dd bs=1048576 count=1 seek=102339 if=/dev/zero of=targetfile > > Here i did not get, how to select theses values to create a 4GB disks. As in > your''s example it looks like all are random values. Could you please > elabrate this a bit ?dd supports human-readable options now: dd if=/dev/zero of=targetfile bs=1 count=1 seek=4G does what you want. "Write take one byte from /dev/zero and stuff it into targetfile, do that one time, and after seeking 4G." Christian _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thanks Horn, That only i wanted. On 4/11/07, Christian Horn <chorn@fluxcoil.net> wrote:> > On Wed, Apr 11, 2007 at 01:00:06PM +0530, trilok nuwal wrote: > > On 3/30/07, Nico Kadel-Garcia <nkadel@gmail.com> wrote: > > > > > > dd bs=1048576 count=1 seek=102339 if=/dev/zero of=targetfile > > > > Here i did not get, how to select theses values to create a 4GB disks. > As in > > your''s example it looks like all are random values. Could you please > > elabrate this a bit ? > > dd supports human-readable options now: > > dd if=/dev/zero of=targetfile bs=1 count=1 seek=4G > does what you want. > "Write take one byte from /dev/zero and stuff it into targetfile, do that > one > time, and after seeking 4G." > > Christian >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, Apr 11, 2007 at 01:00:06PM +0530, trilok nuwal wrote:> On 3/30/07, Nico Kadel-Garcia <nkadel@gmail.com> wrote: > > > >trilok nuwal wrote: > >> Ya, this is a file disk made by "dd" and then formatted ext3 file > >> system. Thats why i able to mount this as i mention in earlier mail. > >By the way, there are a lot of instructions about doing this out there > >in the wild that insist on using "dd if=/dev/zero count=[some big > >number]" to fill the entire disk image. Don''t do that unless you want to > >waste aa lot of time!Well that really all depends on where you want to waste time. If you create a sparse file, it is nice and fast for you to create initially. The disk I/O performance of your guest will be absolutely *TERRIBLE* as it causes the host to gradually allocate blocks behind the sparse file. So you easily come out at a net loss. If you create a non-sparse, fully allocated file, it takes a little while up front, but the disk I/O performance of your guest will be excellant from the moment it starts. For dev / testing where you''re never likely to actually use the whole of the disk image, its worth doing sparse files, but for production where performance of the guest matters, use non-sparse. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users