1

I have allocated thin provisioning of 15GB when i found 8GB as insufficient. Now debian guest is not able to recognize the change of size.

root@debian7-x64:~# lvdisplay
--- Logical volume ---
LV Path                /dev/debian7-x64/root
LV Name                root
VG Name                debian7-x64
LV UUID                EU6mg0-XTXC-ci3D-bQJi-7XN6-r8Hp-SYxcj0
LV Write Access        read/write
LV Creation host, time debian7-x64, 2013-06-25 12:02:49 +0530
LV Status              available
# open                 1
LV Size                7.39 GiB
Current LE             1892
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     256
Block device           254:0

--- Logical volume ---
LV Path                /dev/debian7-x64/swap_1
LV Name                swap_1
VG Name                debian7-x64
LV UUID                xDNtoz-tJUq-M5D6-GGCN-gzcD-fwUv-fYYDR1
LV Write Access        read/write
LV Creation host, time debian7-x64, 2013-06-25 12:02:49 +0530
LV Status              available
# open                 2
LV Size                376.00 MiB
Current LE             94
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     256
Block device           254:1

root@debian7-x64:~# pvdisplay
--- Physical volume ---
PV Name               /dev/sda5
VG Name               debian7-x64
PV Size               7.76 GiB / not usable 2.00 MiB
Allocatable           yes (but full)
PE Size               4.00 MiB
Total PE              1986
Free PE               0
Allocated PE          1986
PV UUID               SehkzH-Gq8Y-jI2f-27Tb-uv1Z-tR1R-5OnTxR

root@debian7-x64:~# sfdisk -s
/dev/sda:  15728640
/dev/mapper/debian7--x64-root:   7749632
/dev/mapper/debian7--x64-swap_1:    385024
total: 23863296 blocks

Help me to extend this partition. No problem in rebooting. I dont have any live CD.

Environment : debian 7, with lvm, on vsphere, ext4 partition. Can provide more details when needed.

4
  • What commands did you use? Commented Jun 26, 2013 at 5:35
  • I tried lvextend -L+2GB /dev/mapper/debian7--x64-root and resize2fs /dev/mapper/debian7--x64-root Commented Jun 26, 2013 at 5:46
  • Please avoid cross-posting to multiple Stack Exchange network sites. Commented Jun 26, 2013 at 5:47
  • @MichaelHampton, sorry i was in hurry and dint get response.. will delete from other sites. Commented Jun 26, 2013 at 5:49

1 Answer 1

1

The steps are:

  1. resize the physical volume:

    # pvresize /dev/sda5
    
  2. resize the logical volume:

    # lvresize -L+2GB /dev/mapper/debian7--x64-root
    
  3. resize the filesystem:

    resize2fs /dev/mapper/debian7--x64-root
    

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .