FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 01-17-2011, 05:59 PM
"Stefan G. Weichinger"
 
Default disk error, where?

Would someone help me out on this issue?

I have a flaky disk in a server, and dmesg says:

end_request: I/O error, dev sdb, sector 1835240116

Now i have this layout:

# fdisk -l /dev/sdb

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 1 13 104391 fd Linux raid
autodetect
/dev/sdb2 14 50 297202+ 82 Linux swap / Solaris
/dev/sdb3 51 2483 19543072+ fd Linux raid
autodetect
/dev/sdb4 2484 121601 956815335 5 Extended
/dev/sdb5 2484 106917 838866073+ 8e Linux LVM
/dev/sdb6 106918 121601 117949198+ fd Linux raid
autodetect


My question (apart from the fact that I evacuate all on that
non-raid-LVM-partition right now!):

In which partition is that "sector 1835240116" ?

Sorry for this maybe stupid question ...

Thanks, Stefan
 
Old 01-17-2011, 06:15 PM
 
Default disk error, where?

Stefan G. Weichinger <lists@xunil.at> [11-01-17 20:04]:
>
> Would someone help me out on this issue?
>
> I have a flaky disk in a server, and dmesg says:
>
> end_request: I/O error, dev sdb, sector 1835240116
>
> Now i have this layout:
>
> # fdisk -l /dev/sdb
>
> Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
> 255 heads, 63 sectors/track, 121601 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x00000000
>
> Device Boot Start End Blocks Id System
> /dev/sdb1 1 13 104391 fd Linux raid
> autodetect
> /dev/sdb2 14 50 297202+ 82 Linux swap / Solaris
> /dev/sdb3 51 2483 19543072+ fd Linux raid
> autodetect
> /dev/sdb4 2484 121601 956815335 5 Extended
> /dev/sdb5 2484 106917 838866073+ 8e Linux LVM
> /dev/sdb6 106918 121601 117949198+ fd Linux raid
> autodetect
>
>
> My question (apart from the fact that I evacuate all on that
> non-raid-LVM-partition right now!):
>
> In which partition is that "sector 1835240116" ?
>
> Sorry for this maybe stupid question ...
>
> Thanks, Stefan
>

Hi Stefan,

small shot into the deep dark.... :



As far as I know, you can switch fdisk to display either to
diplay units in cylinders or in sectors.


Usage:
fdisk [options] <disk> change partition table
fdisk [options] -l <disk> list partition table(s)
fdisk -s <partition> give partition size(s) in blocks

Options:
-b <size> sector size (512, 1024, 2048 or 4096)
-c[=<mode>] compatible mode: 'dos' or 'nondos' (default)
-h print this help text
-u[=<unit>] display units: 'cylinders' or 'sectors' (default)
-v print program version
-C <number> specify the number of cylinders
-H <number> specify the number of heads
-S <number> specify the number of sectors per track


When switched to display sector units it is only a matter of counting
to find the partition in question I would guess...

Good luck!

Best regards,
mcc
 
Old 01-17-2011, 06:38 PM
"Stefan G. Weichinger"
 
Default disk error, where?

Am 17.01.2011 20:15, schrieb meino.cramer@gmx.de:
> When switched to display sector units it is only a matter of counting
> to find the partition in question I would guess...

Errm, yes, I thought of this as well, as always *after* posting to the ML.


# fdisk -l -u /dev/sdb

[..]

/dev/sdb4 39889395 1953520064 956815335 5 Extended
/dev/sdb5 39889458 1717621604 838866073+ 8e Linux LVM
/dev/sdb6 1717621668 1953520064 117949198+ fd Linux raid
autodetect

So sector 1835240116 should be part of sdb6, right?

So my hopes are high to be able to cp all the sdb5-content while the hdd
is still alive (yes, I have backups, but not up to the latest ...)

Thanks, Stefan
 
Old 01-17-2011, 06:56 PM
 
Default disk error, where?

Stefan G. Weichinger <lists@xunil.at> [11-01-17 20:44]:
> Am 17.01.2011 20:15, schrieb meino.cramer@gmx.de:
> > When switched to display sector units it is only a matter of counting
> > to find the partition in question I would guess...
>
> Errm, yes, I thought of this as well, as always *after* posting to the ML.
>
>
> # fdisk -l -u /dev/sdb
>
> [..]
>
> /dev/sdb4 39889395 1953520064 956815335 5 Extended
> /dev/sdb5 39889458 1717621604 838866073+ 8e Linux LVM
> /dev/sdb6 1717621668 1953520064 117949198+ fd Linux raid
> autodetect
>
> So sector 1835240116 should be part of sdb6, right?
>
> So my hopes are high to be able to cp all the sdb5-content while the hdd
> is still alive (yes, I have backups, but not up to the latest ...)
>
> Thanks, Stefan
>

Hi Stefan,

The chances are high, that only one file is "killed" by this, since
most of the data on a hd is not of organisational matter.

Simply try the following on sdb6

cd "sdb6"
sudo find . -type f exec cat{} > /dev/null ;

Regardless of the time it will cost to cat ALL files, it will
fail on that file with the bad sector...

Good luck!
mcc
 
Old 01-17-2011, 07:13 PM
Alex Schuster
 
Default disk error, where?

Stefan G. Weichinger writes:

> Would someone help me out on this issue?
>
> I have a flaky disk in a server, and dmesg says:
>
> end_request: I/O error, dev sdb, sector 1835240116

Uh-oh. I suggest emerging badblocks, and then do a 'badblocks /dev/sdb' to
see which and how many blocks are defective. You can also replace sdb by
sdb6 or whatever partition you are specifically interested in.
You also might want to use the -n option (non-destructive write mode), but
only on partitions that are not mounted / used.

smartmontools also offer some diagnostic features. Including a full surface
check, but it stops at the first error. At least you know then until which
sectory the drivs is still okay:
smartctl -tlong /dev/sdb
wait...
smartctl -l selftest /dev/sda

smartctl -a /dev/sdb also shows lots of info, including the number of bad
and reallocated sectors.

If cou can, make a copy of the partiton(s) drive with ddrescue (or dd-
rescue, don't know which one is better, but both are more tolerable to
errors than dd is).

I had drives with single errors that seems to work fine for years after
this, but I do nto put important data on them. And it is also possible that
you had a head crash and more and more sectors become defective. So do the
backup fast, or do not use the drive until you do. Good luck!

> Now i have this layout:
>
> # fdisk -l /dev/sdb
>
> Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
> 255 heads, 63 sectors/track, 121601 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x00000000
>
> Device Boot Start End Blocks Id System
> /dev/sdb1 1 13 104391 fd Linux raid
> autodetect
> /dev/sdb2 14 50 297202+ 82 Linux swap /
> Solaris /dev/sdb3 51 2483 19543072+ fd Linux
> raid autodetect
> /dev/sdb4 2484 121601 956815335 5 Extended
> /dev/sdb5 2484 106917 838866073+ 8e Linux LVM
> /dev/sdb6 106918 121601 117949198+ fd Linux raid
> autodetect
>
>
> My question (apart from the fact that I evacuate all on that
> non-raid-LVM-partition right now!):
>
> In which partition is that "sector 1835240116" ?

sdb6 I think. Your fdisk uses units of 16065 * 512 bytes, while a sector has
512 bytes. 1835240116 / 16065 = 114238, this gives sdb6.

Or change fdisk's units to sectors:

fdisk /dev/sdb
u
u
p

Wonko
 
Old 01-17-2011, 07:15 PM
Mark Knecht
 
Default disk error, where?

On Mon, Jan 17, 2011 at 11:38 AM, Stefan G. Weichinger <lists@xunil.at> wrote:
> Am 17.01.2011 20:15, schrieb meino.cramer@gmx.de:
>> When switched to display sector units it is only a matter of counting
>> to find the partition in question I would guess...
>
> Errm, yes, I thought of this as well, as always *after* posting to the ML.
>
>
> # fdisk -l -u /dev/sdb
>
> [..]
>
> /dev/sdb4 * * * *39889395 *1953520064 * 956815335 * *5 *Extended
> /dev/sdb5 * * * *39889458 *1717621604 * 838866073+ *8e *Linux LVM
> /dev/sdb6 * * *1717621668 *1953520064 * 117949198+ *fd *Linux raid
> autodetect
>
> So sector 1835240116 should be part of sdb6, right?
>
> So my hopes are high to be able to cp all the sdb5-content while the hdd
> is still alive (yes, I have backups, but not up to the latest ...)
>
> Thanks, Stefan
>
>

It appears that the partition is part of a RAID? Has the RAID itself
protected you? Can you fail the drive, remove it, from the RAID, buy a
new drive and get going again? I think any RAID other than RAID0 will
withstand a single drive failure. right?

Once you had the RAID fixed you could deal with the other partitions
on what appears to be a failing drive.

No fun...

- Mark
 
Old 01-17-2011, 07:42 PM
"Stefan G. Weichinger"
 
Default disk error, where?

Am 2011-01-17 21:15, schrieb Mark Knecht:
>
> It appears that the partition is part of a RAID? Has the RAID itself
> protected you? Can you fail the drive, remove it, from the RAID, buy a
> new drive and get going again? I think any RAID other than RAID0 will
> withstand a single drive failure. right?

sdb6 is part of a mirror, yes. No loss of data so far, no failed arrays,
nothing.

Just that smartd-test failing last night and now I have to act.

The 3 arrays are OK and also fully on tape, that's not the problem.

My concern is about /dev/sdb5, which is the one and only PV inside the
lvm2-VG VG01 (oh my, I fear Volker right now telling me about that
LVM-stuff ;-) ). And VG01 hosts a few LVs, most of them easy to restore
or rebuild, one of them containing around 700GBs of mythtv-recordings.

Most of those are also on tape, but not all of them (because I run out
of space with tapes etc). Nothing really important, sure, it's "just
TV", but nice-to-have anyway.

So I am moving stuff from that LV to another new RAID-array, just to
save that data before sdb maybe crashes completely.

In general I am rebuilding that whole box lately, adding drives etc. but
I am not yet where I want to get because I hit one obstacle after the
other. I suspect the power-supply to be faulty ( I also get
chksum-errors in a zfs-fuse-pool, before and after using new disks ...
so ...)

RAM is good, at least as far memtest86+ is able to tell.

*sigh*

Thanks, Stefan
 
Old 01-17-2011, 07:46 PM
"Stefan G. Weichinger"
 
Default disk error, where?

Am 2011-01-17 21:13, schrieb Alex Schuster:

> Uh-oh. I suggest emerging badblocks, and then do a 'badblocks /dev/sdb' to
> see which and how many blocks are defective. You can also replace sdb by
> sdb6 or whatever partition you are specifically interested in.
> You also might want to use the -n option (non-destructive write mode), but
> only on partitions that are not mounted / used.
>
> smartmontools also offer some diagnostic features. Including a full surface
> check, but it stops at the first error. At least you know then until which
> sectory the drivs is still okay:
> smartctl -tlong /dev/sdb
> wait...
> smartctl -l selftest /dev/sda
>
> smartctl -a /dev/sdb also shows lots of info, including the number of bad
> and reallocated sectors.
>
> If cou can, make a copy of the partiton(s) drive with ddrescue (or dd-
> rescue, don't know which one is better, but both are more tolerable to
> errors than dd is).
>
> I had drives with single errors that seems to work fine for years after
> this, but I do nto put important data on them. And it is also possible that
> you had a head crash and more and more sectors become defective. So do the
> backup fast, or do not use the drive until you do. Good luck!

Thanks, Alex ... I will use badblocks and smartctl in more detail after
having the data off the drive (as mentioned in my reply to Mark's
posting right now).
 
Old 01-17-2011, 07:47 PM
Volker Armin Hemmann
 
Default disk error, where?

On Monday 17 January 2011 19:59:57 Stefan G. Weichinger wrote:
> Would someone help me out on this issue?
>
> I have a flaky disk in a server, and dmesg says:
>
> end_request: I/O error, dev sdb, sector 1835240116
>
> Now i have this layout:
>
> # fdisk -l /dev/sdb
>
> Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
> 255 heads, 63 sectors/track, 121601 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x00000000
>
> Device Boot Start End Blocks Id System
> /dev/sdb1 1 13 104391 fd Linux raid
> autodetect
> /dev/sdb2 14 50 297202+ 82 Linux swap / Solaris
> /dev/sdb3 51 2483 19543072+ fd Linux raid
> autodetect
> /dev/sdb4 2484 121601 956815335 5 Extended
> /dev/sdb5 2484 106917 838866073+ 8e Linux LVM
> /dev/sdb6 106918 121601 117949198+ fd Linux raid
> autodetect
>
>
> My question (apart from the fact that I evacuate all on that
> non-raid-LVM-partition right now!):
>
> In which partition is that "sector 1835240116" ?
>
> Sorry for this maybe stupid question ...
>
> Thanks, Stefan

man debugfs:

bmap filespec logical_block
Print the physical block number corresponding to the logical
block number logical_block
in the inode filespec.

icheck block ...
Print a listing of the inodes which use the one or more blocks
specified on the command
line.

ncheck inode_num ...
Take the requested list of inode numbers, and print a
listing of pathnames to those
inodes.


if you are using extX-
 
Old 01-17-2011, 07:52 PM
Volker Armin Hemmann
 
Default disk error, where?

On Monday 17 January 2011 21:46:39 Stefan G. Weichinger wrote:
> Am 2011-01-17 21:13, schrieb Alex Schuster:
> > Uh-oh. I suggest emerging badblocks, and then do a 'badblocks /dev/sdb'
> > to see which and how many blocks are defective. You can also replace
> > sdb by sdb6 or whatever partition you are specifically interested in.
> > You also might want to use the -n option (non-destructive write mode),
> > but only on partitions that are not mounted / used.
> >
> > smartmontools also offer some diagnostic features. Including a full
> > surface check, but it stops at the first error. At least you know then
> > until which sectory the drivs is still okay:
> > smartctl -tlong /dev/sdb
> > wait...
> > smartctl -l selftest /dev/sda
> >
> > smartctl -a /dev/sdb also shows lots of info, including the number of
> > bad
> > and reallocated sectors.
> >
> > If cou can, make a copy of the partiton(s) drive with ddrescue (or dd-
> > rescue, don't know which one is better, but both are more tolerable to
> > errors than dd is).
> >
> > I had drives with single errors that seems to work fine for years after
> > this, but I do nto put important data on them. And it is also possible
> > that you had a head crash and more and more sectors become defective.
> > So do the backup fast, or do not use the drive until you do. Good luck!
>
> Thanks, Alex ... I will use badblocks and smartctl in more detail after
> having the data off the drive (as mentioned in my reply to Mark's
> posting right now).

if the disk has spare sectors, it will map out the sector the next time there
is a write to it. So.. no need to offline it.
 

Thread Tools




All times are GMT. The time now is 07:18 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org