Operating System - HP-UX
1748185 Members
4422 Online
108759 Solutions
New Discussion

Not enough free physical extents

 
Debbie Beresford
Frequent Advisor

Not enough free physical extents

I am moving data from an old san to a new san.  I am using the command lvextend -m 1 /dev/vg10/lvol3 /dev/dsk/c21t0d0
I get the message:

lvextend: Not enough free physical extents available.
Logical volume "/dev/vg10/lvol3" could not be extended.
Failure possibly caused by strict allocation policy

 

When I look at the lv, I am 2 PE's short.  The original LV is only 50% full so it would not be a problem to reduce the size.  I have mirrored 2 lv's with no problem.  There is a strict allocation policy but I think this is needed as once the disks are mirrored, I will be removing the old SAN disks from the vg.  My questions are as follows:

 

1.  Can I somehow reduce the LV so I can mirror but not have any data loss?

2.  If #1 is not possible, would I break the mirror, recreate lvol3 and restore data from tape?  Would the 2 lv's I mirrored still be ok?  What stepps are required to do this?

3.  Where did I mess up in my calculations?  I took total KB/1024/1024 as my network admin wanted the size in GB.  I then rounded up to the nearest GB. 

5 REPLIES 5
gnana prakasam
Advisor

Re: Not enough free physical extents

vgdisplay -v vg10 output required 

Bill Hassell
Honored Contributor

Re: Not enough free physical extents

>> Can I somehow reduce the LV so I can mirror but not have any data loss?

 

You'll need Online JFS to do this. Since you have Mirror/UX already, you probably have the JFS feature too.

To reduce the lvol, you must first reduce the filesystem. The command is:

 

fsadm -b <new-size-in-MB>m /<mount-point>

 

Very important: the smaller size must be specified in megabytes *and* followed by the letter M.

Assuming that the mountpoint is /mnt1 and bdf /mnt1 shows the Usage as 100000 KB (100 MB) and the Avail is a lot more than you need, this will resize the mounted filesystem to 80MB:

 

fsadm -b 80M /mnt1

 

fsadm works with mounpoints and changes the directory size. If successful, then you can reduce the lvol like this:

 

lvreduce -L  80 /dev/vgyy/lvolww

 

Now you'll have more extents available.

 

NOTE: If fsadm does not recognize the -b option, Online JFS is not installed. In that case, you'll have to backup the mounpoint, then umount the filesystem, lvremove the lvol and the recreate the lvol at the smaller size, newfs and mount the lvol and restore the data from backup.



Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: Not enough free physical extents

> recreate the lvol at the smaller size, newfs and mount the lvol and restore the data from backup.

 

If you have to do all that, recreate it with the right size on the new SAN. :-)

 

 

Debbie Beresford
Frequent Advisor

Re: Not enough free physical extents

Unfortunately we do not have onlineJFS.  I was not able to reach anyone on our network team to expand the disk as that was my first thought.  Since this is a production system I had to do it in the allocated downtime.  So I deleted the lvol, readded it less the 48MB and restored from tape.  It worked. 

 

I have attached the output from VG10.  How did I go wrong with my calculations?

Ruel Alojado
Advisor

Re: Not enough free physical extents

The total used PE is 25150 and your VG PE Size is 16MB = 402400MB used. You have some unused PE which can be used for extending the VG in later time.  Your VG is capable of handling 1TB per LUNs max size.

 

The total disk size is around 403GB combining the disk size. Putting extra Gigs will not harm.

 

You can break the mirror without losing any data.   You can replace the existing two disks with a single disk based from the VG information you've provided.