Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

cannot create 2TB partition in Linux

Posted on 2014-08-04
8
Medium Priority
?
258 Views
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?
0
Comment
Question by:jmarkfoley
  • 4
  • 3
8 Comments
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 40240105
Which file system are you trying to create?
0
 
LVL 14

Assisted Solution

by:ThomasMcA2
ThomasMcA2 earned 2000 total points
ID: 40240247
The man page for fdisk says it is not designed for large partitions. It says to use parted instead.
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40240301
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 14

Expert Comment

by:ThomasMcA2
ID: 40240439
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
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40240531
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
 
LVL 14

Expert Comment

by:ThomasMcA2
ID: 40240997
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
 
LVL 1

Accepted Solution

by:
jmarkfoley earned 0 total points
ID: 40246934
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
 
LVL 1

Author Closing Comment

by:jmarkfoley
ID: 40255168
I figured out how to use fdisk
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

569 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