How to increase CentOS 6 disk size?

To increase the disk size of a CentOS 6 virtual machine follow the instruction:

1. Increase the disk size in the properties of the virtual machine in accordance with the article.

2. Reboot the virtual machine and specify the name of the expandable disk with the fdisk -l command.

3. Create a partition:

      a. run fdisk / dev / sda.

      b. press p to display the partition table and determine the free number.

      c. press n to create a partition, specify its type (primary) and number.

      d. Confirm the default partition borders by pressing Enter.

      e. change the type of the created partition with the t command.

       f. save the partition table with the w command.

4. Reboot the virtual machine or type partprobe 

5. Run the pvcreate / dev / sda3 command to create the physical volume.

6. View information about volume groups using the vgdisplay command and expand the desired group with the vgextend command.

7. View the logical volume information with the lvdisplay command and expand the desired volume with the lvextend -l + 100% FREE command.

8. Use the resize2fs command to expand the file system on the logical volume.

 

  • 70 Users Found This Useful
Was this answer helpful?

Related Articles

How to decrease CentOS 6 disk size?

To reduce the disk size of the CentOS 6 virtual machine, you will need to use the old version of...

How to fix Read Only File System in Linux

    A file system can be corrupted due to various malfunctions or sudden shutdown of the...