[Lustre-discuss] Determining /proc/fs/lustre/llite subdirectoy

James Robnett jrobnett at aoc.nrao.edu
Wed Dec 8 10:42:14 PST 2010


Our clients have 2 or 3 different lustre filesystems mounted.
We're using Lustre 1.8.4 on RHEL 5.5.

On clients I'd like to be able to toggle via a script the extents
monitoring in /proc/fs/lustre/llite/lustre-XXXXXX/extents_stats

Given a Lustre directory X how do I determine which lustre-XXXXX /proc
directory that equates to.  I know I've seen the question before
but after searching the docs and googling old mailing lists I'm
still stumped.

I can cheat a bit since I know which MDS goes to which filesystem,
do 'lctl list_nids', see which MDS is the right one, then see which
OSSes are grouped with that MDS and pull the trailing -osc-ffff-XXXXXXX
suffix off and use that as the suffix for /proc/fs/lustre/llite
but I have a vague recollection of a simpler more direct way.

[lustre]# df .
Filesystem           1K-blocks      Used Available Use% Mounted on
10.64.1.11 at tcp:/lustre  ................


[lustre]# /usr/sbin/lctl device_list
   0 UP mgc MGC10.64.1.11 at tcp f7f9beb4-2f44-9219-f491-01dde044e308 5
   1 UP lov lustre-clilov-ffff81021c910400 
3de485df-1dfa-31a1-64d3-c54e948e6f22 4
   2 UP mdc lustre-MDT0000-mdc-ffff81021c910400 
3de485df-1dfa-31a1-64d3-c54e948e6f22 5
   3 UP osc lustre-OST0000-osc-ffff81021c910400 
3de485df-1dfa-31a1-64d3-c54e948e6f22 5
... <remaining OSTS removed>
  11 UP mgc MGC10.64.2.11 at tcp d9cd36e8-0748-60bd-3b0f-327efce98418 5
  12 UP lov lustre-clilov-ffff810220907c00 
c2e6c647-c01f-f841-f06d-1a97571a6aea 4
  13 UP mdc lustre-MDT0000-mdc-ffff810220907c00 
c2e6c647-c01f-f841-f06d-1a97571a6aea 5
  14 UP osc lustre-OST0000-osc-ffff810220907c00 
c2e6c647-c01f-f841-f06d-1a97571a6aea 5
... <remaining OSTS removed>

   Since I want the filesystem on the first MDS (10.64.1.11) that equates to
  /proc/fs/lustre/llite/lustre-ffff81021c910400, this works but its a bit
cumbersome to script.  Is there a simpler way like 'lfs list-llite dir'

James Robnett
NRAO/NM






More information about the lustre-discuss mailing list