23.07.2014 Views

Lustre 1.6 Operations Manual

Lustre 1.6 Operations Manual

Lustre 1.6 Operations Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

int get_my_uuids(int fd)<br />

{<br />

struct obd_uuid uuids[1024], *uuidp; /* Output var */<br />

int obdcount = 1024;<br />

int rc,i;<br />

rc = llapi_lov_get_uuids(fd, uuids, &obdcount);<br />

if (rc != 0) {<br />

fprintf(stderr, "get uuids failed: %d (%s)\n",errno,<br />

strerror(errno));<br />

}<br />

printf("This file system has %d obds\n", obdcount);<br />

for (i = 0, uuidp = uuids; i < obdcount; i++, uuidp++) {<br />

printf("UUID %d is %s\n",i, uuidp->uuid);<br />

}<br />

return 0;<br />

}<br />

/* Print out some LOV attributes. List our objects */<br />

int get_file_info(char *path)<br />

{<br />

struct lov_user_md *lump;<br />

int rc;<br />

int i;<br />

}<br />

lump = malloc(LOV_EA_MAX(lump));<br />

if (lump == NULL) {<br />

return -1;<br />

rc = llapi_file_get_stripe(path, lump);<br />

if (rc != 0) {<br />

fprintf(stderr, "get_stripe failed: %d (%s)\n",errno,<br />

strerror(errno));<br />

return -1;<br />

}<br />

printf("Lov magic %u\n", lump->lmm_magic);<br />

printf("Lov pattern %u\n", lump->lmm_pattern);<br />

printf("Lov object id %llu\n", lump->lmm_object_id);<br />

printf("Lov object group %llu\n", lump->lmm_object_gr);<br />

printf("Lov stripe size %u\n", lump->lmm_stripe_size);<br />

printf("Lov stripe count %hu\n", lump->lmm_stripe_count);<br />

printf("Lov stripe offset %u\n", lump->lmm_stripe_offset);<br />

for (i = 0; i < lump->lmm_stripe_count; i++) {<br />

printf("Object index %d Objid %llu\n", lump-<br />

>lmm_objects[i].l_ost_idx, lump->lmm_objects[i].l_object_id);<br />

}<br />

free(lump);<br />

return rc;<br />

25-14 <strong>Lustre</strong> <strong>1.6</strong> <strong>Operations</strong> <strong>Manual</strong> • September 2008

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

Saved successfully!

Ooh no, something went wrong!