Hard Drive Woes and chkdsk Utility?
I had a disk failure on /dev/hda this morning. The messages are: Jan 25 09:10:41 carcass kernel: hda1: bad access: block=16, count=2 Jan 25 09:10:41 carcass kernel: end_request: I/O error, dev 03:01 (hda), sector 16 Jan 25 09:10:41 carcass kernel: hda1: bad access: block=128, count=2 Jan 25 09:10:41 carcass kernel: end_request: I/O error, dev 03:01 (hda), sector 128 What happened is that the power went off here suddenly when a circuit breaker blew. I rebooted the machine to find these messages and the possibility of a lot of data lost. I noticed Suse didn't perform a check disk during boot. Redhat used to do this whenever the volume wasn't unmounted cleanly. I wanted to run chkdsk on the device to see if it would clean things up for me, but I can't find chkdsk anywhere. Is there another utility that I can run to scan the disk for errors and possibly diagnose and/or rectify this issue? Any help is appreciated. Thanks. Jason
* Jason Jonas - Sapien
I had a disk failure on /dev/hda this morning. The messages are:
Jan 25 09:10:41 carcass kernel: hda1: bad access: block=16, count=2 Jan 25 09:10:41 carcass kernel: end_request: I/O error, dev 03:01 (hda), sector 16 Jan 25 09:10:41 carcass kernel: hda1: bad access: block=128, count=2 Jan 25 09:10:41 carcass kernel: end_request: I/O error, dev 03:01 (hda), sector 128
What happened is that the power went off here suddenly when a circuit breaker blew. I rebooted the machine to find these messages and the possibility of a lot of data lost. I noticed Suse didn't perform a check disk during boot. Redhat used to do this whenever the volume wasn't unmounted cleanly.
I wanted to run chkdsk on the device to see if it would clean things up for me, but I can't find chkdsk anywhere. Is there another utility that I can run to scan the disk for errors and possibly diagnose and/or rectify this issue?
Chkdsk is a dos/windoz utility. Linux utilizes fsck to repair the disk structure on boot or by cl initiation. You want: man fsck -- Patrick Shanahan http://wahoo.no-ip.org Registered Linux User #207535 icq#173753138 @ http://counter.li.org
Thanks for the help, Patrick. It's been a long time since I've had to
do anything like this. I reckon I've a little winbloze on my mind. I
ran the following command:
carcass:~ # fsck -V -t reiserfs /dev/hda
fsck 1.28 (31-Aug-2002)
[/sbin/fsck.reiserfs (1) -- /dev/hda] fsck.reiserfs /dev/hda
reiserfsck 3.6.2 (2002)
Will read-only check consistency of the filesystem on /dev/hda
Will put log info to 'stdout'
Do you want to run this program?[N/Yes] (note need to type Yes):Yes
###########
reiserfsck --check started at Sat Jan 25 11:46:09 2003
###########
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 10454
Internal nodes 67
Directories 1410
Other files 122066
Data block pointers 4585696 (0 of them are zero)
Safe links 0
###########
reiserfsck finished at Sat Jan 25 11:46:52 2003
###########
carcass:~ #
That looked cool, but still could not mount the filesystem in yast2.
So I tried:
carcass:~ # fsck -V -t reiserfs /dev/hda -a
fsck 1.28 (31-Aug-2002)
[/sbin/fsck.reiserfs (1) -- /dev/hda] fsck.reiserfs -a /dev/hda
Reiserfs super block in block 16 on 0x300 of format 3.6 with standard
journal
Blocks (total/free): 20007712/15402674 by 4096 bytes
Filesystem is clean
carcass:~ #
It says the filesystem is clean, but I'm still unable to mount
/dev/hda. Here's the /etc/fstab entry:
/dev/hda1 /space reiserfs defaults 0 0
Here's what I get when mounting:
carcass:~ # mount /space
mount: wrong fs type, bad option, bad superblock on /dev/hda1,
or too many mounted file systems
(could this be the IDE device where you in fact use
ide-scsi so that sr0 or sda or so is needed?)
carcass:~ #
Any help is appreciated. Thanks.
Jason
-----Original Message-----
From: Patrick Shanahan [mailto:WideGlide@MyRealBox.com]
Sent: Saturday, January 25, 2003 4:51 PM
To: suse-linux-e@suse.com
Subject: Re: [SLE] Hard Drive Woes and chkdsk Utility?
* Jason Jonas - Sapien
I had a disk failure on /dev/hda this morning. The messages are:
Jan 25 09:10:41 carcass kernel: hda1: bad access: block=16, count=2 Jan 25 09:10:41 carcass kernel: end_request: I/O error, dev 03:01 (hda), sector 16 Jan 25 09:10:41 carcass kernel: hda1: bad access: block=128, count=2 Jan 25 09:10:41 carcass kernel: end_request: I/O error, dev 03:01 (hda), sector 128
What happened is that the power went off here suddenly when a circuit breaker blew. I rebooted the machine to find these messages and the possibility of a lot of data lost. I noticed Suse didn't perform a check disk during boot. Redhat used to do this whenever the volume wasn't unmounted cleanly.
I wanted to run chkdsk on the device to see if it would clean things up for me, but I can't find chkdsk anywhere. Is there another utility that I can run to scan the disk for errors and possibly diagnose and/or rectify this issue?
Chkdsk is a dos/windoz utility. Linux utilizes fsck to repair the disk structure on boot or by cl initiation. You want: man fsck -- Patrick Shanahan http://wahoo.no-ip.org Registered Linux User #207535 icq#173753138 @ http://counter.li.org -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
"Jason Jonas - Sapien"
carcass:~ # fsck -V -t reiserfs /dev/hda fsck 1.28 (31-Aug-2002) [/sbin/fsck.reiserfs (1) -- /dev/hda] fsck.reiserfs /dev/hda reiserfsck 3.6.2 (2002) Will read-only check consistency of the filesystem on /dev/hda Will put log info to 'stdout' ... That looked cool, but still could not mount the filesystem in yast2. ... /dev/hda1 /space reiserfs defaults 0 0
There is a discrepancy in device names. You mount /dev/hda1 but check /dev/hda. I'm not surprised it doesn't work. Anyway, the sixth field in the fstab entry should be 2 in your case, see "man fstab", e.g.: /dev/hda1 /space reiserfs defaults 1 2 -- Alexandr.Malusek@imv.liu.se
Thanks, Alexandr.
Running fsck on hda1 yields:
carcass:~ # fsck -V -t reiserfs /dev/hda1 -a
fsck 1.28 (31-Aug-2002)
[/sbin/fsck.reiserfs (1) -- /space] fsck.reiserfs -a /dev/hda1
bread: Cannot read a block # 2.
Warning... fsck.reiserfs for device /dev/hda1 exited with signal 6.
fsck.reiserfs /dev/hda1 failed (status 0x8). Run manually!
carcass:~ #
Any ideas? Am I hosed? Thanks.
Jason
-----Original Message-----
From: malusek@photon.imv.liu.se [mailto:malusek@photon.imv.liu.se]On
Behalf Of Alexandr Malusek
Sent: Saturday, January 25, 2003 6:17 PM
To: suse-linux-e@suse.com
Subject: Re: [SLE] Hard Drive Woes and chkdsk Utility?
"Jason Jonas - Sapien"
carcass:~ # fsck -V -t reiserfs /dev/hda fsck 1.28 (31-Aug-2002) [/sbin/fsck.reiserfs (1) -- /dev/hda] fsck.reiserfs /dev/hda reiserfsck 3.6.2 (2002) Will read-only check consistency of the filesystem on /dev/hda Will put log info to 'stdout' ... That looked cool, but still could not mount the filesystem in yast2. ... /dev/hda1 /space reiserfs defaults 0 0
There is a discrepancy in device names. You mount /dev/hda1 but check /dev/hda. I'm not surprised it doesn't work. Anyway, the sixth field in the fstab entry should be 2 in your case, see "man fstab", e.g.: /dev/hda1 /space reiserfs defaults 1 2 -- Alexandr.Malusek@imv.liu.se -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
* Jason Jonas - Sapien
Running fsck on hda1 yields:
carcass:~ # fsck -V -t reiserfs /dev/hda1 -a fsck 1.28 (31-Aug-2002) [/sbin/fsck.reiserfs (1) -- /space] fsck.reiserfs -a /dev/hda1
bread: Cannot read a block # 2.
Warning... fsck.reiserfs for device /dev/hda1 exited with signal 6. fsck.reiserfs /dev/hda1 failed (status 0x8). Run manually! carcass:~ #
fsck.reiserfs -y /dev/hda1 -y will answer yes to all questions or if you have many errors, you will be very busy answering yes to all the questions. Please trim irrelevant text and avoid TOFU when posting. tks & good luck, -- Patrick Shanahan http://wahoo.no-ip.org Registered Linux User #207535 icq#173753138 @ http://counter.li.org
Thanks, Patrick. Still no dice running this command. Get the following error: bread: Cannot read a block # 2. Not sure if the disk is hosed or if any hope remains. Jason -----Original Message----- From: Patrick Shanahan [mailto:WideGlide@MyRealBox.com] Sent: Saturday, January 25, 2003 6:59 PM To: suse-linux-e@suse.com Subject: Re: [SLE] Hard Drive Woes and chkdsk Utility? fsck.reiserfs -y /dev/hda1
"Jason Jonas - Sapien"
fsck.reiserfs -y /dev/hda1
Thanks, Patrick. Still no dice running this command. Get the following error:
bread: Cannot read a block # 2.
The partition table or other structures may be damaged since you ran fsck on /dev/hda. Try: # mkdir /broken # mount -t reiserfs -o ro /dev/hda /broken If it works then backup the content of the disk, repartition it, and restore its content. If you don't want to experiment then you can ask developers of ReiserFS for help on http://www.namesys.com/. They will charge you $25. There is no magic in your problem: 1. The sixth entry in your /etc/fstab was 0 and therefore the OS didn't perform fsck. 2. You performed fsck on /dev/hda manually and it damaged the structure of /dev/hda1 -- Alexandr.Malusek@imv.liu.se
participants (3)
-
Alexandr Malusek
-
Jason Jonas - Sapien
-
Patrick Shanahan