Hi. Just a wild guess. rrdcached has a file handle for this file. If you delete a file the OS usually removes the directory entry but NOT the allocated space.
A file handles point to an inode not to a path, so I think rrdcached is still able to write data to the file handle. If you remove a file using rm, rm calls the "unlink" function (which destroys a "link" between a filename (a dentry) and a file). The file _actually_ still exits until the reference counter (of the file handles for this file) is zero (which only happens if you close the last open file handle). The write() system call (I guess rrdcached uses this call) doesn't return ENOENT if you write to a file handle (see man 2 write) and rrdcached passes the errno of the system calls (in this case the system call returns with errno=0). "rrdtool update" on the other hand will call open() to get a _NEW_ file handle each time it access a file. If the path to the file doesn't exist it returns ENOENT because it is not able to acquire a NEW file handle. The solution? I don't know. Does rrdcached close a file handle if you pass the flush command? HTH, Andreas. On 10/05/10 09:59, 橋本 雄弥 wrote: > Hello, > Trying to update the rrd file which no longer existed with use of rrdcached > via network, > I recieved NO ERROR, which should have returned. (And, the message would be > "ERROR: rrdcached: No such file: xxxxxx", I suppose.) > > The procedure I went through when I came across this event was as follows; > (Assume that Host A and Host B are connected via network) > > 1. Run rrdcached on HOST A. > 2. Create a rrd file on HOST A. > 3. Execute "rrdtool update --daemon" on HOST B to udpate the rrd file created > on HOST A. > NO ERROR returned, which seemed normal. > 4. Remove the rrd file from HOST A. > 5.Execute "rrdtool update --daemon" on HOST B to udpate the rrd file already > removed from HOST A. > NO ERROR returned, which seemed strange since there no longer existed the rrd > file what should be updated. > > The event described above doesn't happen if "rrdtool update" is executed on > the same host on which target rrd file > is located. > > The version of RRDtool used is 1.4.4. > Does anyone have the information or the solution about this? > Regards, > > Yuya > > > > _______________________________________________ > rrd-users mailing list > [email protected] > https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users -- Dipl.-Ing. Andreas Maus science+computing ag System Administration Hagellocher Weg 73 tel.: +49 7071 9457 671 72070 Tuebingen, Germany fax: +49 7071 9457 411 www.science-computing.de -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 _______________________________________________ rrd-users mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
