Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Xen guest, which its main disk is on an LV (let's call it "domu-disk", VG name "xen"). It's on one single 1T drive at the moment. Inside that domu-disk, it was partitioned into one primary partition and one extended partition, in which is another LVM.

It looks like this from dom0:

# pvdisplay -C
/dev/sdd1                          xen        lvm2 a--  931.51g      0

# vgdisplay -C
VG         #PV #LV #SN Attr   VSize   VFree
xen          1   1   0 wz--n- 931.51g      0

# lvdisplay -C
LV              VG         Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
domu-disk       xen        -wi-ao-- 931.51g

# fdisk -l /dev/xen/domu-disk

Disk /dev/xen/domu-disk: 1000.2 GB, 1000198897664 bytes
255 heads, 63 sectors/track, 121600 cylinders, total 1953513472 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 identifier: 0x0008aaf8

             Device Boot      Start         End      Blocks   Id  System
/dev/xen/domu-disk1   *        2048      499711      248832   83  Linux
/dev/xen/domu-disk2          501758  1953513471   976505857    5  Extended
/dev/xen/domu-disk5          501760  1953513471   976505856   8e  Linux LVM


# kpartx -a /dev/xen/domu-disk

# vgdisplay domu-vg
--- Volume group ---
VG Name               domu-vg
System ID
Format                lvm2
Metadata Areas        1
Metadata Sequence No  8
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                1
Open LV               0
Max PV                0
Cur PV                1
Act PV                1
VG Size               931.27 GiB
PE Size               4.00 MiB
Total PE              238404
Alloc PE / Size       193539 / 756.01 GiB
Free  PE / Size       44865 / 175.25 GiB
VG UUID               0roZhm-2tDa-Y9PZ-ziGK-hyTR-PTER-kwThWu

# lvdisplay domu-vg
--- Logical volume ---
LV Path                /dev/domu-vg/root
LV Name                root
VG Name                domu-vg
LV UUID                BPRFge-lSx7-vGsa-Jdxd-fyQC-U7s8-tQ7QL2
LV Write Access        read/write
LV Creation host, time ,
LV Status              available
# open                 0
LV Size                756.01 GiB
Current LE             193539
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     256
Block device           254:8

This /dev/domu-vg/root was created with a size around 756G initially. Now I want to resize it to use more of the VG's space. However, lvresize is giving me the following errors:

# lvresize -L +100G /dev/domu-vg/root
Extending logical volume root to 856.01 GiB
Insufficient free space: 25600 extents needed, but only 0 available

But from previous vgdisplay of domu-vg, it clear says there is "Free PE/Size 44865/175.25 GiB".

What is wrong here?

Thanks.

share|improve this question
    
Two questions: 1. Are you doing this from dom0? Why? Is it necessary? 2. Are you running without root permissions per chance? - (OK, that's 4 questions if you want to get technical.) –  Felix Frank Jun 23 at 12:21
    
Hi. Yes, I was doing in dom0, cos I thought it is safer to resize it when the domu isn't running. I am running all the commands as root (sorry for all the $ prompt, i'll change them :) –  TDL Jun 23 at 12:39
    
Perhaps an issue with your nested LVM, so that lvresize wrongly scans for free PEs in /dev/xen instead of /dev/domu-vg. As for the cause and possible solution, I have no clear idea. –  Felix Frank Jun 23 at 12:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.