0

I have my current partition disk space (found at /dev/mapper/cl-root) set at 50Go on my CentOS server. I want to extend the current disk space (to become 500Go) used in a neat way with commands.

How to do it ?

UPDATE : parted -l lsblk returns /dev/sda, /dev/sdb, /dev/sdc actual sizes and other infos. But what i want is to extend the root partition under /dev/mapper/cl-root which is listed among others with fdisk -l cmd enter image description here enter image description here enter image description here

10
  • Is LVM used and which filesystem is the partition formatted with? Send the output of parted -l, lsblk -o name,fstype,size,fssize,mountpoint,model,vendor, pvs, vgs, lvs commands.
    – Krackout
    Sep 23 '20 at 15:11
  • I will update my answer with the output of that command shortly.
    – welwelwel
    Sep 23 '20 at 16:00
  • i don't think it's LVM based partitions though, filesystem must be FAT32 i guess.
    – welwelwel
    Sep 23 '20 at 17:39
  • File system unallocated.
    – welwelwel
    Sep 24 '20 at 9:39
  • Since you've got /dev/mapper/cl-root LVM is used. Copy - paste the output of the 5 commands in my first comment if you want to get help.
    – Krackout
    Sep 24 '20 at 10:13
1

After evaluating the output of commands and the comments, you need:
(execute these commands as a sudoer user, adding sudo in front or as root)

parted /dev/sda mklabel gpt
parted -a opt /dev/sda mkpart lvm 0% 50%
pvcreate /dev/sda1
vgextend cl /dev/sda1
lvextend -r -l 100%VG cl/root
3
  • ok thanks, and no xfs_global or resize2fs needed in the end ?
    – welwelwel
    Sep 25 '20 at 10:57
  • -r on lvextend does this, resizes filesystem.
    – Krackout
    Sep 25 '20 at 11:05
  • Alright i will try this thanks !
    – welwelwel
    Sep 25 '20 at 11:08
0

Here's a generic answer I gave a few years back, most if not all of it should still work;

How to resize the disk of a Fedora guest VM in VMWare ESXi

2
  • Thanks i'll check this out.
    – welwelwel
    Sep 24 '20 at 11:18
  • sry it's not helping
    – welwelwel
    Sep 25 '20 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.