How To Create more than 2TB Partitions in Linux | Arkit

Directly creating partitions more than 2TB is not possible with MBR disk format. Then how? Creating partitions larger than 2TB in Linux is possible with GPT disk format. Is there any possibility that can i convert basic disk (MBR format) to dynamic? No you can’t directly convert basic disk to dynamic.

Linux Creating partitions larger than 2TB

GUID Partition Table (GPT) is a standard for the layout of the partition table on a physical storage device used in a desktop or server PC, such as a hard disk drive or solid-state drive, using globally unique identifiers (GUID).

Using parted command you can convert DOS/MBR disk to GPT disk

[root@ARKITDBDR2 ~]# parted /dev/mapper/ORAu01
GNU Parted 2.1
Using /dev/mapper/ORAu01
Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) rm 1
Warning: /dev/mapper/ORAu01 contains GPT signatures, indicating that it has a GPT table. However, it does not have a
valid fake msdos partition table, as it should. Perhaps it was corrupted -- possibly by a program that doesn't understand
GPT partition tables. Or perhaps you deleted the GPT table, and are now using an msdos partition table. Is this a GPT
partition table? Yes/No? yes

(parted) mklabel GPT
(parted) print
Model: Linux device-mapper (multipath) (dm)
Disk /dev/mapper/ORAu01: 6.05TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags

(parted) mkpart primary 0.00TB 6.05TB
(parted) print
Model: Linux device-mapper (multipath) (dm)
Disk /dev/mapper/ORAu01: 6.05TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 0.00TB 6.05TB 6.05TB primary

(parted) 
(parted) quit

Check whether disk converted to GPT successfully or not using fdisk command

# fdisk -l /dev/mapper/ORAu01

Create Logical Volumes Larger than 2TB

Partition has been created successfully now you can use the same disk to create Physical Volume

[root@ARKITDBDR2 ~]# pvcreate /dev/mapper/ORAu01p1
Physical volume "/dev/mapper/ORAu01p1" successfully created

Physical volume created

[root@ARKITDBDR2 ~]# vgcreate VG1 /dev/mapper/ORAu01p1
Volume group "VG1" successfully created.

Volume Group Created

[root@ARKITDBDR2 ~]# lvcreate -n lv1 -l 100%FREE VG21
Logical volume "lv1" created.

Logical volume created with 100% free space. Let’s create an file system and mount

[root@ARKITDBDR2 ~]# vi mkfs.ext4 /dev/VG1/lv1 
mke2fs 1.43-WIP (20-Jun-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=4 blocks, Stripe width=4096 blocks
184549376 inodes, 1476382720 blocks
73819136 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
45056 block groups
32768 blocks per group, 32768 fragments per group
4096 inodes per group
Superblock backups stored on blocks: 
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
102400000, 214990848, 512000000, 550731776, 644972544

Allocating group tables: 0/45056 3540/4505619456/4505633852/45056 done 
Writing inode tables: 0/45056 done 
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 0/45056 10/45056 done

Mount partition permanently by adding a entry into /etc/fstab file. Example as shown below

[root@ARKITDBDR2 ~]# vi /etc/fstab

### Oracle Mount Point ##
/dev/VG1/lv1 /data ext4 defaults 1 2

:wq

Create mount point directory and verify the entry

[root@ARKITDBDR2 ~]# mkdir /data
[root@ARKITDBDR2 ~]# mount -a
[root@ARKITDBDR2 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 185G 12G 164G 7% /
/dev/sda1 488M 129M 324M 29% /boot
/dev/sda6 75G 53M 71G 1% /home
/dev/mapper/VG1-lv1 5.5T 58M 5.2T 1% /data

That’s it. Created partition larger than 2TB and mounted in Linux.

Note: While creating an partition using mkpart from parted command use 1.0MB and leave few MB of free space in disk to avoid below error

Partition 1 does not start on physical sector boundary.

Related Articles

Thanks for your wonderful Support and Encouragement

Ravi Kumar Ankam

My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn More

Leave a Reply

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