I have a VM I want to increase size of / partition so I increased the disk in VMware and did echo 1> /sys/class/scsi_disk/2:0:0:0/device/rescan and fdisk now sees the disk being bigger . Normally I'd just run e2fsresize or something, but it's a LVM. I tried lvmresize but it does not do anything. How do I go about making the partition bigger?
Here's some info that might help, I'm not really familiar enough with LVM to really know what's going on.
It seems it's stuck at being around 80GB even though there's extra space. I tied pvresize /dev/sda2, it says it does it, but nothing actually changes. I tried parted to resize /dev/sda2 as well and it just errors out saying it can't do it with no details as to why. What else can I try?
Worse case scenario I boot into a gparted cd as this is not a production machine, but I figured the whole point of LVM is that you can do stuff live?
Here's some info that might help, I'm not really familiar enough with LVM to really know what's going on.
#fdisk /dev/sda
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): p
Disk /dev/sda: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a551a
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 10444 83373056 8e Linux LVM
Command (m for help):
lvm> pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name vg_appdev
PV Size 79.51 GiB / not usable 2.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 20354
Free PE 0
Allocated PE 20354
PV UUID 1UgSso-qhOR-EHnJ-1t9i-keC5-auzX-WCN1hw
lvm> lvdisplay
--- Logical volume ---
LV Path /dev/vg_appdev/lv_root
LV Name lv_root
VG Name vg_appdev
LV UUID hjGOAy-MNnn-q72Y-Kmrw-IdvO-dihj-HY3zpd
LV Write Access read/write
LV Creation host, time appdev.loc, 2014-06-29 22:20:32 -0400
LV Status available
# open 1
LV Size 77.54 GiB
Current LE 19850
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Path /dev/vg_appdev/lv_swap
LV Name lv_swap
VG Name vg_appdev
LV UUID jkpedx-5kSB-bET0-VqUa-ctQw-sGvS-2KK2NQ
LV Write Access read/write
LV Creation host, time appdev.loc, 2014-06-29 22:20:50 -0400
LV Status available
# open 1
LV Size 1.97 GiB
Current LE 504
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
lvm> vgdisplay
--- Volume group ---
VG Name vg_appdev
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 10
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 79.51 GiB
PE Size 4.00 MiB
Total PE 20354
Alloc PE / Size 20354 / 79.51 GiB
Free PE / Size 0 / 0
VG UUID P9yuQR-wcEL-RXDl-awZh-GndX-McfC-BIIcXh
lvm> vgs
VG #PV #LV #SN Attr VSize VFree
vg_appdev 1 2 0 wz--n- 79.51g 0
lvm> lvscan
ACTIVE '/dev/vg_appdev/lv_root' [77.54 GiB] inherit
ACTIVE '/dev/vg_appdev/lv_swap' [1.97 GiB] inherit
lvm>
It seems it's stuck at being around 80GB even though there's extra space. I tied pvresize /dev/sda2, it says it does it, but nothing actually changes. I tried parted to resize /dev/sda2 as well and it just errors out saying it can't do it with no details as to why. What else can I try?
Worse case scenario I boot into a gparted cd as this is not a production machine, but I figured the whole point of LVM is that you can do stuff live?