blog posts

An Introduction to Disk Partitions On CentOS 7

Why is CentOS 7 partitioning important?

Partitioning CentOS 7 – If you are the first to install CentOS 7 on your disk or virtual machine, you need to pay attention to one important thing. To manage the partitioning (how the operating system divides the disk space) of your disk in the best way.

For example, if you have a 100 GB disk, the operating system will probably partition 50 GB for /home (users) and about 50 GB for opt or root and boot. SMx installations in the OS are placed in /opt by default, meaning on a 100GB disk you only have 50GB for SMx.

If you’ve never manually partitioned a disk before, don’t worry. In this article, we will help you step by step. We create a virtual machine in ESXi with 8 processors, 32 GB of RAM and a 250 GB virtual disk. I also use CentOS 7 with minimal capabilities. (Using the full install means you’ll get a GUI that uses more resources). You can replace VMware ESXi with other hypervisors. But at the time of writing this article, ESXi is the most widely used.

Here we assume that you have placed the CentOS 7 iso file into the virtual drive of the VM or inserted the disc into the CD-Rom of the server and are booting into the CentOS 7 installer. If your disk is blank and no operating system is installed on it, you should see the following screen in the ESXi/vSphere console or on the monitor.

To continue the CentOS 7 partitioning process, follow the steps below.


Buying all kinds of Linux servers with the best price and hardware from

1. On the page that opens for you, first select the “Installation Destination” option.

2. Select “I will configure partitioning” and click “Done”. For this example, we want to create:

  • partition boot/ with a volume of 500 MB
  • swap partition (LVM) with 32 GB of space (because we have 32 GB of RAM)
  • Setting the remaining space for root/ of LVM type

3. Click the [+] button to start. Then you must select “boot/” for the “Mount Point” option. For the desired capacity, we will use 512 MB as shown below.

4. Next, set “Device Type” to “Standard” and “File System” to “ext4”.

5. Then you need to create the swap partition. Click the [+] icon again. Enter the mount point “swap” and the desired capacity, which should be at least 32 GB of RAM. as shown below:

6. For this, set “Device Type” to “LVM” and “File System” to “swap”.

7. The last step of this tutorial is to create the root partition. Click the [+] icon and select “/” as the mount point. Set the desired capacity to “max”. It means to use all the remaining space.

8. Finally, select LVM and ext4 for settings.

9. Finally, click Done and continue the installation.


As you can see, we were able to custom partition our server disk for CentOS 7 operating system very easily and without any problems.