Peter Braam wrote:
Huangwei:
Could you post the man page here?
e2scan(1) backup utilities
e2scan(1)
NAME
e2scan - Ext2 filesystem modified inode scan program
SYNOPSIS
e2scan [options] [-f file] block_device
DESCRIPTION
e2scan , when invoked, iterates all inodes on the block device,
find modified inodes, print
their inode numbers.A similar iterator, using libext2fs(5) , will
build a table(called par-
ent database) which for each inode lists the parent inode. With a
lookup function lookup ino
in a directory, one can reconstruct modified pathnames from root.
To manage hardlinks it is probably a good idea to write in this
file <ino> <pathname>, so
hard linked files will appear multiple times and all pathnames of
the link are present
OPTIONS
-b inode buffer blocks
set readahead inode blocks to get excellent performance
when scanning block device.
-o output file
if output file is set, modified pathnames is written in
to this file, otherwise to
stdout.
-t inode | pathname
set e2scan type, if type is "inode", e2scan just print
modified inode ino’s to std-
out. By default, or type is set "pathname", e2scan will
list out modified pathnames
based on modified inode ino’s.
-u build parent database is a little time consume, if parent
database is not up-to-date,
e2scan use this option to rebuild parent database from
scratch. Otherwise, current
parent database is used.
BUGS
None are known.
Lustre 2006 Sep 26
e2scan(1)
- peter -
huangwei wrote:
Peter Braam wrote:
CFS recently posted a C program that can scan the disks (even while
Lustre is mounted) and generate pathname lists. Our main purpose
was backups. This program should be usable for other purposes.
Huangwei, could you point out how this works?
yes, this program is named e2scan, which is a program using libext2fs
to find inodes with ctime or mtime newer than a given time and print
out their pathname. this program can be found in bug10929, i also
attached it here.
Simple usage example for e2scan:
e2scan -u -f filename dev
this will create a file named modified_pathnames include all modified
file's pathname.
more detail of e2scan can be found in their man page.
- peter -
Felix, Evan J wrote:
The problem becomes that it is very time consuming to run stat on
every
file of the MDS. We have used a multi-threaded python program to walk
the entire filesystem fairly effectively on our two large Lustre
systems. I released one of them a while back to the mailing list, and
it should be in the archives somewhere. If you cant locate it send
me a
mail, and I'll send it on to you. The released version was
designed to
expire files when they have been on the file system for a long
time, but
it doesn't have to, as it also collects usage data for files, and
directories.
I've heard rumors that someone in CFS is working on and MDS scanning
utility that should be more efficient, but until we see it I have no
idea how well it works..
Evan
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kaizaad
Bilimorya
Sent: Thursday, January 11, 2007 7:31 AM
To: [email protected]
Subject: [Lustre-discuss] file stat in lustre
Hello,
We would like to build an informational page that will provide
users with stats (size, name, path, mod time,...) on files they
have in the lustre filesystem (and maybe store it in a db). I can
use "lfs" to get strip and OST info but not "stat" info. We could
build some perl tools (probably already out there) which would
traverse the filesystem and give us this information, but I would
like to know if there is a better or efficient way to do this.
Or maybe there is already a lustre utility that can give me the
stat info on a file just by querying the MDS server instead of
traversing the entire lustre filesystem? Or maybe this is not a
good approach? Something better?
thanks
-k
_______________________________________________
Lustre-discuss mailing list
[email protected]
https://mail.clusterfs.com/mailman/listinfo/lustre-discuss
_______________________________________________
Lustre-discuss mailing list
[email protected]
https://mail.clusterfs.com/mailman/listinfo/lustre-discuss
_______________________________________________
Lustre-discuss mailing list
[email protected]
https://mail.clusterfs.com/mailman/listinfo/lustre-discuss