[Lustre-discuss] python lustre os.stat(path)

Andreas Dilger adilger at whamcloud.com
Thu Nov 17 09:00:02 PST 2011


On 2011-11-17, at 4:39, Emyr James <emyrjames1 at gmail.com> wrote:
> I've written a python script to walk the lustre filesystem, get the 
> os.stat details for each file to get the file owner id and then 
> generates a report of the total file size used by each user. I'm doing 
> it this way as users own files sprinkled throughout the filesystem as 
> opposed to all being filed away in neat subdirectories for each user.

Why not simply enable quotas in accounting mode (without quota enforcement)?  Then you can get this info without any scanning at all. 

> As this is just using the standard posix stuff it's slow as it goes to the 
> OSS's to get the file info from there. Presumably it should be possible 
> to get this info from the MDS ? If so, what lustre specific commands 
> would be useful ? Is there a python module out there that links into the 
> lustre client libraries to access info direct from the MDS ?
> Regards,
> Emyr
> _______________________________________________
> Lustre-discuss mailing list
> Lustre-discuss at lists.lustre.org
> http://lists.lustre.org/mailman/listinfo/lustre-discuss



More information about the lustre-discuss mailing list