LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 12-14-2016, 05:07 AM   #1
cardogar
LQ Newbie
 
Registered: Sep 2014
Location: berlin
Distribution: ubuntu, fedora
Posts: 9

Rep: Reputation: 0
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.
 
Old 12-14-2016, 06:03 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
 
Old 12-14-2016, 06:17 AM   #3
cardogar
LQ Newbie
 
Registered: Sep 2014
Location: berlin
Distribution: ubuntu, fedora
Posts: 9

Original Poster
Rep: Reputation: 0
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
 
Old 12-14-2016, 04:59 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
free(): invalid next size(fast) // malloc(): memory corruption - ROOT CERN tristandnv Programming 8 02-13-2013 08:19 AM
Free space not showing correct after increasing root partition size with GParted. avanindra Linux - Newbie 3 08-06-2009 07:49 AM
LVM Resize - After logical resize, FS size does not match physical size. spectra Linux - Software 6 11-01-2006 11:28 AM
Resize a file with a size of 0 smaudlin Linux - General 2 11-12-2005 12:33 AM
cant resize root thru rescue, auto mounts root dir absolutal Linux - Newbie 0 06-18-2003 03:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 09:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration