|
|
|
|
|
|
|
|
|
|
xen-users
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
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|
|
|