[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[linux-lvm] Announce: lvm.check v 0.1


You can find lvm.check attached. It is a replacement of vgck and pvdata,
and looks for any type of inconsistency I could think of (but snapshot 
related ones).

PLEASE, run it on your system, and report if it reports anything
it should not, or not reports anything when it should.
Attach the output of lvmcheck.py -v -p <your physical volumes>
(I am also happy to get one-liner success reports, to see the statistics.)

It is written in python (sorry, this is an essential package for me).
It works from the physical disk, and does not use any of the LVM code.
This version is absolutely read-only, so you can safely try it on
your physical volumes.

untar it somewhere, if your python interpreter is not in /usr/bin,
then edit the first line of lvmcheck.py
lvmcheck.py -h gives a list of options.
It raises an exception (if -p not given) for the first inconsistency.
This behaviour is intentional, and may be frightening to you:)

lvmcheck.py [options] pv [pv ...]
Give all your pvs of one vg as argument.

./lvm.check/lvmcheck.py -q -p /dev/ide/host0/bus0/target0/lun0/part3 /dev/ide/host0/bus0/target0/lun0/part4

types.py is a library for tweaking structures on disk.
	It could be the base for a general-purpose disk editor.
	There is an update method, but os.write is in an unreacheble code path.
structures.py describes the disk structures of lvm. It is very straightforward.
lvmcheck.py does the heavy work. The pvcheck class reads and checks one pv
(this code should be put into another file, I know), the rest is some helper functions, and the cross-pv consistency checks.

It does not check for relationship of snaphots and their sources. This is the most serious problem I see.
It IS ugly. I never thought that I can write such an ugly code even in python:)
This could largely be mitigated by good use of whitespaces, and document strings.
There is no attempt to recover from any error.

maintainer is needed:
If I get a bugreport which really fucks me up, I will tweak it.
In any other case, pick the maintainership, and announce it in the 
linux-lvm list.

GNU GPL: csak tiszta forrásból

Attachment: lvm.check.tar.gz
Description: Binary data

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]