1823956 Members
3667 Online
109667 Solutions
New Discussion юеВ

How to lvextend /usr

 
Simon Qu
Frequent Advisor

How to lvextend /usr

/dev/vg00/lvol7 is mirrored and mounted on /usr. There are enough free space on both disks. When I tried to extend this lv, I still got the error message:

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

My /usr is almost full, I need to extend this lv soon. Please help.
15 REPLIES 15
Thayanidhi
Honored Contributor

Re: How to lvextend /usr

Strict is normal for mirrored LV.

run vgdisplay -v and find out how much free space on each physical volume left.

Then run lvdisplay /dev/vg00/lvol7 and make sure it is Allocation "strict" and contigeous.

lvextend to the new size, followed by fsadm(hope you have on-line JFS).

If there is no space left in the disks, then either replace the disks with higher capacity(Take ignite backup first), or you can also add additional two disks!!

Regds
TT

Attitude (not aptitude) determines altitude.
Naveej.K.A
Honored Contributor

Re: How to lvextend /usr

Hi,

Use lvchange to disable strict allocation policy.

lvchange -s n /dev/vg00/lvol7

Check this thread for more info:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=131105

Regards,
Naveej
practice makes a man perfect!!!
Mark Nieuwboer
Esteemed Contributor

Re: How to lvextend /usr

Hi,

use lvchange -s n /dev/vg00/lvol7
after this you can use lvextend.

grtz. Mark
Sudeesh
Respected Contributor

Re: How to lvextend /usr

Hi,
Set the strict allocation policy. Mirror copies of a logical extent can be allocated to share or not share the same physical volume or physical volume group. This partion only makes sense when the physical volumes of the volume group that owns the specified logical volume reside on different physical disks. Hence the Strict allocation policy should be enabled in this case.

Isolating strict allocation policy, I feel there is not enough disk space. Can you please provide fllowing outputs.

strings /etc/lvmtab

pvdisplay /dev/dsk/disk_1
pvdisplay /dev/dsk/disk_2

Calculate the available space on each disk by (PE Size (Mbytes)*Free PE).

lvdisplay -v /dev/vg00/lvol7 will give us additional help.


Sudeesh


The most predictable thing in life is its unpredictability
Hoang Chi Cong_1
Honored Contributor

Re: How to lvextend /usr

Hello
Which command did you use to extend?
As you said :"There are enough free space on both disks" so that no need to change the strict allocation policy.
If you have Online-JFS, you can extend online but I recommend you should do in single user mode!
The right command you can do online:(for example, you want to extend 500MB more)
#lvextend -L 500M /dev/vg00lvol7
#fsadm -F vxfs -b 500M /usr
#bdf

Hope this helps and goodluck!
Regard,
Hoang Chi Cong
Looking for a special chance.......
Cem Tugrul
Esteemed Contributor

Re: How to lvextend /usr

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=825254
Our greatest duty in this life is to help others. And please, if you can't
Saravanan_15
Advisor

Re: How to lvextend /usr

Hi simon,
It seems to be one of your PV is not having Free PVs. So try to reduce the size of some other LV ,you will get a free PE. Then you can extend /usr file system.
you can see this by,
#pvdisplay -v
&
#pvdisplay -v
Then compare both the outputs for no. of free PEs.
Thayanidhi
Honored Contributor

Re: How to lvextend /usr

A mirrored LV should be always in "strict".
If you make it no strict, then mirror copies can exisits in the same disk!

"contigeous" may not be possible, you may be disable contigeous using lvchange -C n if already set.

Regds
TT
Attitude (not aptitude) determines altitude.
Senthil Kumar .A_1
Honored Contributor

Re: How to lvextend /usr

Hi simon,

My guess is as follows based on the error message "lvextend: Not enough free physical extents available."

My guess is, you are specifying -L as less than the current size. I mean you are specifing the amount by which you want it to be extended. As an example..

Your current size is - 50MB
Your new size should be - 90MB

My gues is you are issue the following command...

lvextend -L 40M /dev/vg00/lvol7

I think this is the cause of the error...

Please make sure..the command for extending should have the the new size specified which should be larger than the current one..

The right command in this example would be..

lvextend -L 90M /dev/vg00/lvol7


The mirror allocation policy "strict" doesn't have any bearing.. as you report that both the HDD has enough space..

Regasrds.
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Senthil Kumar .A_1
Honored Contributor

Re: How to lvextend /usr

Please be aware my previous guess was based on my eperience of my mistake and not by the "error message" you lvextend has shot..

For the same situation in the past i happened the get the following error .. thought it doesn't exactly tell that there is a syntax...issue...

Please check it anyway...

I will try on my test box..to ensure it fits into this case.. and get back to you...
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Simon Qu
Frequent Advisor

Re: How to lvextend /usr

Thank you all for your help, but now I got another issue:
I used sam to extend /usr, I got:
The file system, /usr, on this logical volume, cannot be umounted because the file system is busy. In order to extend this logical volume and file system, you will need to do the following outside of SAM:
1. Kill all processes running in /usr
OR Get into single-user mode
2. lvextend -L 3224 /dev/vg00/lvol7
3. umount /dev/vg00/lvol7
4. extendfs /dev/vg00/lvol7
5. mount /dev/vg00/lvol7 /usr.

How to Kill all processes running in /usr?
If Killing all processes running in /usr, can users still work on the system? OR all users have to log off?

In addition, when run bdf:
/dev/vg00/lvol7 2891776 2726976 163544 94% /usr
/usr has 163M free space. How fast does /usr grow? Can I just leave it as it is?
Devender Khatana
Honored Contributor

Re: How to lvextend /usr

Hi,

You have not responded to any of queried earlier without that I can not come to know wheather you can do it online or not. This is a critical file system and is in us all the time in multiuser mode.So can not be altered without going to single user mode. Allthough if you have JFSOnline software for extending a file system online,you can do it. Find out if you have JFS online.

#swlist -l product|grep -i online

If you have one then you can extend it to as much as free space in /dev/vg00.Find out free space by multiplying first two outputs in

#vgdisplay -v /dev/vg00 |grep -E Free -E Size

And then extend online using
#lvextend -L (new Size in MB) /dev/vg00/lvol7
#fsadm -F vxfs -b (New size in blocks) /dev/vg00/lvol7

This shall do it for you.


========================================
->/dev/vg00/lvol7 2891776 2726976 163544 94% /usr

This file system contains static files and does not grow at all unless you apply patches ,install softwares etc. Yes you can leave it as it is as 163MB is quite enough at this stage unless you install/update.

Hope I clarified,
Devender
Impossible itself mentions "I m possible"
Cem Tugrul
Esteemed Contributor

Re: How to lvextend /usr

Hi Devender,
very clarified...
:-)
Our greatest duty in this life is to help others. And please, if you can't
Simon Qu
Frequent Advisor

Re: How to lvextend /usr

run "swlist -l product |grep -i jfs" and I got:

JFS B.11.11 The Base VxFS File System
PHKL_24026 1.0 JFS Filesystem swap corruption
PHKL_28512 1.0 Fix for POSIX_AIO in JFS3.3
PHKL_29115 1.0 JFS Direct I/O cumulative patch
PHKL_30366 1.0 JFS3.3;ACL patch

run "swlist -l product |grep -i online", I got:
PHCO_25831 1.0 SCSI Ultra160 driver Online Addition script

Is there onlineJFS stalled on the system?
Senthil Kumar .A_1
Honored Contributor

Re: How to lvextend /usr

Hi simon,..


swlist -l product | grep -i vxfs
would have been more profound...

But nevertheless from your output, it can be concluded that you donot have online JFS.

Unmounting /usr is very necessary for the shake of extension...

Regards
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)