In article <[EMAIL PROTECTED]>,
        [EMAIL PROTECTED] (Alex van den Bogaerdt) writes:
> 
> Karyn Ulriksen wrote:
>> 
>> yup...  its an nfs issue...  works on local volumes just fine...
>> 
>> will be changing thread here...
> 
> glad you've found it.  While I think this is not an RRDtool
> problem per se, maybe Tobi can fix it somewhere, somehow?

rrdtool uses fcntl to lock the rrd file. This needs a nfs implementation
with working locking. The original sun nfs has working locking. Linux
might have it with with version 2.2 or 2.4, don't know exactly. Look for
a running "lockd".

Maybe rrdtool could handle "ENOLCK" (no locks available) differently and
skip locking or use lock files.

> Anyway, what version of the software?  RHx.y, NFS on both sides
> etcetera, etcetera.

I suppose Linux 2.0 or 2.2 without lockd ...

Rainer

PS: Use the following C program to test wether your nfs has working
locking:

#include <stdio.h>
#include <fcntl.h>
#include <errno.h>

main() {
        FILE *rrd_file;
        struct flock lock;
        int stat, rrd_fd;
        
        rrd_file = fopen("lockfile", "w+");
        if (rrd_file == NULL) {
                perror("open");
                exit(1);
        }
        fprintf(rrd_file, "testinhalt\n");
        fflush(rrd_file);
        lock.l_type = F_WRLCK;
        lock.l_len = 0;
        lock.l_start = 0;
        lock.l_whence = SEEK_SET;
        rrd_fd = fileno(rrd_file);
        stat = fcntl(rrd_fd, F_SETLK, &lock);
        if (stat) {
                perror("fcntl");
                exit(1);
        }
        printf("konnte lockfile locken\n");
        fclose(rrd_file);
        unlink("loclfile");
}

--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to