Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GPT 4TB not recognized
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 568

PostPosted: Thu May 28, 2015 4:33 pm    Post subject: GPT 4TB not recognized Reply with quote

Hi,

Iam trying to use a GPT partitioned HDD. The HDD has been partitioned using gentoo on another box.

However now I get unknown partition table, but fdisk seems to recognize the table

Is there any kernel option I forgot?? Is it an issue that the system is 32bit?

Code:

sd 13:0:0:0: Attached scsi generic sg3 type 0
[10701549.279594] sd 13:0:0:0: [sdd] 976754646 4096-byte logical blocks: (4.00 TB/3.63 TiB)
[10701549.280092] sd 13:0:0:0: [sdd] Write Protect is off
[10701549.280097] sd 13:0:0:0: [sdd] Mode Sense: 03 00 00 00
[10701549.280605] sd 13:0:0:0: [sdd] No Caching mode page found
[10701549.280609] sd 13:0:0:0: [sdd] Assuming drive cache: write through
[10701549.284718] sd 13:0:0:0: [sdd] 976754646 4096-byte logical blocks: (4.00 TB/3.63 TiB)
[10701549.287226] sd 13:0:0:0: [sdd] No Caching mode page found
[10701549.287230] sd 13:0:0:0: [sdd] Assuming drive cache: write through
[10701549.297637]  sdd: unknown partition table
[10701549.305600] sd 13:0:0:0: [sdd] 976754646 4096-byte logical blocks: (4.00 TB/3.63 TiB)
[10701549.306591] sd 13:0:0:0: [sdd] No Caching mode page found
[10701549.306595] sd 13:0:0:0: [sdd] Assuming drive cache: write through
[10701549.306600] sd 13:0:0:0: [sdd] Attached SCSI disk




Code:

server ~ # LANG="en" fdisk /dev/sdd

Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sdd: 3.7 TiB, 4000787030016 bytes, 976754646 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start        End    Sectors Size Id Type
/dev/sdd1           1 4294967295 4294967295  16T ee GPT


Command (m for help):
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2971
Location: Germany

PostPosted: Thu May 28, 2015 4:40 pm    Post subject: Reply with quote

Missing GPT support in the kernel?

CONFIG_EFI_PARTITION=y


Another issue is sector size, if the disk is an external enclosure... 4k vs. 512 byte sector disks are incompatible to each other. (Linux could support it either way but for some reason it does not)
Back to top
View user's profile Send private message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 568

PostPosted: Thu May 28, 2015 5:23 pm    Post subject: Reply with quote

The sector size is determined by the usb/sata bridge? what a bummer.. I thought they would only kinda forward the data.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6194

PostPosted: Thu May 28, 2015 7:03 pm    Post subject: Reply with quote

Also, if the disk is GPT-partitioned, you probably want sys-apps/gptfdisk.
Back to top
View user's profile Send private message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 568

PostPosted: Thu May 28, 2015 7:26 pm    Post subject: Reply with quote

kernel option seems to be OK

Code:

7736-CONFIG_SGI_PARTITION=y
7759-CONFIG_ULTRIX_PARTITION=y
7785-CONFIG_SUN_PARTITION=y
7808-CONFIG_KARMA_PARTITION=y
[b]7833:CONFIG_EFI_PARTITION=y[/b]
7856-CONFIG_SYSV68_PARTITION=y
7882-# CONFIG_CMDLINE_PARTITION is not set


this means that the issue is probably the wrong sector size. oh man this means I need a second machine to copy my data from a to b
(there is a 2x3tb soft-raid that needs copying onto a 2x4tb soft-raid), then the HDDs will be exchanged.
Back to top
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 309

PostPosted: Thu May 28, 2015 7:34 pm    Post subject: Reply with quote

If you put an internal disk into USB enclosure, and the enclosure change sector size from 512 to 4K, the partition will corrupt and unfixable.
With 4K sector size, you don't need GPT label, traditional dos label support up to 16T w/ 4K sectorsize.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43758
Location: 56N 3W

PostPosted: Thu May 28, 2015 7:40 pm    Post subject: Reply with quote

bastibasti,

A few things, first,
Code:
Disk /dev/sdd: 3.7 TiB, 4000787030016 bytes, 976754646 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start        End    Sectors Size Id Type
/dev/sdd1           1 4294967295 4294967295  16T ee GPT
shows the 'protective MSDOS partition table you get for free with a GPT disklabel.
Thats not the real GPT partition table.
Notice Disk /dev/sdd: 3.7 TiB and the 16T partition size.

Try parted to show the real partition table.

Code:
CONFIG_EFI_PARTITION=y
is correct for GPT. Are you sure that you are running the kernel that belongs to that config?

You are making hard work of extending your raid. If its mdadm raid1, you can replace the drives in turn. its not quite that simple but I will explain in more detail if that is what you want to accomplish.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 568

PostPosted: Thu May 28, 2015 8:11 pm    Post subject: Reply with quote

Quote:

With 4K sector size, you don't need GPT label, traditional dos label support up to 16T w/ 4K sectorsize.


well thats it then. When I created the partitions (using internal sata) fdisk complained that I MUST use GPT - if the USB now shows a setor size where its not neccessary the sector size differs....

I will put one of the hdds on an internal sata controller and recheck it - in that case I will do the safe way and use a second pc.

Quote:

Are you sure that you are running the kernel that belongs to that config?


quite sure. I guess there's no way of telling. The config was in /boot - as I always use make install I assumed it would be the correct one. But I can also be wrong of course. Before restarting the machine without backup (and loading a newer kernel that defenetly has this option enabled) I will rather retry the disk in another machine... ;-)
Back to top
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 309

PostPosted: Thu May 28, 2015 9:09 pm    Post subject: Reply with quote

Using loopdev would revert sector size to 512. So add "loop.max_part=15" to kernel parameters or "modprobe loop max_part=15", then "losetup -f /dev/sdd".

[quote="bastibasti"]
Quote:

well thats it then. When I created the partitions (using internal sata) fdisk complained that I MUST use GPT - if the USB now shows a setor size where its not neccessary the sector size differs....

I will put one of the hdds on an internal sata controller and recheck it - in that case I will do the safe way and use a second pc.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6194

PostPosted: Thu May 28, 2015 11:15 pm    Post subject: Reply with quote

bastibasti wrote:
Quote:

Are you sure that you are running the kernel that belongs to that config?


quite sure. I guess there's no way of telling.


...I'd say 'less /proc/config.gz' is pretty conclusive unless you've worked hard to fake it.
Back to top
View user's profile Send private message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 568

PostPosted: Fri May 29, 2015 5:44 am    Post subject: Reply with quote

Wow

learned 5 new thing of one single issue. Thats pretty cool.

Kernel is not the issue - so I guess the loop thing will be my next candidate to give a try

Thank you all for assisting so cool. I will try it when I get home from work tonight... :D
Back to top
View user's profile Send private message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 568

PostPosted: Fri May 29, 2015 11:21 am    Post subject: Reply with quote

Thats crazy!Thanks!

I setup the drive by using

losetup -f /dev/sdd
then I
partprobe /dev/loop0

and mdadm was able to detect the raid.

Is this safe to use?
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2971
Location: Germany

PostPosted: Fri May 29, 2015 1:26 pm    Post subject: Reply with quote

bastibasti wrote:
Is this safe to use?


Not in the long term. But as long as your partitions are aligned and not off-by-512 you can just re-create the partition table for the 4K side of things.

I.e. check `parted /dev/loop0 unit b print` of offsets and sizes in bytes.

and then create those same partitions on /dev/sdx.

This could be supported directly by Linux. It should ignore the sector size the disk reports and just look at GPT header with offset 512 or 4096 bytes and use that accordingly. But alas, we have this situation instead where a simple change of enclosure can render the disk unusabel.
Back to top
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 309

PostPosted: Fri May 29, 2015 4:23 pm    Post subject: Reply with quote

If filesystem hard reference sector# (eg: FAT & NTFS) or fs blocksize less than 4K, or RAID metadata not 4K aligined, re-create method doesnit work. And some circumstance, larger sectorsize use more metadata, you can't re-create partition at same position and size.

frostschutz wrote:
bastibasti wrote:
Is this safe to use?


Not in the long term. But as long as your partitions are aligned and not off-by-512 you can just re-create the partition table for the 4K side of things.

I.e. check `parted /dev/loop0 unit b print` of offsets and sizes in bytes.

and then create those same partitions on /dev/sdx.

This could be supported directly by Linux. It should ignore the sector size the disk reports and just look at GPT header with offset 512 or 4096 bytes and use that accordingly. But alas, we have this situation instead where a simple change of enclosure can render the disk unusabel.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum