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.

}<br />

/* Ping all OSTs that belong to this filesysem */<br />

int ping_osts()<br />

{<br />

DIR *dir;<br />

struct dirent *d;<br />

char osc_dir[100];<br />

int rc;<br />

}<br />

sprintf(osc_dir, "/proc/fs/lustre/osc");<br />

dir = opendir(osc_dir);<br />

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

printf("Can't open dir\n");<br />

return -1;<br />

}<br />

while((d = readdir(dir)) != NULL) {<br />

if ( d->d_type == DT_DIR ) {<br />

if (! strncmp(d->d_name, "OSC", 3)) {<br />

printf("Pinging OSC %s ", d->d_name);<br />

rc = llapi_ping("osc", d->d_name);<br />

if (rc) {<br />

printf(" bad\n");<br />

} else {<br />

printf(" good\n");<br />

}<br />

}<br />

}<br />

}<br />

return 0;<br />

int main()<br />

{<br />

int file;<br />

int rc;<br />

char filename[100];<br />

char sys_cmd[100];<br />

sprintf(filename, "%s/%s",MY_LUSTRE_DIR, TESTFILE);<br />

printf("Open a file with striping\n");<br />

file = open_stripe_file();<br />

if ( file < 0 ) {<br />

printf("Exiting\n");<br />

exit(1);<br />

}<br />

printf("Getting uuid list\n");<br />

Chapter 25 Striping and I/O Options 25-15

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

Saved successfully!

Ooh no, something went wrong!