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 increased the size of the partition which I'm using as a LVM PV, but running pvresize doesn't seem to see the extra space:

cuttle:~# fdisk -l /dev/vda

Disk /dev/vda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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: 0x00027dbb

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *           1          31      248976   83  Linux
/dev/vda2              32        2610    20715817+  8e  Linux LVM

Which says that vda2 is about 20gigs

cuttle:~# pvdisplay
  --- Physical volume ---
  PV Name               /dev/vda2
  VG Name               debian
  PV Size               4.76 GiB / not usable 3.08 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              1217
  Free PE               0
  Allocated PE          1217
  PV UUID               tehZic-5vfN-rsrm-B8lN-lpgc-yQT1-ioH1V0

So currently the pv is about 4-5 gigs

cuttle:~# pvresize -v /dev/vda2
    Using physical volume(s) on command line
    Archiving volume group "debian" metadata (seqno 12).
    No change to size of physical volume /dev/vda2.
    Resizing volume "/dev/vda2" to 9975981 sectors.
    Updating physical volume "/dev/vda2"
    Creating volume group backup "/etc/lvm/backup/debian" (seqno 13).
  Physical volume "/dev/vda2" changed
  1 physical volume(s) resized / 0 physical volume(s) not resized

pvresize says "No change to size of physical volume /dev/vda2"

cuttle:~# pvdisplay
  --- Physical volume ---
  PV Name               /dev/vda2
  VG Name               debian
  PV Size               4.76 GiB / not usable 3.08 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              1217
  Free PE               0
  Allocated PE          1217
  PV UUID               tehZic-5vfN-rsrm-B8lN-lpgc-yQT1-ioH1V0

and the size of the pv hasn't changed.

Not sure what else I might do to use the extra space. I suppose I could resize the partition to the size of the pv, then add a second partition, but it really seems to me that what I'm trying to do here should work.

share|improve this question
    
What are the underlying disks? –  Andrew Jul 20 '12 at 1:37
    
they are virtio –  stew Jul 20 '12 at 1:50
    
How did you create this extra space? Did you do the fdisk trick where you switch compatibility mode off, note the starting sector, delete the existing one, and then create the new LVM physical partition using the old starting sector? –  Magellan Dec 25 '12 at 22:02
    
Did this ever get resolved, stew? If not, could you add the output vgdisplay? (Community bump resurrection.) –  Aaron Copley Jan 24 '13 at 16:04
    
Quoting from the man page: "pvresize won't currently work correctly on LVM1 volumes or PVs with extra metadata areas". Is this your case? Also have you tried running with an explicit size, e.g. pvresize --setphysicalvolumesize 15G /dev/vda2? –  Cristian Ciupitu Feb 24 '13 at 15:07

1 Answer 1

partprobe /dev/vda

man partprobe

NAME partprobe - inform the OS of partition table changes

SYNOPSIS partprobe [-d] [-s] [devices...]

share|improve this answer
    
The OS already knows about the correct partition size, and there have been many reboots. –  stew Jul 17 '12 at 14:51
    
Note: partprobe is a part of parted package –  Antonio May 8 '13 at 10:46

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.