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 vCloud Director based on Flash. To access Flash interface it is needed to add to the link  https://vcd.cloud4y.ru/cloud/org/ (https://vcdfz.cloud4y.ru/cloud/org/ for FZ-152 cloud) your company name in the manner it is specified in FLASH interface. For example, https://vcd.cloud4y.ru/tenant/org-name получается https://vcd.cloud4y.ru/cloud/org/org-name


1. Add a disk for data transfer (smaller size). Change the boot order using Unit Number, similar to what is shown on the picture.

 

Добавьте диск под перенос данных(меньшего размера). Поменяйте порядок загрузки с помощью Unit Number, по аналогии с рисунком. 


2. Boot the system from the iso image of Clonezilla Live. On the menu that is shown in the picture, select Enter command line prompt.



3. Type sudo su root, then fdisk -l to define disk names. Copy part of the working disk from the first sector along the border of the boot partition 
to a new one. 


4. Correct the partition table on the new disk using fdisk /dev/sda. To do this, delete all partitions except the first one, then select all free space for a partition of the type LVM (8e).


5. Define the name of the volume group, convert the created partition to the physical volume, and expand the necessary group.


6. Determine the name of the decreasing logical volume, check the file system on it, and reduce its size by a bit more than planned.


7. Reduce the logical volume, align the file system size and check again.


8. Transfer data to the new physical volume and remove the vacant volume from the group.


9. Turn off the system and remove the original disk.

Have you tried Cloud4U cloud services? Not yet?

Go to the Main Website

Try for free

  • 71 Users Found This Useful
Was this answer helpful?

Related Articles

How to fix Read Only File System in Linux

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

How to increase CentOS 6 disk size?

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