1

I need to increase the size of centos_s0106ac9e17b4312300-root

I am trying sudo lvextend -L +10G /dev/mapper/centos_s0106ac9e17b4312300-rootJESSE

but getting Logical volume rootJESSE not found in volume group centos_s0106ac9e17b4312300.

sda                                   8:0    0 447.1G  0 disk  
├─sda1                                8:1    0   200M  0 part  
├─sda2                                8:2    0     1G  0 part  
└─sda3                                8:3    0 445.9G  0 part  
  ├─centos_s0106ac9e17b4312300-swap 253:8    0  31.4G  0 lvm   
  ├─centos_s0106ac9e17b4312300-home 253:9    0 364.5G  0 lvm   
  └─centos_s0106ac9e17b4312300-root 253:10   0    50G  0 lvm   /mnt/centos_s0106ac9e17b4312300-rootJESSE

[liveuser@localhost-live /]$ sudo vgdisplay
  --- Volume group ---
  VG Name               centos00
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               930.31 GiB
  PE Size               4.00 MiB
  Total PE              238160
  Alloc PE / Size       238159 / <930.31 GiB
  Free  PE / Size       1 / 4.00 MiB
  VG UUID               nfnzo3-i6kf-w6Fi-qSgD-UQcj-EAL3-0qrmXK
   
  --- Volume group ---
  VG Name               centos_s0106ac9e17b43123
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <485.09 GiB
  PE Size               4.00 MiB
  Total PE              124182
  Alloc PE / Size       124181 / 485.08 GiB
  Free  PE / Size       1 / 4.00 MiB
  VG UUID               VyxNSf-Ke6x-wVkq-t4Up-UyjQ-Jron-yWLflf
   
  --- Volume group ---
  VG Name               centos_s0106ac9e17b4312300
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               445.93 GiB
  PE Size               4.00 MiB
  Total PE              114159
  Alloc PE / Size       114158 / <445.93 GiB
  Free  PE / Size       1 / 4.00 MiB
  VG UUID               Swvxel-gX0y-q1xF-ZMeU-irH8-9KCu-RHpBPp
   
  --- Volume group ---
  VG Name               nvmeVg
  System ID             
  Format                lvm2
  Metadata Areas        7
  Metadata Sequence No  11
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               0
  Max PV                0
  Cur PV                7
  Act PV                7
  VG Size               <325.94 GiB
  PE Size               4.00 MiB
  Total PE              83440
  Alloc PE / Size       83200 / 325.00 GiB
  Free  PE / Size       240 / 960.00 MiB
  VG UUID               sM2ZQz-ke7H-543U-EylK-pO25-0G6S-jhV57f

1 Answer 1

3

The logical volume is called root, not rootJESSE. It's mounted on /mnt/centos_s0106ac9e17b4312300-rootJESSE but you need to use <vg_name>/<lv_name> for lvextend, not the mountpoint, so you need to run

sudo lvextend -L +10G centos_s0106ac9e17b4312300/root

I would also recommend using --resizefs to resize the filesystem too (otherwise you'd need to do that after the lvextend call with xfs_growfs (for XFS) or resize2fs (for Ext4)).

You also don't have 10 GiB of free space in the centos_s0106ac9e17b4312300 volume group so the lvextend command will still fail. There's no extra space on your sda drive so I'm not sure what is your plan here.

2
  • I was planning on reducing /home and increasing / Nov 2, 2021 at 17:20
  • 1
    That should be possible, if you are not using XFS as filesystem for your /home (which can't be reduced and is default on CentOS) and you need to do that first. You can use the lvreduce command which has same syntax as lvextend. Nov 2, 2021 at 17:43

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.