Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #16  
Old 26th November 2011, 07:06 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
Re: f16 gpt corrupt header, repair it and later the other one gets corrupted

I would not expect a controller to behave in this manner. Even misconfigured this sounds like a bug for it to damage a backup GPT so consistently. Much of silent data corruption points to firmware bugs, not just a function of SNR, temperature, particles, oxidation of media surface, etc.

http://research.cs.wisc.edu/adsl/Pub...on-fast08.html
Reply With Quote
  #17  
Old 29th November 2011, 05:29 PM
srs5694 Offline
Registered User
 
Join Date: Jan 2011
Location: Woonsocket, RI
Posts: 521
linuxfirefox
Re: f16 gpt corrupt header, repair it and later the other one gets corrupted

AFAIK, any sort of RAID mode necessarily involves writing extra data to the disk. For the most part, firmware-based RAID options are software RAID, and if the Linux kernel doesn't support the firmware's version of RAID, or if Linux is configured to ignore it, I could easily see the firmware's RAID feature attempting to use sectors of the disk that Linux wants to use for other things -- like a partition table. Thus, the solution doesn't seem all that surprising to me, although this is the first time I've heard of this specific complication.

I agree with Chris that the SMART errors are troubling. I note that the machine was described as a laptop, so that could account for the g-sense errors -- moving the computer while it's powered on, or using the computer in a vehicle that bounces around, could easily produce such problems. I recommend trying to avoid such uses in the future, if at all possible. Spinning discs are very delicate things, and although manufacturers do a remarkable job in making them resistant to damage caused by small bumps, there's only so much they can do on this score.
Reply With Quote
  #18  
Old 29th November 2011, 07:44 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
Re: f16 gpt corrupt header, repair it and later the other one gets corrupted

I wonder if the firmware is GPT unaware. MBR doesn't have a backup located at the end of a disk like GPT does, so I wonder if this particular firmware's RAID implementation possibly predates GPT, and thinks the region its mucking up is fair game.

---------- Post added at 12:44 PM ---------- Previous post was at 12:35 PM ----------

Quote:
Originally Posted by rtguille View Post
So:

When the SATA controller in a Dell e4310 with FW/BIOS A05 (in my case) is set to RAID,
it corrupts the secondary/backup gpt header at poweron
There is an Oct 2011 BIOS update for this model. I didn't read what it fixes. Whether you've applied it or not, I'd report your results thus far to Dell support. You've already done all of the work. No apparent corruption with MBR or other data, but consistent corruption of just the backup GPT when RAID is enabled. Me thinks they haven't anticipated GPT with their RAID implementation, and probably not just on this laptop.
Reply With Quote
  #19  
Old 29th November 2011, 07:52 PM
AdamW Offline
Fedora QA Community Monkey
 
Join Date: Dec 2008
Location: Vancouver, BC
Posts: 4,205
linuxfirefox
Re: f16 gpt corrupt header, repair it and later the other one gets corrupted

yeah, I've had issues with SATA controller set to RAID mode in the past. On my system, for e.g., it can't boot a native EFI install with the SATA controller set to RAID mode, for some reason. Flipping it to AHCI makes the system boot, no other changes. Yay, BIOSes.
__________________
Adam Williamson | awilliam AT redhat DOT com
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | identi.ca: adamwfedora
http://www.happyassassin.net
Reply With Quote
  #20  
Old 29th November 2011, 11:04 PM
srs5694 Offline
Registered User
 
Join Date: Jan 2011
Location: Woonsocket, RI
Posts: 521
linuxfirefox
Re: f16 gpt corrupt header, repair it and later the other one gets corrupted

Quote:
Originally Posted by chrismurphy View Post
I wonder if the firmware is GPT unaware. MBR doesn't have a backup located at the end of a disk like GPT does, so I wonder if this particular firmware's RAID implementation possibly predates GPT, and thinks the region its mucking up is fair game.
I don't think it has to do with GPT-awareness or -unawareness. My hypothesis is just this: When set to RAID mode, the disk controller writes data to the hard disk where its RAID implementation normally reserves data. The intention is that drivers in the OS will then read that data, combine together portions of multiple disks, and present the combined disk portions as a single disk to the rest of the OS. (The "portions" would be the vast majority of the disk, though.) In the case in this thread, what happened was that the firmware wrote the data to the disk in the expectation of a RAID-using OS, but Linux didn't use the RAID data, and instead accessed the disk directly.

Put another way, the firmware used its own RAID system, with the intention of having the OS use just part of the disk, but Linux ignored this and used the whole disk. The two systems just worked under different assumptions and created a collision.

By this analysis, the firmware might not know or care what type of partitioning scheme is in use. (A pure BIOS system doesn't need to know a thing about partitioning.) It just happened that GPT was sensitive to damage caused by the collision, which resulted in its detection. If an MBR disk's last few sectors were overwritten, the issue might never have caused data corruption -- or if a partition were placed in that space, the result might have been a damaged filesystem or damaged file data, once that area was used.
Reply With Quote
  #21  
Old 21st April 2012, 11:52 AM
bodo666 Offline
Registered User
 
Join Date: Apr 2012
Location: Dublin, Ireland
Posts: 5
windows_7firefox
Re: f16 gpt corrupt header, repair it and later the other one gets corrupted

Hi All,

just wanted to thank rtguille for posting step-by-step (first post), it rescued my 3tb wd ezrx hdd contents.

I am running very simple no lvm,no raid no nothing setup. just gpt to be able to use the whole setup with 1 single ext4 partition. nothing could go wrong, right? ;-)
looks like gpt is nowhere near stability of old-style msdos label system. good though there are all these rescue options.
what did i do to deserve the trouble of partition not mounting anymore? nothing really, I was just adding 2hdds to my system, setting bios boot order and that was all. after booting up old msdos 2tb came up with no fuss, 3tb was gone just like that!
using gentoo x64, with kernel 2.6.39
mounting or any fsck (with different superblock addresses etc) or other thooting attempts, I was getting infamous:
wrong fs type, bad option, bad superblock on /dev/sda7,missing codepage or helper program

for a moment there I thought i am in a really deep trouble, then found another (now I know) great tool: testdisk, which had no problem at all reading the drive... like nothing happened! mount on OS still didnt work though, rescue options from testdisk didnt work either unfortunately (write command)
then eventually landed here and thanks again to OP!!!

I really wonder what happened? my best idea - possibly flaky implementation of gpt in the kernel...
Reply With Quote
  #22  
Old 21st April 2012, 03:50 PM
srs5694 Offline
Registered User
 
Join Date: Jan 2011
Location: Woonsocket, RI
Posts: 521
linuxfirefox
Re: f16 gpt corrupt header, repair it and later the other one gets corrupted

bodo666,

I have never heard of GPT problems in the kernel. You haven't presented enough details of what your problem is to make me willing to venture a diagnosis, but for rtguille's problem, my suggestion in post #20 is still my best guess: An errant RAID setting in the firmware was causing inconsistencies in how the firmware and Linux itself treated the disk, which in turn led to recurring corruption of the GPT data. That might be what's happened to you, too, or it could be something completely unrelated. (Yes, I know you say you're not using RAID -- but have you checked your firmware's RAID settings? They can be enabled even if your OS isn't using them, and if the two don't match, it's a recipe for problems!) Note that I'm the author of GPT fdisk, a Linux GPT partitioning tool, so I understand GPT pretty well and I've had lots of experience with it.

One more point: Don't rely too much on TestDisk. It's a useful tool, but by its very nature it's unreliable. Sometimes it works wonders, but other times it fails miserably, and can even make matters worse. I'm not trying to criticize TestDisk, just point out its limitations. It's meant for recovering partitions when their partition table entries have been completely lost, but leftover data from old partition setups can sometimes make this task very difficult. I consider it a partitioning tool of last resort (or next-to-last resort, the last being going in with a sector editor to try to find your partitions manually -- but that's well beyond most peoples' ability).
Reply With Quote
  #23  
Old 21st April 2012, 08:06 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
Re: f16 gpt corrupt header, repair it and later the other one gets corrupted

Quote:
Originally Posted by bodo666 View Post
looks like gpt is nowhere near stability of old-style msdos label system.

I really wonder what happened? my best idea - possibly flaky implementation of gpt in the kernel...
Really? That's your best idea? The GPT is a static thing. If it's correct, the kernel has the contents read, makes a decision, and then moves on to other things that have nothing to do with the GPT. It's not at all like a file system, which is constantly being read, modified, and written. Yet you think something that is rarely, often never again, modified is the problem?

Either you want to track down the real source of your problem, and you're willing to do the work required to track it down. Or not. Let us know which it is and try not to sound like you're trolling.
Reply With Quote
  #24  
Old 21st April 2012, 10:53 PM
bodo666 Offline
Registered User
 
Join Date: Apr 2012
Location: Dublin, Ireland
Posts: 5
windows_7firefox
Re: f16 gpt corrupt header, repair it and later the other one gets corrupted

hey guys, didn't mean to troll, sometimes it just comes out that way , apologies. also had no idea would find such an audience here :-). first time tried gpt and such an ugly surprise after just 2 weeks using it after all I did was shifting a few disks around.

if you are interested in following it and maybe helping i can share further experiences here...bear in mind this might get gentoo-specific. yeah, problem is not completely fixed, although i got a good step closer thx to info from op.

so here is the latest from what it looks like:
- gpt table got messed up a bit by testdisk [write] command, like srs hinted might happen
- it appears table was good the whole time (yes, apologies again )
- anyway i was getting very similar messages/errors like op mentioned, same steps as mentioned by op seemed to fix and get me my data back
- ...but all stopped working after reboot, again "wrong fs type, bad option, bad superblock on /dev/sda7,missing codepage or helper program"
- ok, so i rechecked the tables as before with gdisk/parted etc, all seemed well and good this time, so this didnt compute at all
- tried redetection then with "partprobe" and voila! could magically mount the fs again right after

what does it tell me? not yet sure, don't know this part of OS too well. any hints/clues welcomed. I will do some furhter research in meantime and possibly upgrade to kernel 3.2-something, oughta be good fun - didnt do it in a while.

about the controller - this is jetway nf93 mobo, penryn based itx board, i am using onboard intel ICH9, set to AHCI in BIOS(A07) (1-SSD,3 big HDDs, 4 ports total)
in linux 2 drivers enabled only:
- sata ahci
- pata_jmicron (i have a 2.5 hdd pata connected here too, currently wiped (dd if=/dev/zero etc) to be used later)


current dmesg:
ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata6.00: ATA-8: WDC WD30EZRX-00MMMB0, 80.00A80, max UDMA/133
ata6.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
ata6.00: configured for UDMA/133
scsi 5:0:0:0: Direct-Access ATA WDC WD30EZRX-00M 80.0 PQ: 0 ANSI: 5
sd 5:0:0:0: [sdd] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
sd 5:0:0:0: [sdd] 4096-byte physical blocks
sd 5:0:0:0: [sdd] Write Protect is off
sd 5:0:0:0: [sdd] Mode Sense: 00 3a 00 00
sd 5:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdd: detected capacity change from 0 to 3000592982016
sdd: sdd1
sd 5:0:0:0: [sdd] Attached SCSI disk
---
EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (sdd1): VFS: Can't find ext4 filesystem
Reply With Quote
  #25  
Old 21st April 2012, 11:21 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
Re: f16 gpt corrupt header, repair it and later the other one gets corrupted

Well there's not much information to go on because you don't have the problem anymore it seems, or a reproducible condition. While you're making more changes, like kernel versions, as well.

If you're getting bad superblock messages on reboot, then I'm suspicious of the following:

a.) What time is it per the computer? Is your computer losing time or are you changing time zones? e2fsprogs currently gets pissy when the superblock date is in the future. So if your computer is in the past compared to the superblock, you may be getting a bogus error message.

b.) Like the original poster, are you certain you don't have any BIOS based RAID enabled? No GPT tools screw around with superblocks. Something else is. The fact partprobe is resolving some condition makes me wonder if something is messing with your MBR, like software RAID, and the kernel is starting out with GPT, then switching to MBR after a partprobe.

c.) What is the result of
Code:
fdisk -l /dev/sdd
I assume sdd is the problem disk? 3TB, so you have no choice but to use GPT if you want to use all 3TB.

d.) Have you done any SMART testing using smartmontools?
Code:
smartctl -a /dev/sdd
Post the results of that for starters.

Then later do:
Code:
smartctl -t long /dev/sdd
and then just leave the computer alone until the predicted complete time. You could still use the computer for casual tasks but you're beter off just leaving it along because testing is suspended unless the disk is idle.

Please post your results formatted properly using code tags. When you paste results into the forum reply to thread window, highlight the text, and click on the # button in the tool bar to add the code tags.

---------- Post added at 04:21 PM ---------- Previous post was at 04:16 PM ----------

And you know what? I think you should post these details in a whole new thread once you actually have something to go on. And a clear description of the problem. If you want you can references this thread's URL as background. But this thread is marked as solved and there's zero evidence your problem and this one are related.

And plus, resurrecting it after 5 months is kinda inappropriate, and just clutters up both your problem as well as the past thread.
Reply With Quote
  #26  
Old 21st April 2012, 11:25 PM
srs5694 Offline
Registered User
 
Join Date: Jan 2011
Location: Woonsocket, RI
Posts: 521
linuxfirefox
Re: f16 gpt corrupt header, repair it and later the other one gets corrupted

Chrismurphy has posted some good suggestions for diagnostics. Another is this: Post the RESULTS.txt file that you can get by running the Boot Info Script. This script collects several basic technical details on partitioning, filesystem, and boot loader configuration in one output file. Although it doesn't sound like your boot loader is messed up, the partitioning and filesystem data may be valuable in isolating the cause of the problem.
Reply With Quote
  #27  
Old 21st April 2012, 11:58 PM
bodo666 Offline
Registered User
 
Join Date: Apr 2012
Location: Dublin, Ireland
Posts: 5
windows_7firefox
Re: f16 gpt corrupt header, repair it and later the other one gets corrupted

thx guys, fully agreed. i will open new thread if i get stuck then, with all info requested here.
btw. no there is no raid ON in bios. only 2 controllers are:
- onboard intel sata, set to ahci (other choice was ide or raid), legacy mode disabled
- onboard jmicron pata (has on/off setting only in bios)
Reply With Quote
  #28  
Old 22nd April 2012, 05:56 PM
bodo666 Offline
Registered User
 
Join Date: Apr 2012
Location: Dublin, Ireland
Posts: 5
windows_7firefox
Re: f16 gpt corrupt header, repair it and later the other one gets corrupted



that was extremely simple in the end...:
File Systems
Partition Types[*] EFI GUID Partition support (NEW)
in kernel source.

...yet weird:
- for 2 weeks my system was working without it :-)
- partprobe makes it work

thx very much for your responses. EOT
Reply With Quote
  #29  
Old 22nd April 2012, 06:21 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
Re: f16 gpt corrupt header, repair it and later the other one gets corrupted

You're compiling your own kernel?

---------- Post added at 11:21 AM ---------- Previous post was at 11:01 AM ----------

Aha. Gentoo Linux 2.6.39. Not Fedora, hence the confusion. And for whatever reason GPT isn't baked into that kernel by default it seems.
Reply With Quote
  #30  
Old 22nd April 2012, 06:29 PM
bodo666 Offline
Registered User
 
Join Date: Apr 2012
Location: Dublin, Ireland
Posts: 5
windows_7firefox
Re: f16 gpt corrupt header, repair it and later the other one gets corrupted

YES, manual kernel config. for last 15 or so years and (rather) wouldn't have it any other way. i think it's still default for gentoo, too (no predefined .config)
problem is kernels are huge/full of options these days and last couple of years i am doing this quite infrequently and tend to forget my own golden rule ("in case of doubt always check the freaking kernel config first") and somehow I thought I had all partition types I ever used/would use proactively/just-in-case enabled, this was not true. also it didn't help that I had gpt disk working with GPT option disabled.

anyway hope it helps if sbd comes across this thread in the future.

thx again for yours and srs5694 responses.
Reply With Quote
Reply

Tags
corrupt, corrupted, f16, gpt, header, repair

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
repair MBR, how to do it? amfpg Using Fedora 2 12th March 2009 10:25 AM
chattr command corrupted. how to repair it? henrym Servers & Networking 0 3rd September 2008 09:49 AM
Repair corrupted ext3 cyclonmaster Using Fedora 2 23rd May 2007 08:18 AM
repair mbr andrewFC3 Using Fedora 1 11th July 2005 07:58 PM
Repair Filesystem xzworks Using Fedora 10 1st May 2005 10:20 AM


Current GMT-time: 10:17 (Saturday, 01-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Sao Lourenco do Sul Instagram Photos - United Arab Emirates Photos - Sulphur