Monday, June 20, 2011

How to do Large partions >2 TB, Gparted

To Create a Partition of more than 2 TB, Gparted is used.
You must include GPT support in kernel in order to use GPT. If you don’t include GPT support in Linux kernelt, after rebooting the server, the file system will no longer be mountable or the GPT table will get corrupted. By default Redhat Enterprise Linux / CentOS comes with GPT kernel support. However, if you are using Debian or Ubuntu Linux, you need to recompile the kernel. Set CONFIG_EFI_PARTITION to y to compile this feature.
Creating Partion of 4 TB
# parted /dev/sdx
Here x can be b,c,d..
I take eg . with b
Creates a new GPT disklabel i.e. partition table
#mklabel gpt
Creating 4 TB partition
#mkpart primary 0 4001G
Quit and Save the changes
Formatting the partition with ext4 file system
#mke2fs -t ext4 /dev/sdb1
Also update fstab entry for boot time mounting.
If we have External storage disk (NAS,SAN,USB)
U must update File system checking ,in my case file system will be updated after 800 mounts
#tune2fs -c 800 /dev/sdb1
More Tricks, We can also use
# mkpart primary 0 -0
This will tell parted to fill up the entire drive with one volume.
EXT3 on most systems the max block size is 4096 bytes, which will still limit you to ~8TB for your filesystem.