<div dir="ltr">Hi all, thought I'd describe a problem that I had last night with my Myth box just in case anyone else gets a similar issue in the future. This issue doesn't really have anything specifically to do with MythTv. <br>
<br>It is all fixed now, but it had me quite confused for a while...<br><br>So i have an old Gigabyte motherboard (this relevent) running a fairly recent and clean install of Mythbuntu 12.04 LTS. I have a 3TB drive dedicated to my recordings, and a separate (much smaller) system drive. The 3TB drive is formated as a GPT drive with a single large XFS partition.<br>
<br>So a few days ago, I was getting annoyed by continuous reminders of various Mythbuntu updates, so I opened a console and did: <br> sudo apt-get install update<br> sudo apt-get install upgrade<br> <br>Among many other things, it updated the kernel. I was recording stuff at the time, so didn't bother rebooting for a few days - until last night...<br>
<br>So i rebooted. When the system came back up, I was warned that my 3TB XFS partition was not able to be mounted. This has happened to me once before just a few days after i completely reinstalled Mythbuntu last year. At that time I didn't look into the issue and I simply formatted the drive and reinstalled the OS - this time i wanted to find out more...<br>
<br>I opened up GParted. It clearly showed that my 3TB device (/dev/sda) had no partitions on it at all. Weirdly, the size of my 3TB drive was being reported as 2TB.<br><br>I then used 'sudo gdisk /dev/sda' to have a closer look. It saw that there was a protective MBR block, and it spat out a number of errors talking about corrupted GPT headers, CRC mis-matches, and that the size of the end-sector is greater than the physical size of the disk. Gdisk also seemed to believe that my disk was only 2TB.<br>
<br>My initial theory at this point was that some GPT unaware system app had overwritten the GPT header on the disk with some MBR data. Problem was this theory is that it doesn't explain why the disk was only appearing as 2TB to the OS. I did try to get gdisk to copy the backup GPT table to the beginning of the disk, however (thankfully) gdisk refused due to the backup GPT table being corrupted. Had i been successful in copying this backup GPT table, i believe i would have hosed the filesystem.<br>
<br>At this point, i did some researching on the internet. I now believe that the issue is something to do with HPA (Host Protected Area), where the motherboard 'steals' the last few megabytes of the disk to store a backup copy of the BIOS. The physical size of the disk is then reported to the OS to be slightly smaller than it actually is. Problem is, on older Gigabyte motherboards there is a bug in this that causes 3TB drives to look like only 2TB drives.<br>
<br>Anyway - just as I had found this HPA information on the internet, i happened to do another apt-get install update/upgrade/reboot. The one ALSO included a new kernel. When the machine came back up - my 3TB partition was back again!! I hadn't actually done anything at all to fix it. I unmounted the disk and ran xfx_repair - it found zero issues. The disk and all the data are just fine.<br>
<br>There are still a number of questions I have. The HPA feature, as i understand, is a BIOS/hardware thing, however it appears that the particular kernal that i was running for those few hours last night was affected by it - why does the newer kernal work fine? There are also some references on the internet on passing an option when starting linux to ignore the HPA feature - but then other references on the internet seem to indicate that that is a bad thing to do. <br>
<br>Anyway - maybe this lengthy post might help someone in the future with a similar problem...<br><br>:-)<br><br><br><br></div>