1 (edited by greenfish 2013-10-24 11:40:54)

Topic: 3TB, GPT, HPA enabled culprit gigabyte [SOLVED]

I started my HTPC as usual, only to be greeted with "movie share" not found. I was suprised, looking at console, it seemed the kernely suddently stopped looking for my HDD.

Manually mounting the HDD

mount -t ext4 /dev/sdg1 /mnt                                                                              sad
mount: special device /dev/sdg1 does not exist


fdisk /dev/sdg


Disk /dev/sdg: 3000.6 GB, 3000591900160 bytes, 5860531055 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot      Start         End      Blocks   Id  System
/dev/sdg1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.


dmesg | grep sdg   

                                                                                       sad

8.035214] sd 8:0:0:0: [sdg] 5860531055 512-byte logical blocks: (3.00 TB/2.72 TiB)
[    8.035217] sd 8:0:0:0: [sdg] 4096-byte physical blocks
[    8.035280] sd 8:0:0:0: [sdg] Write Protect is off
[    8.035282] sd 8:0:0:0: [sdg] Mode Sense: 00 3a 00 00
[    8.035306] sd 8:0:0:0: [sdg] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    8.090129]  sdg:
[    8.090458] sd 8:0:0:0: [sdg] Attached SCSI disk.

stat /dev/sdg1

stat: cannot stat /dev/sdg1: No such file or directory





Also ran testdisk, tried the analyze, it said all okay, tried rebuilding partition structure. I think maybe that's why it's now complaining about "Error: Can't have a partition outside the disk!"


sudo parted /dev/sdg unit s print   
                                                                     sad

Error: Can't have a partition outside the disk!
Model: ATA ST3000DM001-1CH1 (scsi)
Disk /dev/sdg: 5860531055s
Sector size (logical/physical): 512B/4096B
Partition Table: unknown
Disk Flags:

fdisk -l | less

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xe81808b3

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63  1953520064   976760001   83  Linux

Disk /dev/sdb: 4022 MB, 4022337024 bytes, 7856127 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x43756644

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           0     1077247      538624    0  Empty
/dev/sdb2            4728       68215       31744   ef  EFI (FAT-12/16/32)

Disk /dev/sdb1: 551 MB, 551550976 bytes, 1077248 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x43756644

     Device Boot      Start         End      Blocks   Id  System
/dev/sdb1p1   *           0     1077247      538624    0  Empty
/dev/sdb1p2            4728       68215       31744   ef  EFI (FAT-12/16/32)

Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes, 2930277168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x31f60035

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1              63  2930272064  1465136001   83  Linux

Disk /dev/sdd: 1000.2 GB, 1000203804160 bytes, 1953523055 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1              63  1953520064   976760001   83  Linux

Disk /dev/sde: 3000.6 GB, 3000592982016 bytes, 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/sdf: 160.0 GB, 160040803840 bytes, 312579695 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000c4ba1

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1            2048   293603327   146800640   83  Linux
/dev/sdf2       293603328   312579694     9488183+  83  Linux

Disk /dev/sdg: 3000.6 GB, 3000591900160 bytes, 5860531055 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdg1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/mapper/arch_root-image: 1561 MB, 1561329664 bytes, 3049472 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

root@archiso ~ # stat /dev/sdg1
stat: cannot stat â/dev/sdg1â: No such file or directory
1 root@archiso ~ # stat /dev/sdg1                                                                                            sad
stat: cannot stat â/dev/sdg1â: No such file or directory
1 root@archiso ~ # stat: cannot stat dev/sdg1 No such file or directory                                                      sad
zsh: correct 'stat:' to 'stat' [nyae]? n
zsh: command not found: stat:
127 root@archiso ~ # sudo fdisk -l | less                                                                                    sad
/dev/sdc1              63  2930272064  1465136001   83  Linux

Disk /dev/sdd: 1000.2 GB, 1000203804160 bytes, 1953523055 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1              63  1953520064   976760001   83  Linux

Disk /dev/sde: 3000.6 GB, 3000592982016 bytes, 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/sdf: 160.0 GB, 160040803840 bytes, 312579695 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000c4ba1

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1            2048   293603327   146800640   83  Linux
/dev/sdf2       293603328   312579694     9488183+  83  Linux

Disk /dev/sdg: 3000.6 GB, 3000591900160 bytes, 5860531055 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdg1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/mapper/arch_root-image: 1561 MB, 1561329664 bytes, 3049472 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Log file is already in use  (press RETURN)

dmesg http://bpaste.net/show/142956/


lsblk -f     

                                                                                           sad

NAME              FSTYPE   LABEL       UUID                                 MOUNTPOINT
sda
ââsda1            ext4     1TB-D       fc268167-056f-4e5b-9e02-74626236a500 /mnt/1
sdb               iso9660  ARCH_201308 2013-08-01-08-13-08-00
ââsdb1            iso9660  ARCH_201308 2013-08-01-08-13-08-00               /run/archiso/bootmnt
ââsdb2            vfat     ARCHISO_EFI 8567-F798
sdc
ââsdc1            ext4     1.5TB-F     0fba37d8-a29a-4214-a5b7-f725de4bbb4e /mnt/2
sdd
ââsdd1            ext4     1TB-C       d5651eb3-6e63-4e27-a13d-a02eb13983c6 /mnt/3
sde
ââsde1            ext4                 7d7c8734-b060-4715-a867-3886dddf54e6 /mnt/4
sdf
ââsdf1            ext4                 87c51044-75cf-496c-9733-936047c5ec18
ââsdf2            swap                 2cfb72c0-4d1e-450c-a807-6875fa094543
sdg
loop0             squashfs                                                  /run/archiso/sfs/root-image
loop1             ext4                 46e2ebd2-7640-49d1-89e9-a45d6e236fa7
ââarch_root-image ext4                 46e2ebd2-7640-49d1-89e9-a45d6e236fa7 /
loop2             ext4                 46e2ebd2-7640-49d1-89e9-a45d6e236fa7
ââarch_root-image ext4                 46e2ebd2-7640-49d1-89e9-a45d6e236fa7 /

It's a fresh HDD, couple of weeks old, seagate 3TB, partioned with GPT/EXT4. I have over 300GB stored of PERSONAL video files on this HDD.

Please is there away at all to get access to my files? I just want to transfer the files I have on the hdd onto another one.

And perhaps re-partion this HDD. How can a hdd just stop working like this?


Is there a "magical" way i'm suppose to partition a 3TB hdd? My other 3TB works just fine. I'm quite puzzled here gentlemen smile

2

Re: 3TB, GPT, HPA enabled culprit gigabyte [SOLVED]

It looks like your 3 TB drive contains a GUID Partition Table (GPT) and not an MSDOS Partition Table (also known as MBR).  This is to be expected because MSDOS partition tables are limited to 2 TB.  This can be seen in the first fdisk command output which has a id type of 'ee' indicating a protective MBR.

To view the partition table layout in GPT, try using:

gdisk /dev/sdg

When you ran testdisk did you use the latest version?  Also did you write any changes back to the disk?

3 (edited by greenfish 2013-10-23 22:42:24)

Re: 3TB, GPT, HPA enabled culprit gigabyte [SOLVED]

gedakc wrote:

It looks like your 3 TB drive contains a GUID Partition Table (GPT) and not an MSDOS Partition Table (also known as MBR).  This is to be expected because MSDOS partition tables are limited to 2 TB.  This can be seen in the first fdisk command output which has a id type of 'ee' indicating a protective MBR.

To view the partition table layout in GPT, try using:

gdisk /dev/sdg

When you ran testdisk did you use the latest version?  Also did you write any changes back to the disk?

Hi! I actually re-partioned the whole HDD, and made a new filesystem. A few hours later, i'm back to the same issue if not worse. I just backed up over 2TB data that are crucial, i'm TERRIFIED i've lost everything AGAIN.

I just don't understand what's going on. Yeah I used the latest testdisk. Didn't write any changes.

I move the HDD from my server - htpc (all running linux) a few hours later when I reboot the whole error started again "mount point device not found"

This is the output from gdisk:


Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Warning! One or more CRCs don't match. You should repair the disk!

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.

v

Caution: The CRC for the backup partition table is invalid. This table may
be corrupt. This program will automatically create a new backup partition
table when you save your partitions.

Problem: The secondary header's self-pointer indicates that it doesn't reside
at the end of the disk. If you've added a disk to a RAID array, use the 'e'
option on the experts' menu to adjust the secondary header's and partition
table's locations.

Problem: Disk is too small to hold all the data!
(Disk size is 5860531055 sectors, needs to be 5860533168 sectors.)
The 'e' option on the experts' menu may fix this problem.

Problem: GPT claims the disk is larger than it is! (Claimed last usable
sector is 5860533134, but backup header is at
5860533167 and disk size is 5860531055 sectors.
The 'e' option on the experts' menu will probably fix this problem

Problem: partition 1 is too big for the disk.

Identified 5 problems!



Why is this happening? I've moved countless of HD's from my systems, never had these issues. Hmm I do have a 2nd IDENTICAL 3TB in my HTPC that I bought yesterday, is that the reason why this is happening, 2 -3TB HDD conflicts?

Is it possible to fix this, or did I just lost 2TB again sad

Can you tell me step by step how try to fix this? And why it's happening? Sorry for spelling, I was happy I finally transfered all my files, only to have the same issue arrive again.




EDIT: This time the problem is actually with my new 3TB HDD, yesterday it was the old one. Something is really messed up here. It's like I can't have 2 identical 3TB in my linux system (htpc)?


EDIT2: I have a 2nd 3TB (empty) can I clone the "bad" HDD data to that one, just in case? If so what would be the best way? gdisk tells me to use the option e, I assume I should "w" (write) after i'm done, is this a safe option or should I clone my hdd?

This is how I made the partition: http://amaras-tech.co.uk/article/158/Ub … _3TB_drive

and finally makefs.ext4


mobo on htpc: GA-MA78GM-S2H+additional SATA expansion controller card


Situation:

A -- HTPC, created a new partition/fs for the "bad" hdd I had yesterday

B -- server moved HDD to server, transfered all the files I wanted onto the hdd

A -- Put the HDD back to my htpc, BAM, mount point device not found and then i'm back to square 0 again.

HTPC is already using another 3TB.

4

Re: 3TB, GPT, HPA enabled culprit gigabyte [SOLVED]

http://ubuntuforums.org/showthread.php?t=1956173

Same problem as me. He also moved the hdd. Man i just want to get my data off the hdd and solve this

Had to make a new reply, too many url links acc to forum

5 (edited by greenfish 2013-10-24 22:27:09)

Re: 3TB, GPT, HPA enabled culprit gigabyte [SOLVED]

Update:

Seems like "HPA" is the culprit behind my issues.

My mobo: GA-MA78GM-S2H

http://lime-technology.com/forum/index. … ic=10866.0

Still I need help to get my drive back to working again hmm

[10:10] <ius> greenflower22: hdparm -N /dev/sdX and hdparm --dco-identify /dev/sdX
[10:11] <ius> I suspect you motherboard set a HPA - that's what some gigabyte motherboard tend to do (or used to, at least, someone convinved me a while ago this should no longer happen)


[10:17] <ius> indeed, HPA is set
[10:17] <ius> max sectors   = 5860531055/5860533168, HPA is enabled
[10:18] <ius> (Disk size is 5860531055 sectors, needs to be 5860533168 sectors.)
[10:18] <ius> So what happened is that Gigabyte boards have a feature to backup the BIOS to the end of the primary HDD[10:19] <ius> It used to be buggy on some boards in the past, but if your board is a recent one it's buggy too
[10:19] <ius> That, or it thought the disk was 'empty' (no GPT support?) so it could steal a few sectors
[10:20] <ius> So I recall someone told me newer gigabyte boards have a BIOS setting to disable it
[10:20] <greenflower22> ius, but mine is GA-MA78GM-S2H, let me google it
[10:20] <ius> If you don't disable it and reconnect the drive as the primary disk to the same motherboard it will set the HPA again
[10:20] <ius> Ah, it's an older board, so makes sense.
[10:24] <ius> greenflower22: You can use -N to reset the sector count
[10:26] <ius> greenflower22: Don't immediately see an option in the motherboard manual to disable it. So if you can't disable it, hooking the disk to it as primary will set HPA again later.
[10:26] <ius> So either you can 1) disable HPA and gdisk should be able to restore the backup header (might be some data loss if this disk was full)
[10:27] <ius> 2) leave HPA enabled and see if you can get gdisk to resize the partition
[10:27] <ius> hmm, well, depends on your luck I guess, it's ~1MB
[10:29] <ius> hdparm -N 5860533168 should disable HPA, or hdparm -N p5860533168 if the first doesn't work
[10:29] <ius> Then don't hook it up as primary disk on the gigabyte motherboard, until you have disabled the bios backup or shrunk the partition
[10:34] <ius> If you do that instead of disabling HPA it should work too (but you probably need to resize the FS too)

sudo hdparm -N 5860533168 /dev/sdd

/dev/sdd:
setting max visible sectors to 5860533168 (temporary)
max sectors   = 5860533168/5860533168, HPA is disabled

sudo hdparm -N p5860533168 /dev/sdd
reboot, fixed!

6

Re: 3TB, GPT, HPA enabled culprit gigabyte [SOLVED]

PROBLEM SOLVED!!!!!!

Thanks to ius and this thread: http://lime-technology.com/forum/index. … ic=10866.0

The feeling of having your HDD working again smile

7

Re: 3TB, GPT, HPA enabled culprit gigabyte [SOLVED]

Thank you greenfish for reporting back with links to a thread that helped you solve the problem.

Thanks also for editing your initial post to add SOLVED in the title.  This can help others searching for answers to similar questions.