Whamcloud - gitweb
e2fsck: add Lustre lfsck tool
The lfsck tool, in conjunction with e2fsck, build a DB4 database
of all the inodes and objects on the MDT and OST filesystems.
The lfsck tool combines the databases on the Lustre client,
and can verify that all of the objects referenced by inodes
exist, are not referenced by two inodes, and have a parent
inode.
LU-266 e2fsck: regenerate LAST_ID file
e2fsck should be able to regenerate the LAST_ID file if it gets
corrupted. This patch will create a new LAST_ID file if it was
deleted, and removes the unnecessary lfsck_get_last_id function.
The last_id is then set as before in e2fsck_pass6_ost to be either
the max objid on disk, or the MDS' max ost id, whichever is larger.
Reported-by: Bernd Schubert <aakef@fastmail.fm>
Signed-off-by: Kit Westneat <kwestneat@ddn.com>
Change-Id: Ic5396da000909b826b76da2fd5a0b5ce88b06944
LU-2682 lfsck: fix access to ost_id structures
Changes in upstream lov_mds_md use lmm_oi and l_ost_oi instead
of direct _id and _seq access, in preparation for FID-on-OST
changes. Update lfsck code to handle new structures.
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: If18f5ed34744b8372687472843ccc09108500c1e
Change-Id: I05b5da92efbedb7b92c6de736c05beef30500c1e
LU-2677 lfsck: handle smaller lustre_mdt_attrs
In 2.4 the lustre_mdt_attrs (LMA) structure was shrunk to move out
the unused SOM fields into a separate structure. The filter_fid
structure was shrunk to allow both FF and LMA on 256-byte OST inodes.
Allow reading both old and new LMA and FF structures, since we only
care about the initial fields in both of them.
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: If6c75d5ee3192ef3761aa9f645175698ebe5ee36
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
22 files changed: