[opensuse] Reading past end of disk? [Was: Bad Sector remapping?]
Wait a second...
Per hdparm -I /dev/sda, my drive only has 312518818 sectors, so why is
Linux even trying to read sector 312518818?
I'm going to fsck my root partition, since my boot is failing so early on.
ie.
Sector 312518818 is one past the end of the drive.
(0-312518817 is the valid range I assume.)
FYI: smartctl is showing zero remapped sectors.
Greg
On 9/27/07, Carlos E. R.
Greg Freemyer wrote:
Having an issue I thought I knew how to address, but it is not working. OpenSUSE 10.2 is booting into a maintenance mode due to a bad sector read on the hard disk. I'm not worried about the data on the drive and so far it is just one bad sector.
So I would like to cause the drive to map the sector to one of its spares, then do a fsck on the partiion, then some kind of installation verification step, or if truly necessary I can reinstall.
I'm stuck on the first step. I thought writing data to the sector would cause the drive to remap it, but that is not happening.
dd if=/dev/sda of=/dev/null skip=312518818 count=1
Is very slow to return and triggers the bad sector error messages.
dd if=/dev/zero of=/dev/sda skip=312518818 count=1
returns very fast and and reports success, but redoing the above read again still returns errors.
Is there a different way to get that sector remapped?
You should check what the smart log of that disk contains, you might get some interesting info about what is causing it. Perhaps you could start its selfdiagnostic.
But maybe it would be wiser to do a backup of the affected partition first. Then, after the diagnostic, write over the whole partition and reformat it.
Another idea: the remapping sectors are not infinite: if spent, remapping will fail. The smartctl tool should tell you that. It is of course a signal to immediately replace the drive.
-- Cheers, Carlos E. R. (from RC1)
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-- Greg Freemyer Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 27 September 2007 16:03, Greg Freemyer wrote:
Wait a second...
Per hdparm -I /dev/sda, my drive only has 312518818 sectors, so why is Linux even trying to read sector 312518818?
Linux accepts the size you specify when you format a file system. When doing so, it is unlikely to need to read that sector, only include it's index in a free block. Only when the demand for free blocks causes that block to be allocated will the drive be asked to read or write it.
I'm going to fsck my root partition, since my boot is failing so early on.
Unless you perform a check that includes a scan of free sectors (*), this is not necessarily going to confirm the accessibility of every sector in the free list. (*) Assuming there is such a check option for the file system in question.
i.e. Sector 312518818 is one past the end of the drive. (0-312518817 is the valid range I assume.)
FYI: smartctl is showing zero remapped sectors.
Greg
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz wrote:
On Thursday 27 September 2007 16:03, Greg Freemyer wrote:
Wait a second...
Per hdparm -I /dev/sda, my drive only has 312518818 sectors, so why is Linux even trying to read sector 312518818?
Linux accepts the size you specify when you format a file system. When doing so, it is unlikely to need to read that sector, only include it's index in a free block. Only when the demand for free blocks causes that block to be allocated will the drive be asked to read or write it.
We don't normally specify a size: we tell mkfs to do its job and it does it, automatically. -- Cheers, Carlos E. R. (from RC1) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 27 September 2007 16:33, Carlos E. R. wrote:
Randall R Schulz wrote:
On Thursday 27 September 2007 16:03, Greg Freemyer wrote:
Wait a second...
Per hdparm -I /dev/sda, my drive only has 312518818 sectors, so why is Linux even trying to read sector 312518818?
Linux accepts the size you specify when you format a file system. When doing so, it is unlikely to need to read that sector, only include it's index in a free block. Only when the demand for free blocks causes that block to be allocated will the drive be asked to read or write it.
We don't normally specify a size: we tell mkfs to do its job and it does it, automatically.
Eh? You tell it the drive's bounds when you partion it. The lie, if you will, might be recorded in the partition table, but it's a lie nonetheless.
-- Carlos E. R.
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 9/27/07, Randall R Schulz
On Thursday 27 September 2007 16:33, Carlos E. R. wrote:
Randall R Schulz wrote:
On Thursday 27 September 2007 16:03, Greg Freemyer wrote:
Wait a second...
Per hdparm -I /dev/sda, my drive only has 312518818 sectors, so why is Linux even trying to read sector 312518818?
Linux accepts the size you specify when you format a file system. When doing so, it is unlikely to need to read that sector, only include it's index in a free block. Only when the demand for free blocks causes that block to be allocated will the drive be asked to read or write it.
We don't normally specify a size: we tell mkfs to do its job and it does it, automatically.
Eh? You tell it the drive's bounds when you partion it. The lie, if you will, might be recorded in the partition table, but it's a lie nonetheless.
I can't verify for sure what the partition table used to say because fsck on my root partition had even worse errors than simply trying to boot from that partition. And after it ran my partition table was blown away (sector 0). I guess I am going to be re-installing from scratch tomorrow. I'll use a new harddrive just in case that was the problem, but I really will be surprised if this was a hardware problem. Oh well, off to download the 10.3rc DVD. Greg -- Greg Freemyer Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Carlos E. R.
-
Greg Freemyer
-
Randall R Schulz