<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I found that doing a resize on an rrd file caused a total loss of data with rrdtool 1.3.9 which is bundled with zenoss 3.2.1 on CentOS 5. Investigating with the tools found that the data was there, but the timestamps were corrupt.<div><br></div><div>So I grabbed rrdtool 1.4.7 and tried to use it and found that it has the same problem on CentOS 5.</div><div><br></div><div><div>$ rrdtool dump testfile.rrd | head -40</div><div><?xml version="1.0" encoding="utf-8"?></div><div><!DOCTYPE rrd SYSTEM "<a href="http://oss.oetiker.ch/rrdtool/rrdtool.dtd">http://oss.oetiker.ch/rrdtool/rrdtool.dtd</a>"></div><div><!-- Round Robin Database Dump --><rrd><span class="Apple-tab-span" style="white-space:pre">        </span><version> 0003 </version></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><step> 15 </step> <!-- Seconds --></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><lastupdate> 1342133281 </lastupdate> <!-- 2012-07-12 15:48:01 PDT --></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><ds></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><name> ds0 </name></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><type> COUNTER </type></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><minimal_heartbeat> 45 </minimal_heartbeat></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><min> NaN </min></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><max> 1.0000000000e+04 </max></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><!-- PDP Status --></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><last_ds> 5585260819 </last_ds></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><value> 5.2688224977e+02 </value></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><unknown_sec> 0 </unknown_sec></div><div><span class="Apple-tab-span" style="white-space:pre">        </span></ds></div><div><br></div><div><!-- Round Robin Archives --><span class="Apple-tab-span" style="white-space:pre">        </span><rra></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><cf> AVERAGE </cf></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><pdp_per_row> 1 </pdp_per_row> <!-- 15 seconds --></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><params></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><xff> 5.0000000000e-01 </xff></div><div><span class="Apple-tab-span" style="white-space:pre">                </span></params></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><cdp_prep></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><ds></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><primary_value> 5.0500416920e+02 </primary_value></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><secondary_value> 5.0571394032e+02 </secondary_value></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><value> NaN </value></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><unknown_datapoints> 0 </unknown_datapoints></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></ds></div><div><span class="Apple-tab-span" style="white-space:pre">                </span></cdp_prep></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><database></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><!-- 2012-07-12 13:18:15 PDT / 1342124295 --> <row><v> 5.2835238201e+02 </v></row></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><!-- 2012-07-12 13:18:30 PDT / 1342124310 --> <row><v> 5.2950058206e+02 </v></row></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><!-- 2012-07-12 13:18:45 PDT / 1342124325 --> <row><v> 5.3706333105e+02 </v></row></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><!-- 2012-07-12 13:19:00 PDT / 1342124340 --> <row><v> 5.2656011537e+02 </v></row></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><!-- 2012-07-12 13:19:15 PDT / 1342124355 --> <row><v> 5.0348379147e+02 </v></row></div><div><br></div><div>$ rrdtool resize testfile.rrd 0 GROW 1416</div><div><br></div><div>$ rrdtool dump resize.rrd | head -40</div><div><?xml version="1.0" encoding="utf-8"?></div><div><!DOCTYPE rrd SYSTEM "<a href="http://oss.oetiker.ch/rrdtool/rrdtool.dtd">http://oss.oetiker.ch/rrdtool/rrdtool.dtd</a>"></div><div><!-- Round Robin Database Dump --><rrd><span class="Apple-tab-span" style="white-space:pre">        </span><version> 0003 </version></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><step> 15 </step> <!-- Seconds --></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><lastupdate> 4048795654275216693 </lastupdate> <!-- -547790155-01-11136 05:31:33 PST --></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><ds></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><name> ds0 </name></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><type> COUNTER </type></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><minimal_heartbeat> 45 </minimal_heartbeat></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><min> NaN </min></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><max> 1.0000000000e+04 </max></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><!-- PDP Status --></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><last_ds> </last_ds></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><value> 0.0000000000e+00 </value></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><unknown_sec> 0 </unknown_sec></div><div><span class="Apple-tab-span" style="white-space:pre">        </span></ds></div><div><br></div><div><!-- Round Robin Archives --><span class="Apple-tab-span" style="white-space:pre">        </span><rra></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><cf> AVERAGE </cf></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><pdp_per_row> 1 </pdp_per_row> <!-- 15 seconds --></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><params></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><xff> 5.0000000000e-01 </xff></div><div><span class="Apple-tab-span" style="white-space:pre">                </span></params></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><cdp_prep></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><ds></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><primary_value> 0.0000000000e+00 </primary_value></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><secondary_value> 0.0000000000e+00 </secondary_value></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><value> 0.0000000000e+00 </value></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><unknown_datapoints> 0 </unknown_datapoints></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span></ds></div><div><span class="Apple-tab-span" style="white-space:pre">                </span></cdp_prep></div><div><span class="Apple-tab-span" style="white-space:pre">                </span><database></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><!-- -547790155-01-11136 21:07:45 PST / 892845857 --> <row><v> NaN </v></row></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><!-- -547790155-01-11136 21:08:00 PST / 892845872 --> <row><v> NaN </v></row></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><!-- -547790155-01-11136 21:08:15 PST / 892845887 --> <row><v> NaN </v></row></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><!-- -547790155-01-11136 21:08:30 PST / 892845902 --> <row><v> NaN </v></row></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><!-- -547790155-01-11136 21:08:45 PST / 892845917 --> <row><v> NaN </v></row></div></div><div><br></div><div>Let's find the first value that was in the old file.</div><div><br></div><div><div>$ rrdtool dump tmp.0.resize.rrd | grep 5.28352</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span><!-- -547790155-01-11098 03:01:15 PST / 892867067 --> <row><v> 5.2835238201e+02 </v></row></div><div><br></div><div>Hm. That's a way bit different timestamp than this record</div><div><div><span class="Apple-tab-span" style="white-space: pre; ">                        </span><!-- 2012-07-12 13:18:15 PDT / 1342124295 --> <row><v> 5.2835238201e+02 </v></row></div></div><div><br></div><div><div apple-content-edited="true">
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 12px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">-- </font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 12px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Jo Rhett</font></div><span class="Apple-style-span" style="font-size: 12px; ">Net Consonance : </span><span class="Apple-style-span" style="font-size: 12px; ">net philanthropy to improve open source and internet projects.</span><br><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><span class="Apple-style-span" style="font-size: 12px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div></span></div></div></div></span><br class="Apple-interchange-newline">
</div>
<br></div></div></body></html>