Skip to contentSkip to conversation

My mistake....

DISCUSSION Brian 3 participants 9 messages Jul 11, 2002

lore
Share & tools
lore

Brian

author
#0 lore raw

Hi:

Will try to make a long story short.

I had a 20 gig HD partitioned into 2 10 gig partitons both employing reiserfs - it was employed as a samba fileserver for a few Windows boxes. All the files were huge and written contiguously - not fragmented.

While doing a new install of Slackware 8.1 (stock Linux kernel 2.4.18) on the samba fileserver I accidently formatted over one of the partitions with ext3 (EXT3 2.4-0.9.17) - I didn't do surface integrity testing during the format.

After I discovered my error, a quick scan of the raw disk showed the files still resident although all the journals appeared overwritten.

I deleted the partition, rebooted and repartioned exactly as before. I have run reiserfsck and rebuilt everything BUT when I try to mount the partition "mount" insists it's still an empty ext3 filesystem.

How do I restore the reiserfs format without undoing all the rebuilding I have done? (60 directories and 2500 files)

The partition remains unmounted and unused but I would love to get those files back and also use of the partition.

The first partition and reiser filesystem (reiserfs version 3.6.25 with r5 hash) works perfectly.

Feel free to tell me what an idiot I am for making such a blunder as long as you can offer some constructive advice.

Any hints/help much appreciated.

Best regards,

Brian
BSFH

#1 lore raw

Hello!

Have you tried specifying explicit -t reiserfs parameter?

Bye,
Oleg

Quoted 39 lines · Brian

Hi:

Will try to make a long story short.

I had a 20 gig HD partitioned into 2 10 gig partitons both employing reiserfs - it was employed as a samba fileserver for a few Windows boxes. All the files were huge and written contiguously - not fragmented.

While doing a new install of Slackware 8.1 (stock Linux kernel 2.4.18) on the samba fileserver I accidently formatted over one of the partitions with ext3 (EXT3 2.4-0.9.17) - I didn't do surface integrity testing during the format.

After I discovered my error, a quick scan of the raw disk showed the files still resident although all the journals appeared overwritten.

I deleted the partition, rebooted and repartioned exactly as before. I have run reiserfsck and rebuilt everything BUT when I try to mount the partition "mount" insists it's still an empty ext3 filesystem.

How do I restore the reiserfs format without undoing all the rebuilding I have done? (60 directories and 2500 files)

The partition remains unmounted and unused but I would love to get those files back and also use of the partition.

The first partition and reiser filesystem (reiserfs version 3.6.25 with r5 hash) works perfectly.

Feel free to tell me what an idiot I am for making such a blunder as long as you can offer some constructive advice.

Any hints/help much appreciated.

Best regards,

Brian
BSFH

author
#2 lore raw

Hi Oleg:

Quoted 1 line

Have you tried specifying explicit -t reiserfs parameter?

Yes.

It reports the usual "mount" errors for wrong filesystem mount parameters.

'mount -t auto /dev/hdc2 /arch" always mounts as an ext3 filesysstem.

I guess I can remake /dev/hdc2 as a reiserfs but I fear I would loose the data completely and I do not have another partition large enough to save a 10gig raw dump of that partition.

Thanks,

Brian
BSFH

#3 lore raw

Hello!

Quoted 3 lines · Brian
Quoted 1 line

Have you tried specifying explicit -t reiserfs parameter?

Yes.
It reports the usual "mount" errors for wrong filesystem mount parameters.

Hm.

Quoted 1 line

'mount -t auto /dev/hdc2 /arch" always mounts as an ext3 filesysstem.

Ok, so you run reiserfsck (with what options?) and it told you what? So that you decided everything was restored.
Have you rebooted after ratitioning scheme change?

Bye,
Oleg

author
#4 lore raw

Hey:

Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

Have you tried specifying explicit -t reiserfs
parameter?

Yes.

Quoted 8 lines
Quoted 2 lines

It reports the usual "mount" errors for wrong filesystem mount parameters.

Hm.

Quoted 1 line

'mount -t auto /dev/hdc2 /arch" always mounts as an ext3 filesysstem.

Ok, so you run reiserfsck (with what options?) and it told you what?

First did --rebuild-sb then --rebuild-tree with -S and --no-journal-available

Here is resiserfsck /dev/hdc2 messages:

Replaying journal..
No transactions found
Checking S+tree..ok
Comparing bitmaps..ok
Checking Semantic tree...
ok
No corruptions found
There are on the filesystem:
Leaves 1443
Internal nodes 11
Directories 60
Other files 2502
Data block pointers 1227092 (zero of them 50825) Safe links 0
###########
reiserfsck finished at Thu Jul 11 06:32:23 2002
###########

I don't exactly know what all that means but it looks encouraging.

Quoted 1 line

So that you decided everything was restored.

Well - hoping perhaps.

Quoted 1 line

Have you rebooted after ratitioning scheme change?

Yup.

Appreciate the feedback - Thanks.

Brian
BSFH

#5 lore raw

Hello!

Quoted 1 line · Brian

First did --rebuild-sb then --rebuild-tree with -S

--rebuild-sb asked you a question, what was your answer?

Bye,
Oleg

author
#6 lore raw

Hey Oleg:

Quoted 3 lines · Brian
Quoted 1 line

First did --rebuild-sb then --rebuild-tree with -S

--rebuild-sb asked you a question, what was your answer?

Ah, do you mean about the size of the partition?

All I remember was taking the default numbers. I couldn't make any sense out of the "size" question at all.

Wish I could remember more but was over the weekend when I tried to bring it bacck.

Any ideas?

Brian
BSFH

#7 lore raw

Hello!

Quoted 3 lines · Brian
Quoted 2 lines
Quoted 1 line

First did --rebuild-sb then --rebuild-tree with -S

--rebuild-sb asked you a question, what was your answer?

Ah, do you mean about the size of the partition?

No, it was asking you about the superblock version. And if you have answered incorrectly, this is bad. Also what mount /dev/yourdevice /mnt -t reiserfs produces in kernel logs?

Bye,
Oleg

#8 lore raw
In reply to Brian
Quoted 3 lines · Brian

I deleted the partition, rebooted and repartioned exactly as before. I have run reiserfsck and rebuilt everything BUT when I try to mount the partition "mount" insists it's still an empty ext3 filesystem.

To overwrite the ext2/ext3 superblock:
dd if=/dev/zero of=/dev/<whatever> bs=1k count=1 seek=1

Cheers, Andreas
--
Andreas Dilger
http://www-mddsp.enel.ucalgary.ca/People/adilger/
http://sourceforge.net/projects/ext2resize/