Monthly Archives: July 2012

3TB partition support in Linux

Make a GPT partition:

parted /dev/sda
mklabel gpt
unit TB
mkpart primary 0 -0
quit

Format with 1% root reservation:

mkfs.ext4 -m1 /dev/sda1

Note: HP Array controller may require firmware update for 3TB disk support.

How to increase VM disk size without re-deploy the machine

Ref: http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=1006371

[root@demo ~]# fdisk /dev/sda

-Create a primary partition-

[root@demo ~]# fdisk -l

Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 1306 9972736 8e Linux LVM
/dev/sda3 1306 6527 41942367+ 83 Linux

[root@demo ~]# pvcreate /dev/sda3
[root@demo ~]# vgextend vg_demo /dev/sda3

[root@demo ~]# vgdisplay vg_demo | grep Free
Free PE / Size 10239 / 40.00 GiB

[root@demo ~]# lvextend -L+40.00G /dev/vg_demo/lv_root

[root@demo ~]# resize2fs /dev/vg_demo/lv_root

Note: I wouldn’t do this for any production system as it looks pretty inefficient way to extend volume size.