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

AW: AW: [Xen-users] Understanding sparse-files

To: "John Haxby" <john.haxby@xxxxxxxxxx>
Subject: AW: AW: [Xen-users] Understanding sparse-files
From: "Rustedt, Florian" <Florian.Rustedt@xxxxxxxxxxx>
Date: Tue, 16 Dec 2008 16:19:34 +0100
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 16 Dec 2008 07:25:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4947C5C1.7040703@xxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <152CD2A019ABF542B87AFDC5010DFBEE2E7256@xxxxxxxxxxxxxxxxxxxxxxxxxx> <4947BD2D.9000201@xxxxxxxxxx> <152CD2A019ABF542B87AFDC5010DFBEE2E7260@xxxxxxxxxxxxxxxxxxxxxxxxxx> <4947C5C1.7040703@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AclfkDBFW4SmFnR3SLS+SaRJtKYcGgAAUVlA
Thread-topic: AW: [Xen-users] Understanding sparse-files
 Oh, sh.t ;)

Well, no big clue to see that, if the real size is zero!
I hope, i'll think a little deeper next time i am asking, thanks again for your 
time spent to answer.

Kind regards, Florian

> -----Ursprüngliche Nachricht-----
> Von: John Haxby [mailto:john.haxby@xxxxxxxxxx] 
> Gesendet: Dienstag, 16. Dezember 2008 16:14
> An: Rustedt, Florian
> Cc: xen-users@xxxxxxxxxxxxxxxxxxx
> Betreff: Re: AW: [Xen-users] Understanding sparse-files
> 
> Rustedt, Florian wrote:
> >  Thank you!
> >
> > That was exactly what i needed ;)
> >
> >   
> 
> My pleasure.
> 
> > Does the choosen blocksize has impact on the formatting, so 
> do i need to take smaller blocksizes if i want to use the 
> space with the filesystem i am choosing more efficiently?
> > Or is it just for calculation, so formatting a "dd bs=512K 
> seek=2048" results exactly in the same filesystemlayout after 
> formatting as a "dd bs=1M seek=1024" would do?
> > So in both cases, i can use a "mkfs.ext2 -b 512 huge" and 
> the resulting file mounts in both cases equally with a 256 
> Byte blocksize?
> >   
> 
> Files don't have block sizes :-)   dd just multiples the 
> block size and 
> seek to find the starting offset.  In fact, as the count is 
> zero (write nothing at all to the file), dd bs=1M seek=20480 
> count=0 turns into this:
> 
>     open("/dev/zero", O_RDONLY)             = 3
>     dup2(3, 0)                              = 0
>     close(3)                                = 0
>     lseek(0, 0, SEEK_CUR)                   = 0
>     open("huge", O_RDWR|O_CREAT, 0666)      = 3
>     dup2(3, 1)                              = 1
>     close(3)                                = 0
>     ftruncate(1, 21474836480)               = 0
> 
> The important call is the last one.
> 
> jch
> 
> 
**********************************************************************************************
IMPORTANT: The contents of this email and any attachments are confidential. 
They are intended for the 
named recipient(s) only.
If you have received this email in error, please notify the system manager or 
the sender immediately and do 
not disclose the contents to anyone or make copies thereof.
*** eSafe scanned this email for viruses, vandals, and malicious content. ***
**********************************************************************************************


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