I ordered a dedicated server and it came with a primary partition of 20gb and a second partition of 1.8TB. I see no point in this as I plan to use it as a web server. As such I need to put pretty much everything into /var. I have rebooted in rescue mode and I have deleted the 1.8TB partition. My FS now looks like thisNAME   MAJ:MIN RM    SIZE RO TYPE MOUNTPOINTsda      8:0    0    1.8T  0 disksda1   8:1    0 1004.5K  0 partsda2   8:2    0   19.5G  0 partsda4   8:4    0    511M  0 partI thought I could use the partid app to resize the primary (sda2) partition (https://www.centos.org/docs/5/html/5.2/Deployment_Guide/s2-disk-storage-parted-resize-part.html), but when I run the command it tells me it is no longer supported. Error: The resize command has been removed in parted 3.0I found another tutorial that said to use resize2fs. I ran the command and I get the following.root@rescue:~# resize2fs /dev/sda2resize2fs 1.42.12 (29-Aug-2014)The filesystem is already 5119744 (4k) blocks long.  Nothing to do!I have around 1.7TB of free space that is not assigned to any partition. All I want to do is assign all of this space to sda2. This is the primary partition and I want it to have all of the space. Am I missing something simple here?The lvextend command seems to be along the right lines, but still it doesn't work.root@rescue:~# lvextend -L +1700G /dev/sda2  Path required for Logical Volume sda2  Please provide a volume group name  Run `lvextend --help' for more information.
Can't resize main partition on CentOS 7
centos;partition;resize2fs
resize2fs complains it has nothing to do because it only works at filesystem size. First you have to grow the partition size underneath it with fdisk,  cfdisk or parted. https://geekpeek.net/resize-filesystem-fdisk-resize2fs/Similar with LVM, it needs more free partition space to grow, or a new partition added to the LVM volume group.https://www.turnkeylinux.org/blog/extending-lvm