[Discuss] iscsitarget

Edward Ned Harvey blu at nedharvey.com
Mon May 7 17:00:30 EDT 2012


> From: Bill Bogstad [mailto:bogstad at pobox.com]
> Sent: Monday, May 07, 2012 4:35 PM
>  
> Better then dd or truncate for the initial creation (or extensions)
> would be the Linux specific fallocate program.   On the appropriate
> filesystem, it will allocate all the necessary data blocks to the
> file, but won't write anything to them.   For security reasons, this
> only works on filesystems which keep track of uninitialized (but
> allocated blocks) so that read() returns zeroed blocks until the block
> is actually written.  This can be as almost as fast as sparse
> allocation, but guarantees space is available when you finally need
> it.

Nice to know, thanks.

Also, if you preallocate, you should have less fragmentation in the host OS
filesystem, which should have a positive impact on performance.  But it's so
*hard* to sit there and wait for preallocation to overwrite all the
blocks...




More information about the Discuss mailing list