How to create a Linux partition larger than 2TB

Share this post on:

A question I get asked more and more, is how do you create a filesystem larger than 2TB on a linux server. Most admins know how to use fdisk, and then mkfs, but fdisk limits you to a 2T partition on the disk.

An easy way to create a partition larger than 2TB is to use the parted command. In this example, I have a 39T drive, and I want to create a 20T filesystem. On the system, the drive device is /dev/sdb

image

First use parted /dev/sdb to modify the drive. When you start parted you are placed in a command prompt. The first task is to create a drive label, “mklabel gpt”

image

The next task is to create a new 20TB primary partition on the disk, using the command “mkpart primary” The system will ask for the start block, and then the size of the partition. In this example, since I am using an NVME device, I also will get an error about the alignment.

image

The print command will show the new partition

image

Now you can create the filesystem as you normally would.

On the alignment error,  if you look at the logical block size ( 512) and start on the 1st block, you will not get the error;

image

Share this post on:

Author: admin

Erik is currently an Oracle ACE Director and VP of Enterprise Transformation at Mythics, serving as a lead strategist for Federal, State and Local Government and Commercial customers throughout the United States. These customer engagements include enterprise cloud transformations, data center consolidation and modernization efforts, Big Data projects and implementations of Oracle Engineered Systems. He is a board member of the DC metro area National Capital Oracle User Group, a board member of the Independent Oracle Users Group (IOUG), Cloud Computing Special Interest Group (SIG) and he is actively involved with the Oracle Enterprise Manager SIGs. Erik presents frequently at conferences, including Oracle OpenWorld, Oracle FedForum, COLLABORATE and other user groups and conferences around the United States. He has worked with Oracle and Sun Systems since the mid 90s, and is experienced with most of the core Oracle technologies.

When not flying to the far points of the country from the Atlanta Metro area, he enjoys spending time with his family at their observatory, where the telescopes outnumber the people.

View all posts by admin >

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.