Re: Script to set up sparse device for testing
"Stephen C. Tweedie" <[email protected]>
| Newsgroups | gmane.comp.file-systems.ext2.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
On Thu, 2006-07-06 at 13:47 +0200, Erik Mouw wrote:
> So truncate shall increase the file and zero fill it, but it doesn't
> say it should be a sparse file. I suppose that's left to the
> implementation.
Right.
The main advantage of sparsetmp over sparse files is specifically
helpful for the 48-bit ext3 extents work --- it allows us to create
sparse devices much larger than the 2TB limit of a regular file:
# lvcreate -n tmp -L 10g LV
Logical volume "tmp" created
# sparse_create sparsetmp /dev/LV/tmp 200000000000
dmsetup create sparsetmp_zero table.4403
dmsetup create sparsetmp_zero_org table.4403
dmsetup create sparsetmp table.4403
# verify-data -Q /dev/mapper/sparsetmp
BLKGETSIZE64 reports size is 102400000000000 bytes
ioctl(BLKGETSIZE): File too large
BLKBSZGET reports logical block size 4096 bytes
BLKSSZGET reports physical block size 512 bytes
BLKRAGET reports 256 readahead pages
BLKROGET reports device is writable
BLKSECTGET reports IO limit of 255 sectors
File is a block device: size 102400000000000 bytes (93.13T)
which is helpful for very large filesystem testing. Regular files are
limited to 2TB (at least on ext3.)
Cheers,
Stephen
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642