[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: smartd error messages: OfflineUncorrectableSector, CurrentPendingSector



Okay, on the stuff below, I used lvdisplay -m to show the extents. I
used bc to figure out that I have 65536 sectors in an extent, and I was
then able to tentatively locate the bad sector at 2735304 sectors in on
my /var/tmp volume by subtracting out the starting sector of the LVM
physical partition. 

(There's enough room there, I suppose I could just use lvm to shrink the
partition, and then forget about the bad sector and not use LVM next
time.)

I tried using tune2fs -l /dev/hda3 to figure out the logical blocks, but
it says "bad magic in superblock". debugfs was similarly cooperative. 

Anyone care to give me a clue where to go from here?

How do you fix a bad sector on a drive when the bad sector is in an LVM
volume?

On Wed, 15 Jun 2005 16:54:41 +0900
Joel <rees ddcom co jp> wrote

> > > I'm gettin mail to root on a new install of FC3. (Haven't had time to
> > > update it yet.)
> > > 
> > > The messages come in pairs, especially after booting up in the morning.
> > > The first is the offline uncorrectable, and the second is the current
> > > pending, the number of sectors is five.
> > > 
> > > I've been digging around in the manpage for smartd and smartctl and I
> > > don't really see much about what should be done. One comment in a
> > > mailing list post suggests -U 0 and -C 0 in smartd.conf to silence the
> > > complaints, but I have the idea that would just be looking to lose data.
> > > 
> > > I've done smartctl -a /dev/hda and had a look at what that tells me.
> > > 
> > > Are there tools available to help figure out which files the problem
> > > sectors are in so I can check what should be there and maybe push a
> > > write on the sectors to force remapping?
> >
> > http://smartmontools.sourceforge.net/BadBlockHowTo.txt
> 
> Thanks, Alexander.
> 
> It occurs to me that I should have mentioned that I have an lvm
> partition on this disk. I read the manpages for lvm, and I didn't find
> anything that explained how to convert the lvm sizes and extents to
> physical sector numbers. 
> 
> But it's a fresh install. I did remove the last logical partition and
> cut two partitions in the space there, but I haven't done any resizing.
> So I thought I could get a rought idea just by converting everything to
> bytes.
> 
> (debugfs doesn't seem to work on lvm?)
> 
> But if my math is right, it looks like the sector giving errors is off
> the end of the disk.
> 
> Here's the relevant stuff --
> 
> [...]
> The output of fdisk:
> 
> -----------------------------------------------------------------------
> [root rees-linux ~]# fdisk -l
> 
> Disk /dev/hda: 40.0 GB, 40020664320 bytes
> 255 heads, 63 sectors/track, 4865 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> 
>     Device Boot      Start         End      Blocks   Id  System
> /dev/hda1   *           1          33      265041   83  Linux
> /dev/hda2              34         425     3148740   82  Linux swap
> /dev/hda3             426        4865    35664300   8e  Linux LVM
> -----------------------------------------------------------------------
> 
> Calculations in bc: 
> 
> -----------------------------------------------------------------------
> [root rees-linux ~]# bc
> bc 1.06
> Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
> This is free software with ABSOLUTELY NO WARRANTY.
> For details type `warranty'.
> 
> lba=72411953
> print 16065 * 512 * 4865
> 40015987200
> print 255*63
> 16065
> print 255*63*4865
> 78156225
> 
> start=255*63*425
> print start+lba
> 79239578
> print (start+lba)*512
> 40570663936
> -----------------------------------------------------------------------
> 
> Should I be printing start-lba there?
> 
> And, once I do have an idea in which lvm volume it's located, is there a
> flag for debugfs that I've missed, to allow me to work on an lvm volume?
> Or are there lvm tools?

--
Joel Rees   <rees ddcom co jp>
digitcom, inc.   株式会社デジコム
Kobe, Japan   +81-78-672-8800
** <http://www.ddcom.co.jp> **


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]