LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   Resize cl-root using free size of sda (https://www.linuxquestions.org/questions/centos-111/resize-cl-root-using-free-size-of-sda-4175595397/)

cardogar 12-14-2016 05:07 AM

Resize cl-root using free size of sda
 
Hi all,

I'm having problems to resize the size originally assigned to cl-root in my CentOS 7.

The CentOS 7 is a virtual machine. I increased the size of the disk from 10GB to 100GB using the corresponding vbox tool.

Then I used a gparted linux live to extend the root partition to the whole size of the disk.

But I don't know now how to increase the size of cl-root.

$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 97.7G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 96.7G 0 part
├─cl-root 253:0 0 8G 0 lvm /
└─cl-swap 253:1 0 1G 0 lvm [SWAP]

fdisk -l

Disk /dev/sda: 104.9 GB, 104857600000 bytes, 204800000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0003bab5

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 204799999 101350400 8e Linux LVM

Disk /dev/mapper/cl-root: 8585 MB, 8585740288 bytes, 16769024 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/cl-swap: 1073 MB, 1073741824 bytes, 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Any help would be very welcome.

syg00 12-14-2016 06:03 AM

Did you search ?. Almost every tech site will have a tutorial on this sort of thing.
Personally I would look to the RHEL LVM Admin Guide. Very good.

cardogar 12-14-2016 06:17 AM

Thanks for your answer.

I finally solved it using the lvm tools. I found as you suggested a very nice guide here
https://linuxconfig.org/linux-lvm-lo...volume-manager

syg00 12-14-2016 04:59 PM

Glad it workd out - learning is always positive.
LVM adds a lot of flexibility to disk management - pays to be aware of what it is capable of.


All times are GMT -5. The time now is 12:47 AM.