23.07.2014 Views

Lustre 1.6 Operations Manual

Lustre 1.6 Operations Manual

Lustre 1.6 Operations Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

23.4 Looking at Disk Content<br />

In <strong>Lustre</strong>, the inodes on the metadata server contain extended attributes (EAs) that<br />

store information about file striping. EAs contain a list of all object IDs and their<br />

locations (that is, the OST that stores them). The lfs tool can be used to obtain this<br />

information for a given file via the getstripe sub-command. Use a corresponding<br />

lfs setstripe command to specify striping attributes for a new file or directory.<br />

The lfs getstripe utility is written in C; it takes a <strong>Lustre</strong> filename as input and<br />

lists all the objects that form a part of this file. To obtain this information for the file<br />

/mnt/lustre/frog in <strong>Lustre</strong> filesystem, run:<br />

$ lfs getstripe /mnt/lustre/frog<br />

$<br />

OBDs:<br />

0 : OSC_localhost_UUID<br />

1: OSC_localhost_2_UUID<br />

2: OSC_localhost_3_UUID<br />

obdix<br />

objid<br />

0 17<br />

1 4<br />

The debugfs tool is provided by the e2fsprogs package. It can be used for interactive<br />

debugging of an ext3/ldiskfs filesystem. The debugfs tool can either be used to<br />

check status or modify information in the filesystem. In <strong>Lustre</strong>, all objects that<br />

belong to a file are stored in an underlying ldiskfs filesystem on the OST's. The<br />

filesystem uses the object IDs as the file names. Once the object IDs are known, the<br />

debugfs tool can be used to obtain the attributes of all objects from different OST's. A<br />

sample run for the /mnt/lustre/frog file used in the example above is shown here:<br />

$ debugfs -c /tmp/ost1<br />

debugfs: cd O<br />

debugfs: cd 0 /* for files in group 0 */<br />

debugfs: cd d<br />

debugfs: stat /* for getattr on object */<br />

debugfs: quit<br />

## Suppose object id is 36, then follow the steps below:<br />

$ debugfs /tmp/ost1<br />

debugfs: cd O<br />

debugfs: cd 0<br />

debugfs: cd d4 /* objid % 32 */<br />

debugfs: stat 36 /* for getattr on obj 4*/<br />

debugfs: dump 36 /tmp/obj.36 /* dump contents of obj 4 */<br />

debugfs: quit<br />

Chapter 23 <strong>Lustre</strong> Debugging 23-13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!