Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Restore a failing hdd with lvm physical volume

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
pelckyboy
n00b
n00b
Posts: 36
Joined: Sat May 10, 2003 7:53 pm

Restore a failing hdd with lvm physical volume

  • Quote

Post by pelckyboy » Sun Sep 18, 2005 9:33 am

Hello everyone,

Last night, my primary hd crashed on me and now I am trying to recover it.

The partitioning on the disk (25GB in total) was :
hda1 : 64Mb /boot ext2
hda2 : +/- 512Mb swap
hda3 : ?GB /root ext3
hda4 : ?GB evms : disk segment attached to a lvm storage container lvm/store (disk segments hdb1 and sda1 are also part of this storage container)
Now I'm trying to transfer as much as possible from /dev/hda using ddrescue (gnu version). However, ddrescue stops recovering at 2,1 GB of my disk.

After some logging crunching, I noticed from dmesg the following lines :

Code: Select all

hda: attached ide-disk driver.
hda: host protected area => 1
hda: 4128768 sectors (2114 MB) w/1961KiB Cache, CHS=3328/255/63, UDMA(66)
Is the 'host protected area' some sort of flag set by EVMS or LVM to hide the disk segment ? Or could this be caused by a evms version mismatch between the rescue disk (2.3.4-r1) and what I used to have ?

I'm not quite sure what the size of hda3 was, so I'm not able to tell whether the 2,1 GB boundary corresponds with the hda3->hda4 crossing.

Is there any way to discover something about the corrupt lvm physical volume looking at my other physical volumes ?

The 2,1 GB limit also shows when examining the geometry :

Code: Select all

cat /proc/ide/hda/geometry
physical     4096/16/63
logical      3328/255/63
The logical values give an idea of the size of the hd : (3328*255*63)*512kB = 25,49GB. Strange that logical > physical ....

Could anyone shed a light on my findings ?

Thanks !

Kristof
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56088
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Sep 18, 2005 10:13 am

pelckyboy,

The host protected area is used by some PC manufacturers to hide recovery and BIOS extensions.
Essentially, an arbitary sized block of sectors at the end of the drive is hidden by making teh drive lie about its size.

Linux can see and delete the HPA but give it careful though. A part of your BIOS may be there..
IF this drive came from another PC of a different type, it won't be a problem. As fas as I know, linux does not use the HPA.
In fact, its a recent addition the the IDE standard.

There is a wrapper script for ddrescue that makes it do a binary search of good areas of the drive, rather than stall doing rereads at the first bad block. See dd_rhelp
Your 2.1Gb limit may be just the firet bad block
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
pelckyboy
n00b
n00b
Posts: 36
Joined: Sat May 10, 2003 7:53 pm

  • Quote

Post by pelckyboy » Sun Sep 18, 2005 11:43 am

NeddySeagoon,

Thanks for your reply ! I downloaded dd_rescue and the dd_rhelp script and will reboot in Knoppix soon and see what happens...

In the mean time, I digged somewhat deeper into my drive characteristics and hdparm turned out this :

Code: Select all

Configuration:
        Logical         max     current
        cylinders       4096    4096
        heads           16      16
        sectors/track   63      63
        --
        CHS current addressable sectors:    4128768
        LBA    user addressable sectors:   53464320
        device size with M = 1024*1024:       26105 MBytes
        device size with M = 1000*1000:       27373 MBytes (27 GB)
What is the difference between CHS current addressable sectors and LBA user addressable sectors ? The last number corresponds with the label on my harddisk. The current addressable sectors are 2,1GB in total :-(

I'll keep you guys informed of my findings with dd_rescue !
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56088
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Sep 18, 2005 11:55 am

pelckyboy,

Its a long story buried in the history of Hard Drives, BIOSes and PCs.
The Large Hard Drive HOWTO explains it all, from the time a Large HDD was > 528Mb.

Essentially CHS and LBA are two different ways of accessing the data on your drive but the CHS method cannot describe drives bigger than 8Gb. Its never been used by Linux or Windows NT (after install). For backwards compatibility, modern drives lie in the CHS data fields to tell those operating systems that want to use it (e.g.DOS), they are as big as they possibly can be.

You should ignore the CHS data and be skeptical of the LBA size unless you know you do not have a Host Protected Area.
dmesg will show that. The LBA is the decimal nouomber of 512 byte blocks the drive claims to provide.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
pelckyboy
n00b
n00b
Posts: 36
Joined: Sat May 10, 2003 7:53 pm

  • Quote

Post by pelckyboy » Sun Sep 18, 2005 12:25 pm

dd_rhelp is now running and it says
max file size 2064384.0
Wow !!! Maybe this has something to do with the filesystem I am writing to ??? I formatted it as a reiserfs...
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56088
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Sep 18, 2005 12:33 pm

pelckyboy,

Or the age of the tools. reiserfs will support files > 2Gb
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
pelckyboy
n00b
n00b
Posts: 36
Joined: Sat May 10, 2003 7:53 pm

  • Quote

Post by pelckyboy » Sun Sep 18, 2005 4:12 pm

Doh ! Yesterday I played with some jumpers while testing the defect hd in another computer. One of them imposes a 2GB limit !!!! Now dd_rescue is doing its job and when that is finished, I plan on doing a gpart on the file and hopefully recovering my partitions. After a fcsk I will have to make the though decision to start from scratch or to try to revive my existing gentoo installation (about 3 years old now).
Top
Post Reply

7 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic