1826373 Members
4222 Online
109692 Solutions
New Discussion

Re: lvextend fails

 
SOLVED
Go to solution
Sanjiv Sharma_1
Honored Contributor

lvextend fails

Hi,

I have one N-4000/HP-UX 11.00 with root disk mirrored each 18 GB disks.

My root filesystem is 150 MB and is about 90% full. I want to increase it to 300 MB. I have about 8 GB free space in each root disk.

when I run lvextend it fails with the following error:

# lvextend -L 300 /dev/vg00/lvol3
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg00/lvol3" could not be extended.
Failure possibly caused by contiguous allocation policy.
Failure possibly caused by strict allocation policy

# vgdisplay -v /dev/vg00

--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 8
Open LV 8
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4350
VGDA 4
PE Size (Mbytes) 4
Total PE 8680
Alloc PE 4366
Free PE 4314
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

Pls. help me to resolve this.
Thanks in advance.

Raje.
Everything is possible
6 REPLIES 6
S.K. Chan
Honored Contributor

Re: lvextend fails

You can't because of the "contiguous" nature of /, 2 options
1) use make_recovery
2) use pvmove strategy but you got to have an unused PV.
Check this thread ... it has both options..

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x24eb935c6049d611abda0090277a778c,00.html
Michael Tully
Honored Contributor

Re: lvextend fails

Hi,

Logical volumes lvol1, lvol2 and lvol3 MUST be contiguous. There are two ways to help:

1. Booting from your ignite tape increase the size of the partition.

2. Remove items from you root partition that shouldn't be there. Core files and unwanted files (old backups placed in the wrong area) are common problems. If there are files you wish to use somewhere, create an additional files system.

There are ways to use spare disks, but unless you have this type of experience it may something that you wish to stay away from.

Cheers
~Michael~
Anyone for a Mutiny ?
Michael Tully
Honored Contributor
Sridhar Bhaskarla
Honored Contributor

Re: lvextend fails

Hi,

You cannot extend the root disk by default methods as it is supposed to be contiguous. Since you already have a mirror disk and have space available on it,it's relatively simple. do the following if you have onlineJFS. Otherwise bring it to single user mode.

IMPORTANT: First create a make_recovery tape

1. pvdisplay -v /dev/dsk/your_boot_disk
2. Note down the next logical volume after lvol3 (lvol4?)
3. lvreduce -m 0 /dev/vg00/lvol4 /dev/dsk/boot_disk (important.. you are taking out from the boot disk not the mirror disk. You need to do this as you have to create free extents after lvol3).
4. lvreduce -m 0 /dev/vg00/lvol3 /dev/dsk/alt_disk (this time we are reducing the mirror on the mirror disk as the mirrors will mismatch during the lvextend).
5. lvextend -L 300 /dev/vg00/lvol3
6. fsadm -b new_size_in_blocks /

This fixes your sizing problem. To adjust the mirrors do the following..

7. lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/boot_disk
8. lvreduce -m 0 /dev/vg00/lvol4 /dev/dsk/alt_disk
The above two steps will make space on the mirror disk to allow root's mirror.
9. lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/boot_disk
Now establish the mirror for lvol4 wherever on the alt_disk.
10. lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/boot_disk

Before following the above procedure, make sure you understood it well.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: lvextend fails

Having said that, do not try it unless you have OnlineJFS installed. make_recovery is the next best method if you do not have OnlineJFS.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Trond Haugen
Honored Contributor
Solution

Re: lvextend fails

The cause for your problem has already been explained. I just wanted to add that you should also considder if you realy want to increase /. An option is also to chceck for (large) files that shouldn't be there (like /dev/rmt/0m being a regular file). A 90% full / is something to look into but if it isn't filling up it's less alarming.
Lastly the strict/contiguous allocation policy is pr lvol so you'll need to run a lvdisplay to see it.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn