Hi, I have some problems trying to use pvfs2_open<br>I have a small cluster with two computers with pvfs2.<br><br>Although i need to start the server with<br><br>/src/local/sbin/pvfs2-server /etc/pvfs2-fs.conf<br><br>in each machine (both machines are IO servers),<br>
when i try to use pvfs2_open in my code like this:<br><br>####################################<br>#include <cstdio><br>#include <iostream><br>#include <cstdlib><br>#include "pvfs2.h"<br>#include <sys/types.h><br>
#include <unistd.h><br>#include <grp.h><br>#include <pwd.h><br><br>// compile with g++ Read.cpp -L /usr/local/lib/libpvfs2<br><br>int main( int argc, char **argv)<br>{<br> //struct pvfs_filestat pstat;<br>
int fd;<br><br> <br> char file[256] = "/mnt/pvfs2/File.map";<br><br> if ( fd = pvfs2_open(file) != 0 )<br> {<br> perror("open");<br> return EXIT_FAILURE;<br> }<br>
<br> if ( pvfs2_close(fd) < 0 )<br> {<br> perror("close");<br> return EXIT_FAILURE;<br> }<br> <br> return EXIT_SUCCESS;<br>}<br>###################################<br>the result is <br>
<br>Read.cpp:18: error: ‘pvfs2_open’ was not declared in this scope<br>Read.cpp:24: error: ‘pvfs2_close’ was not declared in this scope<br><br>I mean, i only can do the pvfs2-commands such as pvfs2-cp at the promp and<br>
i want to read and write files from my code like this.<br>What is missing?<br>What i'm doing wrong?<br>Do i need to use mpi?<br><br>Another issue is, although i copied /usr/src/pvfs-2.8.1/examples/pvfs2-server.rc<br>to /etc/rc.d/init.d/pvfs2-server i can't do /etc/rc.d/init.d/pvfs2-server start or<br>
/etc/rc.d/init.d/pvfs2-server stop. Why is this?<br><br>Another thing is: Mount the existing PVFS2 volume on the local filesystem.<br>Because i have the /mnt/pvfs2 folder I'm only loading the kernel module in both machines<br>
like<br>insmod /usr/src/pvfs-2.8.1/src/kernel/linux-2.6/pvfs2.ko<br>and in the dmesg output i got<br>... [17565.529630] pvfs2: module version 2.8.1 loaded<br>In the machine that i want to mount the pvfs2 volume i did<br><br>
cd /usr/src/pvfs-2.8.1/src/apps/kernel/linux/<br>./pvfs2-client -f -p ./pvfs2-client-core<br><br>and the result was<br><br>pvfs2-client starting<br>Spawning new child process<br>Waiting on child with pid 5544<br>About to exec: ./pvfs2-client-core, with args: pvfs2-client-core --child -a 5 -n 5 --logtype file -L /tmp/pvfs2-client.log <br>
<br>but nothing more happened. Whatn is wrong?<br clear="all"><br>