Hi Daniel, Yesterday Daniel De Marco wrote:
> Hi, > > I'm trying to resize some rrd files to add more rows to the RRAs and I > get the "ERROR: attempting to write beyond end of file" mentioned in the > following thread ( > https://lists.oetiker.ch/pipermail/rrd-users/2011-January/017476.html ). > > The thread stopped at the message attached below. Did anybody find a > solution or workaround? only in the sense that I was not able to reproduce this on our systems ... it would be great to figure the cause of this ... cheers tobi > > $ rrdtool create pippo.rrd DS:test:GAUGE:120:0:U RRA:AVERAGE:0.5:1:244 > $ rrdtool resize pippo.rrd 0 GROW 10 > ERROR: attempting to write beyond end of file > > Thank you, Daniel. > > -------------------------------------------------------------------------------- > > On Wed, Jan 19, 2011 at 09:12:19AM +0100, Tobias Oetiker wrote: > > Hi Stefan, > > > > Today Stefan Brandl wrote: > > > > > > > > Sorry Tobi, but my C-Programming knowledge is very limited, > > > not to say non-existent :-( > > > Could you tell me, where to put what code to further debug this? > > > > I would guess something like this could serve: > > > > Index: rrd_open.c > > =================================================================== > > --- rrd_open.c (revision 2172) > > +++ rrd_open.c (working copy) > > @@ -671,7 +671,7 @@ > > > > if((rrd_file->pos + count) > old_size) > > { > > - rrd_set_error("attempting to write beyond end of file"); > > + rrd_set_error("attempting to write beyond end of file (%ld + > > %ld > %ld)",rrd_file->pos, count, old_size); > > return -1; > > } > > memcpy(rrd_simple_file->file_start + rrd_file->pos, buf, count); > > > > Ok, thanks. > This gives: > > noc at lowrider:~$ > noc at lowrider:~$ /opt/rrdtool-1.4.5.002170/bin/rrdtool create > tester.rrd DS:inet:GAUGE:600:0:U RRA:AVERAGE:0.5:1:600 > noc at lowrider:~$ /opt/rrdtool-1.4.5.002170/bin/rrdtool resize > tester.rrd 0 GROW 100 > ERROR: attempting to write beyond end of file (6144 + 8 > 6148) > noc at lowrider:~$ > > > Stefan > > -------------------------------------------------------------------------------- > > _______________________________________________ > rrd-users mailing list > rrd-users@lists.oetiker.ch > https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users > > -- Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland http://it.oetiker.ch t...@oetiker.ch ++41 62 775 9902 / sb: -9900 _______________________________________________ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users