[linux-lvm] pvmove -- not enough free/allocatable physical extends .. but: there had to be enough!

Andreas Dilger adilger at turbolabs.com
Tue Feb 26 10:56:02 UTC 2002


On Feb 26, 2002  14:50 +0100, Müßig-Trapp, Peter wrote:
> My plan is, to remove a partition (/dev/hda4) from lv and use
> it seperatly (mount it on /usr).
> 
> I tried pvmove and get errors:
> 
> root at icezentral:/home/muessig > pvmove /dev/hda4 /dev/hdb1
> pvmove -- moving physical extents in active volume group "daten"
> pvmove -- WARNING: if you lose power during the move you may need to
> restore your LVM metadata from backup!
> pvmove -- do you want to continue? [y/n] y
> pvmove -- not enough free/allocatable physical extents
>  
> Than I used pvscan to check pv and see, there are no extends
> allocatable (on each partition 0 free). How is that possible?
> df tells me, there enough space available.
> 
> root at icezentral:/home/muessig > pvscan
> pvscan -- reading all physical volumes (this may take a while...)
> pvscan -- ACTIVE   PV "/dev/sda1" of VG "daten" [8.51 GB / 0 free]
> pvscan -- ACTIVE   PV "/dev/sdb1" of VG "daten" [8.51 GB / 0 free]
> pvscan -- ACTIVE   PV "/dev/sdc1" of VG "daten" [4.25 GB / 0 free]
> pvscan -- ACTIVE   PV "/dev/hda4" of VG "daten" [5.05 GB / 0 free]
> pvscan -- ACTIVE   PV "/dev/hdb1" of VG "daten" [57.27 GB / 0 free]
> pvscan -- total: 5 [83.59 GB] / in use: 5 [83.59 GB] / in no VG: 0 [0]

This is correct, you have no PEs free on hdb1.

> root at icezentral:/home/muessig > df -h 
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/hda3             2.5G  2.2G  163M  94% /
> /dev/hda1              15M  3.3M   11M  23% /boot
> /dev/daten/1           84G   22G   61G  27% /daten

The 'df' command is telling you how much free space is in the filesystem.
Obviously you have a lot of free space in the _filesystem_ because you have
allocated all of your PEs to it.

What you need to do is reduce the size of your /daten filesystem (it needs
to be unmounted to do this) and also reduce the size of the daten/1 LV by
at least 5.1 GB.  If you have ext2/ext3 filesystems on daten/1 I would
recommend using e2fsadm to do this.

Once you have done this, then the pvmove should work.  Note that depending
on where the PEs from the end of the daten/1 LV are, you may have to
just use "pvmove /dev/hda4" so that it moves the PEs from hda4 to the first
available free PE.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/





More information about the linux-lvm mailing list