Extending and Reducing LVM partitions

Discussion in 'Linux' started by kumaramy, May 4, 2020.

  1. kumaramy

    kumaramy MDL Member

    Feb 16, 2013
    236
    13
    10
    Hello.
    I have following two lvm partitions on my SSD.

    Screenshot from 2020-05-04 21-42-56.png

    Screenshot from 2020-05-04 21-42-56.png

    But, imaging if i need to extend the /dev/sda2 LVM (root partition) then is it possible to extend ?
    I have this question because
    # pvs
    PV VG Fmt Attr PSize PFree
    /dev/sda2 rhel_classroom lvm2 a-- <130.00g 0
    /dev/sda3 rhel_home lvm2 a-- 101.88g 0

    Means:
    pv sda2 is assigned to vg rhel_classroom
    pv sda3 is assigned to vg rhel_home

    # lvs
    LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
    root rhel_classroom -wi-ao---- <130.00g
    home rhel_home -wi-ao---- 101.88g

    Now if i need to extend /dev/sda2's LVM i.e root lvm and there is free space in /dev/sda3 (/home's lvm) then can rhel_home VG share it's free space with root LV?

    also vice versa if i need to extend home LV and root LV has free space then can rhel_classroom VG share it's free space with home LV?

    Thanks.
     

    Attached Files:

  2. windsman

    windsman MDL Expert

    Jan 11, 2010
    1,491
    1,350
    60
    I think you can but there are others places where configurations parameters are stored like services/daemons, /etc, /var/lib, /var/spool, and /home for applications, it depends of distro.

    windsman.