Operating System - HP-UX
1821246 Members
2679 Online
109632 Solutions
New Discussion юеВ

can we extend lvs with contiguous policy set?

 
SOLVED
Go to solution
Srimalik
Valued Contributor

can we extend lvs with contiguous policy set?

One of my HP-UX machines is running out of space in /. the lv on which / is created has vxfs on it. So, i thought of extending the filesystem.
But, when I tried to extend the LV command failed, giving out:
##############
bash-2.05# lvextend -L 1024M /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.
bash-2.05#
###############

Then I tried to change to allocation policy to non contiguous but it failed

##########
bash-2.05# lvchange -C n /dev/vg00/lvol3
Can not change to non-contiguous allocation policy
Logical Volume "/dev/vg00/lvol3" must be contiguous.
bash-2.05#
(lvchange -s n /dev/vg00/lvol3 succeeded though)
############

The man page of lvchange says that this is expected behavior:

########
For root, swap or dump logical volumes, the allocation policy is always contiguous. This attribute cannot be changed with lvchange.
########

It there any other way I can extend this volume and hence my filesystem??

Thanks
Sri

abandon all hope, ye who enter here..
5 REPLIES 5
Ivan Krastev
Honored Contributor
Solution

Re: can we extend lvs with contiguous policy set?

Yes,
there are 2 ways:
1. with Ignite (which require reboot).
2. See this trick with OnlineJFS and MirrorDisk - http://www.met.ca/itrc/index.php?option=com_content&task=view&id=89&Itemid=2

regards,
ivan
Devender Khatana
Honored Contributor

Re: can we extend lvs with contiguous policy set?

Hi,

As mentioned in the referenced link in earlier post you can extend root with Online JFS provided you have free space on any of the free disks in the root volume group. It is required that you break mirroring prior to this exercise atleast for LV that holds the PEs just after your root LV. It is not /dev/vg00/lvol4 always.

#pvdisplay -v /dev/dsk/cxtydz will give you the lvol which holds space just after your root lvol.
Ex.
00798 current /dev/vg00/lvol3 00011
00799 current /dev/vg00/lvol3 00012
00800 current /dev/vg00/lvol6 00000
00801 current /dev/vg00/lvol6 00001

It is lvol6 in this case.

Since you can not change the continuous allocation policy for root, you can make it extend with this policy in place by providing it some continuous extents to extend.

Here you need to break mirroring for lvol6 and then move the single copy of lvol6 to another disk. Avoid moving the copy to the disk where the space has just got free after breaking the mirror as it could move to the same space which has just got freed up by breaking mirror.

Once continuous extents are available on both the disks which hold copy of root logical volume lvextend should work for root. Remember you still need online JFS to extend root.

The important thing is you should not be required to extend root. This should only include file systems mounted in it and not the actual files except mendatory ones. Normally on any HP-Ux system 150 Mb allocated to root should be enough.

HTH,
Devender
Impossible itself mentions "I m possible"
Srimalik
Valued Contributor

Re: can we extend lvs with contiguous policy set?

It worked, 10 points and many thanks to both of you.
abandon all hope, ye who enter here..
Srimalik
Valued Contributor

Re: can we extend lvs with contiguous policy set?

It was too early to conclude that this was working because when I rebooted the machine it didn't boot and said 0.1.1.1.0.0.(smthing like that) /stand/vmunix no accessible or excutable and the machine failed to boot. So I had to cold install the OS again.

I am wondering how extending the / fiesytem can corrupt the kernel?? The method which was used to extend was quite clean.
abandon all hope, ye who enter here..
Srimalik
Valued Contributor

Re: can we extend lvs with contiguous policy set?

No responses :-(
Closing this.
Will retry to do this again when I have time.
abandon all hope, ye who enter here..