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.

How to fix bad LAST_ID on an OST<br />

The filesystem must be stopped on all servers prior to performing this procedure.<br />

For hex decimal translations:<br />

Use GDB:<br />

(gdb) p /x 15028<br />

$2 = 0x3ab4<br />

Or bc:<br />

echo "obase=16; 15028" | bc<br />

1. Determine a reasonable value for LAST_ID. Check on the MDS:<br />

# mount -t ldiskfs /dev/ /mnt/mds<br />

# od -Ax -td8 /mnt/mds/lov_objid<br />

There is one entry for each OST, in OST index order. This is what the MDS thinks the<br />

last in-use object is.<br />

2. Determine the OST index for this OST.<br />

# od -Ax -td4 /mnt/ost/last_rcvd<br />

It will have it at offset 0x8c.<br />

3. Check on the OST. With debugfs, check LAST_ID:<br />

debugfs -c -R 'dump /O/0/LAST_ID /tmp/LAST_ID' /dev/XXX ; od -Ax -td8<br />

/tmp/LAST_ID"<br />

4. Check objects on the OST:<br />

mount -rt ldiskfs /dev/{ostdev} /mnt/ost<br />

# note the ls below is a number one and not a letter L<br />

ls -1s /mnt/ost/O/0/d* | grep -v [a-z] |<br />

sort -k2 -n > /tmp/objects.{diskname}<br />

tail -30 /tmp/objects.{diskname}<br />

This shows you the OST state. There may be some pre-created orphans, check for<br />

zero-length objects. Any zero-length objects with IDs higher than LAST_ID should<br />

be deleted. New objects will be pre-created.<br />

If the OST LAST_ID value matches that for the objects existing on the OST, then it is<br />

possible the lov_objid file on the MDS is incorrect. Delete the lov_objid file on the<br />

MDS and it will be re-created from the LAST_ID on the OSTs.<br />

Appendix D <strong>Lustre</strong> Knowledge Base D-25

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

Saved successfully!

Ooh no, something went wrong!