Re: Help!! Drive Error!!!

 
SOLVED
Go to solution
K.C. Chan
Trusted Contributor

Help!! Drive Error!!!

Help, I have a drive error, But I don't know which device is it.
how do you map 08:c1 to /dev/sd?? ? See attachment for details on the error. Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
9 REPLIES 9
Christoph Rothe_3
Frequent Advisor

Re: Help!! Drive Error!!!

Michael,

I do not know how to map xx:yy to a /dev/x file...

Bit probably you did not see the following line:

SCSI disk error : host 2 channel 0 id 2 lun 0 return code = 8000002

Isn't that information enough ?
The Disc is that one on host two with id 2.

HTH,

Christoph
D. Jackson_1
Honored Contributor

Re: Help!! Drive Error!!!

It sounds to me like it would be /dev/sdc1 ...

Good luck
K.C. Chan
Trusted Contributor

Re: Help!! Drive Error!!!

after looking around, I know what drive it is "/dev/sdm1" and I know that it's on host2 with id 2 which mean second drive on the second scsi-card. But is there a clear way of finding out how it maps to /dev/sdm1 drive?

On another note, does any one know what type of error it is? Should I worry about the disk going south on me? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
Eric Ladner
Trusted Contributor
Solution

Re: Help!! Drive Error!!!

Yes.. quite easy to map, actually. Those are the major and minor device numbers.

First convert 08:c1 to decimal -> 8, 193

Then look through /dev for a device with those numbers:

ls -l /dev/* | grep ' 8, *193'

Which returs /dev/sdm1
Marco Paganini
Respected Contributor

Re: Help!! Drive Error!!!

Also

1) Make sure the badblocks did not corrupt anything. To that, take the sector number (as reported in syslog) and divide by 8. This will give you the "Ext2/3" block number. Check that block number with:

debugfs /dev/yourblockdevice
debugfs: testb your_block_num

(where your_block_num = block number as reported by syslog / 8).

If you have the block marked as "in use", it's time to check who's using it with:

debugfs /dev/yourblockdevice
debugfs: icheck your_block_num

After that, run badblocks -b 4096 to find the bad blocks. Save those to a file and then use fsck -l to lock those out.

Hope it helps
Paga
Keeping alive, until I die.
K.C. Chan
Trusted Contributor

Re: Help!! Drive Error!!!

Marco, I've unmounted the filesystem and ran fsck on it. I t seems to fix the problem. But for future references I would like to try what you have suggested, but I am not sure whether to run it while the filesystem is mounted or not. Is it ok to run debugfs while the file system is mounted?

on another note, what's up with the "printing instruction link" everytime I click on it, it gives: "support1.itrc.hp.com" could not be found. please check the link again". I would like to have good print out of this posting w/o the any other banners. Can any one tell me how to print just the posting? Thaanks.
Reputation of a thousand years can be determined by the conduct of an hour
Marco Paganini
Respected Contributor

Re: Help!! Drive Error!!!

Hello Michael,

You should unmount the filesystems before you perform these operations.

I also took a look at your errors and I'd like to add that it really seems related to hardware. A simple FSCK will *NOT* fix the problem for you. It will happens everytime you have a file or something using that area. Be aware. I'd check those blocks with badblocks and lock them out so the OS won't use them in the future.

About the printing: Unfortunately, I don't know. I have a lot of problems using the forums. I'd do a "save page to disk" and then print it if everything fails.

Cheers,
Paga
Keeping alive, until I die.
K.C. Chan
Trusted Contributor

Re: Help!! Drive Error!!!

Marco, I've was just reading over your rplies regarding debugfs, why do you divide by 8 to get the block number, isn't this reported already in the syslog file. Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
K.C. Chan
Trusted Contributor

Re: Help!! Drive Error!!!

I've got an error on this disk again: here's the error:

Jun 27 10:59:17 trance kernel: Additional sense indicates Unrecovered read error
Jun 27 10:59:17 trance kernel: I/O error: dev 08:c1, sector 45814462


I am trying to follow your instructions on howto to locate the bad-block. But I am uncertain about the how to get the block number by dividing by 8. Where does 8 come from? Is 8 the block-size of the filesystem by default? In either case, I tried dividing the sector by 8 and here's what I got from debugfs:

debugfs 1.23, 15-Aug-2001 for EXT2 FS 0.5b, 95/08/09
debugfs: icheck 5726807
icheck: Attempt to read block from filesystem resulted in short read while calling ext2_block_iterate
Block Inode number
5726807

debugfs: icheck 45814462
icheck: Attempt to read block from filesystem resulted in short read while calling ext2_block_iterate


Can someone help? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour