WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Wrong size on a domU partition

Ervin Novak wrote:

 > I create the file with this command

 > dd if=/dev/zero of=/xen/domains/SRV03/opt-disk.img bs=1024k seek=30720
 count=30720

Why are you using the seek= parameter? This is the cause of your
"problem" (actually, everything is happening in the way you want, but
this isn't needed for that).

It's a standard technique for creating a sparse file. The problem is specifying count as well as seek - so it's seeking over 30G (creating a sparse file), and then adding 30G of zeros.

The command should be :
dd if=/dev/zero of=/xen/domains/SRV03/opt-disk.img bs=1024k seek=30719 count=1

This will seek to 1M under 30G (( 30 * 1024 ) - 1 ), and then write 1M of zeros.

--
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users