How to create a partition greater than 2TB in Linux

Due to limitation of fdisk utility, you will not be able to create partition greater than 2TB in linux with fdisk. This is a quick example to show how to create a bigger partition using parted utility.

Check your disk details using fdisk. In this case /dev/sdc is a RAID5 volume (3x physical disks in background).

[[email protected] Unix]# fdisk -l /dev/sdc
Disk /dev/sdc: 3599.5 GB, 3599451029504 bytes, 7030177792 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Start parted with /dev/sdc and check parted options

[[email protected] Unix]# parted /dev/sdc
GNU Parted 3.1
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help
  align-check TYPE N                        check partition N for TYPE(min|opt) alignment
  help [COMMAND]                           print general help, or help on COMMAND
  mklabel,mktable LABEL-TYPE               create a new disklabel (partition table)
  mkpart PART-TYPE [FS-TYPE] START END     make a partition
  name NUMBER NAME                         name partition NUMBER as NAME
  print [devices|free|list,all|NUMBER]     display the partition table, available devices, free space, all found partitions, or a
        particular partition
  quit                                     exit program
  rescue START END                         rescue a lost partition near START and END
  rm NUMBER                                delete partition NUMBER
  select DEVICE                            choose the device to edit
  disk_set FLAG STATE                      change the FLAG on selected device
  disk_toggle [FLAG]                       toggle the state of FLAG on selected device
  set NUMBER FLAG STATE                    change the FLAG on partition NUMBER
  toggle [NUMBER [FLAG]]                   toggle the state of FLAG on partition NUMBER
  unit UNIT                                set the default unit to UNIT
  version                                  display the version number and copyright information of GNU Parted

Check current partitions if any

(parted) print
Model: DELL PERC H730P Mini (scsi)
Disk /dev/sdc: 3599GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number  Start  End  Size  File system  Name  Flags

Create a GPT label

(parted) mklabel gpt

Set the unit to GB (or TB as you need) and create a partition

(parted) unit GB 
(parted) mkpart primary 0 3599.5

Verify partition and exit from parted utility

(parted) print
Model: DELL PERC H730P Mini (scsi)
Disk /dev/sdc: 3599GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number  Start   End     Size    File system  Name     Flags
 1      0.00GB  3599GB  3599GB               primary
(parted) quit
Information: You may need to update /etc/fstab.

Gini Gangadharan

Gineesh Madapparambath | Backpacker, Foodie, Techie | techbeatly.com|rovervibes.com

You may also like...

Leave a Reply

avatar
  Subscribe  
Notify of
%d bloggers like this: