cannot create 2TB partition in Linux

Posted on 2014-08-04
Last Modified: 2014-08-12
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?
Question by:jmarkfoley
    LVL 37

    Expert Comment

    by:Gerwin Jansen
    Which file system are you trying to create?
    LVL 14

    Assisted Solution

    The man page for fdisk says it is not designed for large partitions. It says to use parted instead.
    LVL 1

    Author Comment

    Gerwin Jansen: > Which file system are you trying to create?


    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: 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.
    LVL 14

    Expert Comment

    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.
    LVL 1

    Author Comment

    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.
    LVL 14

    Expert Comment

    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.
    LVL 1

    Accepted Solution

    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!
    LVL 1

    Author Closing Comment

    I figured out how to use fdisk

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
    It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now