Knowledgebase: Linux
Mouting more than 2TB under Linux
Posted by Gurpreet Singh on 22 August 2011 03:34 AM

Problem

Default formatter under Linux fdisk doesnt format partitions more than 2TB. Workaround is described below.

Solution

Enter a shell script, and type: parted /dev/sda or wahever drives need to be formatted

We will have to make the label for the partition.
At the (parted prompt, type:

(parted)mklabel gpt <enter>

The disk geometry for your disk array will be displayed.

Next type:

(parted)p <enter>

This will show you the disk geometry in megabytes for your array (/dev/sda). In your case it would show:

Disk geometry for /dev/sda: 0.000-4800GB

(parted) mkpart
Partition type? [primary]? primary
File system type? [ext2]? ext2
Start? 0
End? 4800
The partition is now created. You can use mkfs to format it.

(parted)mkfs 1 /dev/sda1).

(parted)q

Note: When you use parted to display the partition size (e.g. the p command in parted), it will show an incorrect value for the 'End'. However, the 'Disk geometry' will be displayed correctly.

This would be the display for a 4.3 TByte array with parted:

(parted) p

Disk geometry for /dev/sda: 0.000-4800GB

Disk label type: gpt

Minor Start End Filesystem Name Flags

1 0.017 525335.983 ext3

The '4800' value is correct for GB, but the '525335.983' is incorrect for the End value (it is too small).

After doing this we have to make the partition ext3 as parted doesnt support ext3.

# tune2fs -j /dev/sda2

And you are done. Dont forget to make entries in the fstab file to mount the new made filesystem.

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).