[Pvfs2-developers] patches: pvfs2-validate
Phil Carns
pcarns at wastedcycles.org
Wed Jun 7 12:47:07 EDT 2006
This is a work in progress, but we wanted to go ahead and share some
patches to see if anyone has an comments, etc.
The last patch in this email (pvfs2-validate.patch) implements a tool
similar to pvfs2-fsck that takes a different approach and adds some
different functionality. The first two patches are independent changes
to PVFS2 functionality that make it a little easier to look for file
system problems.
mgmt-getconfig.patch:
---------------
This patch adds a new PVFS_mgmt_getconfig() function to the management
interface. It allows you to retrieve the file system and server
configuration files verbatim from any arbitrary server in a file system.
No protocol changes are necessary because it uses the existing
getconfig operation. It also reuses most of the state machine that the
client normally uses for retrieving configuration data, with some
modifications that allow it to preserve the text buffers in this case.
This function is a building block for being able to confirm that the
server configuration settings are consistent.
sys-getattr-other-objects.patch:
----------------
This patch makes it safe to call PVFS_sys_getattr() directly on
underlying objects in a file system (such as datafiles), rather than
juse files, directories, and symlinks. This is useful for confirming
valid attributes on individual objects. Only two changes were needed:
- making sure that only metafiles, dirs, and symlinks get added to the
acache (attribute cache)
- copying the size out for datafiles
pvfs2-validate.patch:
----------------
This adds a command line tool called pvfs2-validate that is modeled
after pvfs2-fsck, but diverges in a few ways:
- It uses a new fsck-utils API (PVFS_fsck_XXX()) to do most of the work.
This API includes functions for validating various types of PVFS2
objects and checking for problems. The PVFS_fsck_XXX() functions just
make normal PVFS_sys_XXX() and PVFS_mgmt_XXX() calls under the covers.
It includes functions that can walk directory trees as well, so that
you can just call one top level function to validate an full tree. This
api could possibly be reused by other admin tools.
- It can be run on individual directory trees or files rather than the
entire file system. This is helpful for diagnosing particular suspected
problem areas on the file system when you don't have time to run a full
fsck on a large file system. Running pvfs2-validate on any directory
other than root disables the check for stranded objects, however,
because it has to parse the whole tree to make sure that all objects are
accounted for.
- It can do some basic configuration file sanity checking. To do this,
it retrieves the fs.conf from all servers, strips out whitespace and
comments, and then looks for differences. If any discrepancies are
found, it prints a warning and indicates which particular servers appear
to be using a different fs.conf and what the actual difference is (using
the first server as the "golden" model).
- It can (optionally) check for bad practice. These are issues that,
while not strictly a file system problem, can cause confusion for end
users. Examples include special characters (like * or ?) in file names,
and relative symbolic links that leave the file system (because these
will break if the mount point is changed).
- As part of its validity checking, it makes sure that all attribute
values returned for each object are sane, rather than just confirming
their existance. For example, does each file have at least one
datafile, are symlink targets non-null, is size > 0, are the object
types correct, etc.
- Default output is mostly silent, rather than printing diagnostic
information for every valid object encountered.
However, there are a few things that pvfs2-validate does _NOT_ do at
this time:
- it does not make any attempt to repair problems; it only reports them
- it still needs more strenuous testing
Comments and suggestions are welcome...
-Phil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mgmt-getconfig.patch.gz
Type: application/gzip
Size: 2662 bytes
Desc: not available
Url : http://www.beowulf-underground.org/pipermail/pvfs2-developers/attachments/20060607/29a929c5/mgmt-getconfig.patch-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pvfs2-validate.patch.gz
Type: application/gzip
Size: 14555 bytes
Desc: not available
Url : http://www.beowulf-underground.org/pipermail/pvfs2-developers/attachments/20060607/29a929c5/pvfs2-validate.patch-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sys-getattr-other-objects.patch.gz
Type: application/gzip
Size: 768 bytes
Desc: not available
Url : http://www.beowulf-underground.org/pipermail/pvfs2-developers/attachments/20060607/29a929c5/sys-getattr-other-objects.patch-0001.bin
More information about the Pvfs2-developers
mailing list