<?xml version="1.0"?>
<rss version="2.0">
  <channel><title>reiserfsck --rebuild-tree and when backup saves your life</title><link>http://bertrand.gotpike.org//space/start/2006-07-06/1</link><description>After a powerfailure on my main file server, reiserfsck said some errors was found on a reiserfs partition, and &lt;b class="bold"&gt;reiserfsck --rebuild-tree&lt;/b&gt; was required.&lt;p class="paragraph"/&gt;
Off course, RAID 1 doesn't help in this case.&lt;p class="paragraph"/&gt;
The reiserfsck man page says you'd better backup your data before proceeding with &lt;b class="bold"&gt;--rebuild-tree&lt;/b&gt;.&lt;p class="paragraph"/&gt;
__Believe them__.&lt;p class="paragraph"/&gt;
Following this advice, i hopefully made a last backup before proceeding. The reiserfs partition was perfectly readable, except some files.&lt;p class="paragraph"/&gt;
Crawling the web, i learned on multiple sites that until &lt;b class="bold"&gt;reiserfsck --rebuild-tree&lt;/b&gt; hasn't finished it's job, the partition was unusable at all.&lt;p class="paragraph"/&gt;
This operation really takes a long time. Don't estimate the time remaining on the number on remaining blocks and the blocks/seconds. Mine was stuck for many hours on pass #2, eating as much as CPU as possible.&lt;p class="paragraph"/&gt;
Waiting for more than 12 hours for repairing a 200GB partition was fruitless: it ended up saying there were not enough space left on the drive. Not only the drive had a powerfailure while writing data, but some people here were uploading lots of data and there were very little space left (around 5MB). That's something like Murphy's law.&lt;p class="paragraph"/&gt;
The backup was put in place, i strongly believed the original reiserfs partition were lost forever. I better understand now the amount of blocks reserved for root on ext2/ext3 filesystems. I think i'll have a look if this kind of option is available on reiser, too.&lt;p class="paragraph"/&gt;
I relaunched the check, mostly for educational purpose. Noone were complaining about lack of data nor data corruption on the backup.&lt;p class="paragraph"/&gt;
It runned all the night, and on the next morning the drive was &lt;b class="bold"&gt;totally fixed&lt;/b&gt;.&lt;p class="paragraph"/&gt;
OK, &lt;b class="bold"&gt;reiserfsck --rebuild-tree&lt;/b&gt; did it's job. Thanx to all reiserfs crew.&#xD;
It didn't ate data, but it took almost 24 hours to do that, an amount of time i couldn't make my users wait for.&lt;p class="paragraph"/&gt;
I discovered i'm now too old to live with the fsck adrenalin :) I hereby promise to make stronger backups now.&lt;p class="paragraph"/&gt;
Better spend some minutes a day backuping and making sure it's backuped than loose many hours of your life and hours/weeks/month/years of others people work on a power/hard drive failure.&#xD;
</description><generator>Fins 0.9.7</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs></channel>
</rss>
