[see the archives for the story so far...] On Thursday 11 December 2003 5:57 pm, Tom Emerson wrote:
On Thursday 11 December 2003 12:51 pm, James Oakley wrote:
ALWAYS TAKE THE ADVICE OF THE REISERFS TOOLS, UNLESS YOU ARE A REISERFS DEVELOPER!
[that is generally what I do, but read on]
Well, I have a bit of GOOD NEWS to report -- it turns out that tonight is/was the night of our monthly Linux user group meeting, so I took the box down to the meeting to get some "expert advice" -- after describing things, I got some suggestions and ACTUAL COMMANDS to use that have helped out tremendously You had asked if I made a backup before I started, and my comment was basically "I didn't have a free PARTITION to copy it to" -- it turns out I was still thinking "inside the box" -- as suggested at the meeting, it turns out that it WAS possible: dd if=/dev/md0 of=/snapshot/oldroot In other words, rather than copying "the partition" to "another partition", I'm copying a "partition" TO a "file". After much copying, "df" reported 30mb remaining on the "snapshot" device [JUST made it!] Then, to "work with" the newly copied file, this command turned out to be invaluable: losetup /dev/loop0 /snapshot/oldroot which, in effect, made the "copy of /dev/md0" available as "/dev/loop0" -- I could even run reiserfsck against /dev/loop0! Now, the next problem [which I didn't really elaborate on earlier]: now that I HAD created a superblock indicating that the blocksize was 1024, any attempt to run "rebuild-sb" again came up with a display showing what it detected for the superblock and asking if it was "ok" -- there didn't seem to be any way to "change" the 1024 value back to 4096! There is some semi-obscure wording in the messages from the reiserfsck output about "zeroing out" the data at offset 64k, but no indication as to "how much" data needed to be zeroed. While I had the rough idea that "dd" would be the tool to use for "zeroing out" the data "at 64k", I wasn't sure of the specifics -- a few reads through the output of "dd --help", however, pointed me in this direction: dd if=/dev/zero of=/dev/loop0 bs=1024 seek=64 count=1 [note that I'm working with the copy of the data...] Once this was done, "rebuild-sb" did indeed let me specify a 4096 byte blocksize. This time running "--rebuild-tree" produced a much more "sane" amount of output -- yes, I still lost some files, but only 140-ish out of who knows/remembers how many there were to begin with. I also gained some 340+ entries in the "lost +found" directory -- a spot-check of these files revealed them to be everything from "rc.config" to entire directories of .jpg photos. So, to recap, the GOOD NEWS is that all my partitions are "readable" again [and linux reboots, mostly...] the NOT SO good news is that I'll have to figure out what these files "used to be" by hand and move/rename them as appropriate -- Yet another Blog: http://osnut.homelinux.net