Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ahh major disk problems with Reiser4
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
silentbob
Apprentice
Apprentice


Joined: 09 Nov 2003
Posts: 159
Location: UK

PostPosted: Fri Dec 24, 2004 12:11 pm    Post subject: Ahh major disk problems with Reiser4 Reply with quote

In my PC I have 2 x 160GB hard disks, both running Reiser4 fs and yesterday one of them seems to have decided to die, taking with it all of my stuff! I have a backup of the entire system on an external 250GB disk from soemtime last week so I shouldn't have lost too much, thank god.

I think I'm going to take the oppurtunity to give another distro a shot, most likely Debian or maybe Ubuntu. The reason? I'm fed up with the long compile times and the constant upgrade, break cycle. Sadly I will miss the portage system, but after running Debian stable on a server I have fount apt-get to be just as simple to use. I did an "emerge -uD world" last week but didn't update the config files afterwards. Last night after emerging xfce4 to give it a shot I had to do an etc-update since the new xfce4 wasn't showing up in kdm when I logged in. I had 75 config files that needed to be updated, so I went through and for any files I had changed kept the original, for all the others I simply accepted the new config file. That seemed to work OK so I thought I'd reboot just to make sure the system was fine. Whilst booting up it had a problem accessing /dev/hdc1 the second hard disk, Reiser4 partition. Damn.

I've tried fscking the disk using the Reiser4 enabled LiveCD but it failed to rebuild the filesystem. The /dev/hdc1 partition doesn't even show up with an "fdisk /dev/hdc". At the moment I'm running a full disk scan using a bootable CD from Seagate (called SeaTools) and it has found a very long list of bad sectors on the disk :-( Now could it simply be bad timing that the hard disk failed on me? The system has been up and running for a few months now without problem, but I have recently noticed that it didn't quite feel as responsive as in the past. I'm thinking that the 2 disks in a very confined space (Shuttle PC) means that they have been running too hot and caused themselves damage. Or maybe I should put it down to experience and not choose to run a brand new filesystem before it has had enough time to iron out any bugs. Is it OK to continue to use a disk with bad sectors, or should I stick it in the bin?
_________________
My Gentoo Linux Stuff | Get FireFox
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54317
Location: 56N 3W

PostPosted: Fri Dec 24, 2004 1:37 pm    Post subject: Reply with quote

silentbob,

Bad sectors should be invisible to the filesystem. There are spare sectors and even whole tracks allocated when the drive is manufactured. These spares are mapped in 'on the fly', so the OS never sees a bad sector. The drive normally dies before they are all used.
If these are really bad sectors due to hardware, then the disc has died and Rieser4 was not involved. If the data has been trashed so that you get CRC errors, then the data is gone for good but the disk may be OK, so that if teh sector is rewritten properly, it will be good again. The filesystem may well have had a hand in such data trashing.
SeaTools may well be showing you all the bad sectors, including the ones that there present when the drive was new (but mapped out).
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Fri Dec 24, 2004 1:54 pm    Post subject: Reply with quote

have you tried dd_rescue?
_________________
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Back to top
View user's profile Send private message
silentbob
Apprentice
Apprentice


Joined: 09 Nov 2003
Posts: 159
Location: UK

PostPosted: Fri Dec 24, 2004 1:59 pm    Post subject: Reply with quote

Putting aside the bad sectors (thanks for the explanation NeddySeagoon), is there any hope of rescuing the data? It seems very strange that the partition doesn't even appear when I fdisk. I have tried the following and they usually error, or cause a seg fault:
Code:
fsck.reiser4 /dev/hdc1
fsck.reiser4 -f /dev/hdc
fsck.reiser4 --build-sb /dev/hdc
fsck.reiser4 --build-fs /dev/hdc

Any other commands that are worth trying (note I have been running the above commands from the Reiser4 enabled LiveCD, but when my Gentoo system was running portage upgraded to a new version of reiser4progs, would this cause any problems)?
_________________
My Gentoo Linux Stuff | Get FireFox
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54317
Location: 56N 3W

PostPosted: Fri Dec 24, 2004 2:43 pm    Post subject: Reply with quote

silentbob,

Before you damage the data further, make a copy with dd (if you can).
Code:
dd if=/dev/hdc1 of=/path/to/output/
you can then mount the output file like a real partition with the -o loop option to mount. You need loop filesystem support in you kernel.

Run
Code:
 fdisk /dev/hdc
does partition 1 still exist or is your partition table trashed too?
Only look, do not make any changes.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
silentbob
Apprentice
Apprentice


Joined: 09 Nov 2003
Posts: 159
Location: UK

PostPosted: Fri Dec 24, 2004 2:49 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Before you damage the data further, make a copy with dd (if you can).
Code:
dd if=/dev/hdc1 of=/path/to/output/
you can then mount the output file like a real partition with the -o loop option to mount. You need loop filesystem support in you kernel.

Nice idea, but I'm a little stuck for space - the 160Gb disk was 90% full!
NeddySeagoon wrote:
Code:
 fdisk /dev/hdc
does partition 1 still exist or is your partition table trashed too?

Yeah, I've checked that according to fdisk there are no partitions on the disk :-(
_________________
My Gentoo Linux Stuff | Get FireFox
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54317
Location: 56N 3W

PostPosted: Fri Dec 24, 2004 3:10 pm    Post subject: Reply with quote

silentbob,

You won't get anything back until the partiion table gets fixed. Something has flattened your partition table. Fixing that may make all your data reappear unmolested.

Do you have a note of exactly how the disk was partitioned.?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
silentbob
Apprentice
Apprentice


Joined: 09 Nov 2003
Posts: 159
Location: UK

PostPosted: Fri Dec 24, 2004 3:19 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Do you have a note of exactly how the disk was partitioned.?

It was really basic, a single partition for the entire disk.

(Thanks for you help btw!)
_________________
My Gentoo Linux Stuff | Get FireFox
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54317
Location: 56N 3W

PostPosted: Fri Dec 24, 2004 3:33 pm    Post subject: Reply with quote

silentbob,

You lucks in then. Its easy to repartion it the same way.
Before you do that though save whats there now with
Code:
dd if=/dev/hdc of=/hdc_MBR count=1 bs=512

That will read the MBR from /dev/hdc and put it in a file called /hdc_MBR.

Now using fdisk, remake the hdc1 partition as it was. Do not make a filesystem, it should still be there waiting to be discovered.
When you mount it use -o ro, so that its read only to start with.
If it looks good, you can allow write access later.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
silentbob
Apprentice
Apprentice


Joined: 09 Nov 2003
Posts: 159
Location: UK

PostPosted: Fri Dec 24, 2004 3:56 pm    Post subject: Reply with quote

Cheers for the advice. I've removed the disk to prevent further damage so I'll need to reconnect it and give that a shot, fingers crossed :-)
_________________
My Gentoo Linux Stuff | Get FireFox
Back to top
View user's profile Send private message
aminalshmu
Tux's lil' helper
Tux's lil' helper


Joined: 13 Sep 2004
Posts: 78
Location: TX, USA

PostPosted: Fri Dec 24, 2004 7:16 pm    Post subject: Reply with quote

this same exact thing happened to me after updating and rebooting about two weeks ago, or whenever the newest reiser4progs and libaal (1.0.3) were released. my disk's partition table was eaten for some reason, and now that i've finally got the two partitions straightened out it complains on boot:

Checking root filesystem:
fsck.reiser4: error while loading shared libraries: libreiser4-1.0.so.2: cannot open shared object file: no such file or directory

Filesystem couldn't be fixed :o(

there's nothing WRONG with the filesystem, i can boot from the liveCD and fsck.reiser4 says it's fine. i tried re-emerging the older versions of libaal and reiser4progs but no luck. is this some sort of bootscript issue?
Back to top
View user's profile Send private message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Sat Dec 25, 2004 4:14 pm    Post subject: Reply with quote

its cos reiser4progs is linked against the old reiser4 libs. When you update reiser4 to 1.0.3, you've got to emerge it twice to get the linked libraries correct
_________________
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Back to top
View user's profile Send private message
silentbob
Apprentice
Apprentice


Joined: 09 Nov 2003
Posts: 159
Location: UK

PostPosted: Sat Dec 25, 2004 5:53 pm    Post subject: Reply with quote

I've re-partioned the disk, but I'm still experiencing difficulties with accessing the filesystem.
Code:
# fsck.reiser4 /dev/hdc1
*******************************************************************
This is an EXPERIMENTAL version of fsck.reiser4. Read README first.
*******************************************************************

Fscking the /dev/hdc1 block device.
Will check the consistency of the Reiser4 SuperBlock.
Will check the consistency of the Reiser4 FileSystem.
Continue?
(Yes/No): Yes
***** fsck.reiser4 started at Sat Dec 25 17:50:55 2004
Fatal: Wrong magic found in the master super block.
Fatal: Failed to open the reiser4 backup.
Fatal: Cannot open the FileSystem on (/dev/hdc1).

1 fatal corruptions were detected in SuperBlock. Run with --build-sb option to fix them.


# fsck.reiser4 --build-sb /dev/hdc1
*******************************************************************
This is an EXPERIMENTAL version of fsck.reiser4. Read README first.
*******************************************************************

Fscking the /dev/hdc1 block device.
Will build the Reiser4 SuperBlock.
Will check the consistency of the Reiser4 FileSystem.
Continue?
(Yes/No): Yes
***** fsck.reiser4 started at Sat Dec 25 17:51:03 2004
Fatal: Wrong magic found in the master super block.
Master super block cannot be found on (/dev/hdc1). Do you want to
build a new one?
(Yes/No): Yes
Which block size do you use? [4096]:
Warn : A new master superblock is created on '/dev/hdc1'.
Fatal: Can't open disk-format format40.
Enter the key plugin name [key_large]:
Enter the correct block count please [40019915]:
Warn : The format 'format40' is created on '/dev/hdc1'.
Error: Can't read bitmap block 98208. Input/output error.
Error: Can't load ondisk bitmap.
Error: Can't initialize block allocator.
Fatal: Failed to open the block allocator.

Operational error occured while fscking.


# fsck.reiser4 --build-sb /dev/hdc
*******************************************************************
This is an EXPERIMENTAL version of fsck.reiser4. Read README first.
*******************************************************************

Fscking the /dev/hdc block device.
Will build the Reiser4 SuperBlock.
Will check the consistency of the Reiser4 FileSystem.
Continue?
(Yes/No): Yes
***** fsck.reiser4 started at Sat Dec 25 17:53:03 2004
Fatal: Wrong magic found in the master super block.
FSCK: Master super block cannot be found on '/dev/hdc'.
Warn : A new master superblock is regenerated from backup on
'/dev/hdc'.
Fatal: Can't open disk-format format40.
Warn : The format 'format40' is regenerated from backup on
'/dev/hdc'.
Error: Wrong magic is found in the filesystem status block.
Warn : Creating a new status block.
Error: Can't read bitmap block 65472. Input/output error.
Error: Can't load ondisk bitmap.
Error: Can't initialize block allocator.
Fatal: Failed to open the block allocator.

Operational error occured while fscking.

_________________
My Gentoo Linux Stuff | Get FireFox
Back to top
View user's profile Send private message
DaNIsH
Apprentice
Apprentice


Joined: 01 Jan 2003
Posts: 197
Location: Melbourne, Australia.

PostPosted: Sun Dec 26, 2004 6:47 am    Post subject: Reply with quote

I've also hit problems with Reiser4 recentely, none partition table related though.
I seem to be getting alot of corruption occuring.
Maybe it's reiser4progs 1.0.3 ? I was using the reiser4-for-2.6.9-3.gz patch at the time the corruption was occuring as well, in case that sounds familiar.

Strangely enough the partition suffering the most is also at 90% usage..
_________________
Adopt an unanswered post today
Back to top
View user's profile Send private message
silentbob
Apprentice
Apprentice


Joined: 09 Nov 2003
Posts: 159
Location: UK

PostPosted: Thu Dec 30, 2004 2:16 pm    Post subject: Reply with quote

I've abandoned all hope of retrieving the data from the disk and I have now gone for a clean Debian install instead of Gentoo. From first impressions it appears just as quick, possibly even a bit faster, and the install was much quicker. I might write up the experience and post it here to the Gentoo forums after I've got a bit more familiar with how the to distros compare.
_________________
My Gentoo Linux Stuff | Get FireFox
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum