cannot create 2TB partition in Linux

I have slackware 14.1. I am trying to use fdisk version 2.21.2 to create a 2TB partition. the 'p' command shows the right number of sectors, but can only use up to 1TB worth. If I specify cylinders beyond that, it truncated it back to 1TB.

How do I fix this?

Could this be a 32bit versus 64bit OS issue?
LVL 1
jmarkfoleyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gerwin Jansen, EE MVETopic Advisor Commented:
Which file system are you trying to create?
0
ThomasMcA2Commented:
The man page for fdisk says it is not designed for large partitions. It says to use parted instead.
0
jmarkfoleyAuthor Commented:
Gerwin Jansen: > Which file system are you trying to create?

ext4

ThomasMcA2: > The man page for fdisk says it is not designed for large partitions. It says to use parted instead.

I will investigate parted, but the man page doesn't really define what it means by "large partitions". It mentions GPTs (GUID Partition Tables), but that doesn't tell me much. I'll investigate GPTs further as well. However, searches reveal all kinds of links on how to create partitions *larger* than 2TB, so it seems that 2TB should be doable, no?

One link on GPT: https://plone.lucidsolutions.co.nz/linux/io/using-gnu-parted-to-create-a-gpt-for-a-device-2tb says, "Using a MBR (master boot record) style partition table it is not possible to have a partition larger than 2TB. Use a GPT (Guid Partition table) to overcome this limitation." so it seems that up to 2TB should be possible normally.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

ThomasMcA2Commented:
Since 2TB is the maximum that the technology can support, don't you think that qualifies as "large"?

I never said that 2TB partitions are not doable, they're just not doable using fdisk.
0
jmarkfoleyAuthor Commented:
parted seems like a fine way to go. However, I *have* created 2TB partitions with fdisk before! Here is one I created a year-and-a-half ago on slackware 13.37.0:
$ fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 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 identifier: 0x3127f1d2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048  3907029167  1953513560   fd  Linux raid autodetect

Open in new window

and, it's running on a 32bit Linux kernel. So, what's the different? Perhaps a setting in the bios? I'll check that as soon as I can get back to the machine.
0
ThomasMcA2Commented:
I would expect any differences to happen because of different versions of fdisk. On my openSUSE distro, fdisk comes from util-linux 2.23.2.
0
jmarkfoleyAuthor Commented:
OK, I've sorted this out. The as-shipped fdisk does work for 2TB drives if you use the +xG size specification. When I tried calculating the ending sector number allowing for a 8GB swap partition, fdisk apparently didn't like the sector number I came up with and simply defaulted to 1TB.

If I specified +1900G, I got an "out of range" error.

If I specified +1800G, it worked.

I could then specify +8G for a swap partition leaving me about 60GB leftover.

This'll do until we go to 3+TB drives!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jmarkfoleyAuthor Commented:
I figured out how to use fdisk
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.