Having trouble with lvextend
I've screwed something up somewhere. sda3 shows 0% free but I'm trying to extend sda2 to the free space I created by adding space in vmware.
I was following this https://kb.vmware.com/s/article/1006371 and last time it worked but I think my dog interrupted me and I screwed something up at some point.
The drive in vsphere is set to 200 GB now, only 100 GB is recognized on sda2.
[root@zabbix ~]# lvscan
ACTIVE '/dev/centos/swap' [5.00 GiB] inherit
ACTIVE '/dev/centos/root' [93.99 GiB] inherit
[root@zabbix ~]# pvscan
PV /dev/sda2 VG centos lvm2 [<49.00 GiB / 0 free]
PV /dev/sda3 VG centos lvm2 [<50.00 GiB / 0 free]
Total: 2 [98.99 GiB] / in use: 2 [98.99 GiB] / in no VG: 0 [0 ]
[root@zabbix ~]# vgscan
Reading volume groups from cache.
Found volume group "centos" using metadata type lvm2
[root@zabbix ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 94G 85G 8.9G 91% /
devtmpfs 16G 0 16G 0% /dev
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 16G 8.9M 16G 1% /run
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/sda1 1014M 222M 793M 22% /boot
tmpfs 3.2G 0 3.2G 0% /run/user/0
[root@zabbix ~]# fdisk -l
Disk /dev/sda: 214.7 GB, 214748364800 bytes, 419430400 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: 0x000ba4e5
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 104857599 51379200 8e Linux LVM
/dev/sda3 104857600 209715199 52428800 8e Linux LVM
Disk /dev/mapper/centos-root: 100.9 GB, 100923342848 bytes, 197115904 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/centos-swap: 5368 MB, 5368709120 bytes, 10485760 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
Posted Sep 2, 2018, 3:08 PM UTC
18
Did you extend the file system after extending the lv?
I've tried so much I'm not sure.
[deleted]
your centos vg is still 100 gig in size. It looks like you added sda3 to the centos vg but didn't extend the VG to add more space
vgextendfor this. after you do that expand the root lv on the centos vg (lvextend)and finally expand the file system with that space as well .I'm getting this when I try even though I don't think it is in use.
please show
vgdisplay centos,Have you tried rebooting?