2009-01-27 02:02:23

by Andreas Dilger

[permalink] [raw]
Subject: device/filesystem test tools

Per discussion in IRC, attached are some tools we use to verify the
block device and filesystem are behaving correctly w.r.t. common
block device filesystem overflow boundaries (e.g. 1TB, 2TB, 4TB, ...).

There is a block device verification tool that writes to the whole
block device, either sparsely or densely, and then reads the data back
and verifies that what was written is still there. The data pattern
includes both a per-run timestamp, and offset information so that
phantom writes will not match data from a previous run, and that
misplaced writes (whatever the cause) will be detectable.

There is a second filesystem verification tool that creates a number
of subdirectories (number == group count on ext3, though this is not
required), and then creates files in each subdirectory either until
the requested number of files are created or the filesystem is full.
Then it reads back the files and verifies the data therein, similar
to the block device verification tool. With filesystems other than
ext2/3 the creation of subdirectories does not necessarily force
file creation to be spread around the filesystem, but is not harmful
and will help test the directory allocation code on large devices.

The tools are intended to be compiled after a "configure" run in Lustre,
so they have a number of non-critical header checks to enable extra
functionality via libblkid and libext2fs (check for an existing filesystem,
get the number of block groups, etc). The tools can be compiled with
-D HAVE_EXT2FS_EXT2FS_H and -D HAVE_BLKID_BLKID_H defined, but should
be OK without them.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.


Attachments:
(No filename) (1.65 kB)
llverdev.c (14.99 kB)
llverfs.c (18.14 kB)
Download all attachments