Linux CENTOS7 LVM

Here’s the output of my df -kh

Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   50G   34G   17G  67% /
devtmpfs                 2.5G     0  2.5G   0% /dev
tmpfs                    2.5G  140K  2.5G   1% /dev/shm
tmpfs                    2.5G  8.9M  2.5G   1% /run
tmpfs                    2.5G     0  2.5G   0% /sys/fs/cgroup
/dev/sda1                497M  133M  365M  27% /boot

I’d like to increase the size of / by 194 GB.

I ran the command lvextend -L +194G /dev/centos/root
I got he message that the filesystem has been resized. I rebooted the system. I’m expecting to see my / to be 244GB. However it isn’t

VOLUME GROUP DETAILS

[root@localhost mapper]# vgdisplay
  --- Volume group ---
  VG Name               centos
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  6
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               249.51 GiB
  PE Size               4.00 MiB
  Total PE              63874
  Alloc PE / Size       63648 / 248.62 GiB
  Free  PE / Size       226 / 904.00 MiB
  VG UUID               icZPDf-z0cO-5qMl-Gbtr-XisU-6ptl-cpG3dz

LOGICAL VOLUME DETAILS

[root@localhost mapper]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/centos/swap
  LV Name                swap
  VG Name                centos
  LV UUID                MzofJC-7I6W-XcM9-xwrT-Ns86-LdYt-OYltON
  LV Write Access        read/write
  LV Creation host, time localhost, 2015-07-02 09:04:52 +1200
  LV Status              available
  # open                 2
  LV Size                4.62 GiB
  Current LE             1184
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:1

  --- Logical volume ---
  LV Path                /dev/centos/root
  LV Name                root
  VG Name                centos
  LV UUID                1J50kj-hcBC-T5rY-y6LV-0xEI-ZVId-qBfgQl
  LV Write Access        read/write
  LV Creation host, time localhost, 2015-07-02 09:04:53 +1200
  LV Status              available
  # open                 1
  LV Size                244.00 GiB
  Current LE             62464
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:0



 /etc/fstab OUTPUT

#
# /etc/fstab
# Created by anaconda on Thu Jul  2 09:04:53 2015
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root /                       xfs     defaults        0 0
UUID=c4f605aa-56b0-4bde-ae0b-ddf6f0e4a983 /boot                   xfs     defaults        0 0
#/dev/mapper/centos-home /home                   xfs     defaults        0 0
/dev/mapper/centos-swap swap                    swap    defaults        0 0

The /root is different from /. How do I extend /dev/mapper/centos-root?


Source: linux

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.