1757033 Members
2869 Online
108858 Solutions
New Discussion юеВ

Re: swap creation

 
SOLVED
Go to solution
himacs
Super Advisor

swap creation

Hi All,

I had 2 swap areas in vg00 which i removed and trying to create new swape but ended up with below error

lvcreate -L 8192 -C y -r n /dev/vg00
Logical volume "/dev/vg00/lvol10" has been successfully created with
character device "/dev/vg00/rlvol10".
lvcreate: Not enough free physical extents available.
Logical volume "/dev/vg00/lvol10" could not be extended.
Failure possibly caused by contiguous allocation policy.
Run the "lvextend" command to create space on the Logical Volume.


Regards
himacs
9 REPLIES 9
R.K. #
Honored Contributor

Re: swap creation

Hi Himacs,

# vgdisplay vg00
Look for "free space" = "free PE" * "PE size"
That is check if enough space is available.
How many disks involved in vg00? (mirroring?)
Don't fix what ain't broke
Michael Steele_2
Honored Contributor

Re: swap creation

Hi

I would think not all 8 gb are in a sequential, contiguous order. You can test this by not using the -C option. If it succeeds then you can lvremove.
Support Fatherhood - Stop Family Law
Prasanth Thomas
Valued Contributor

Re: swap creation

Hi Himacs,

Please verify how many unalloacted PE's are available in vg00. Or please share the o/p of vgdisplay v00.

Regards,
Prasanth Thomas.
Prasanth Thomas
Valued Contributor

Re: swap creation

there was one typo error.
# vgdisplay /dev/vg00

Regards,
Prasanth Thomas.
sujit kumar singh
Honored Contributor
Solution

Re: swap creation

hi

this means that 8 GB is available in the VG but that nmay nit be available as Contiguous space, which is the requirement of swap LVOL if that LVOL is to be used as swap.

you can do as:

lvcreate -Cy -rn -sy -n swaplvol /dev/vg00
then
use the lvextend command in small steps

lvextend -L 1024 /dev/vg00/swapvol
of succeeds
then
lvextend -L 1500 /dev/vg00/swapvol

like that.

but also easily you can allocate the Secondary Device swap from the non-root VG. you can try that also and once the swap LVOL is created in non-root VG say vg01 then add the entry to /etc/fstab as
/dev/vg01/swapvol ... swap defaults 0 0

regards
sujit
himacs
Super Advisor

Re: swap creation

HI ,

Thanks for your responses.It was contigous till 6 GB so have created 6GB swap.

can we do fragmentation in hpux so that we can reorder the PEs to get contigous space

Regards
himacs
Johnson Punniyalingam
Honored Contributor

Re: swap creation

>>Thanks for your responses.It was contigous till 6 GB so have created 6GB swap.<<<

did you create "6GB" did you lvextend or lvcreate 6GB -> Secondary swap ??

please post below command outputs ??

swapinfo -mat

>>can we do fragmentation in hpux so that we can reorder the PEs to get contigous space<<
defragmentation -> we usually do before you "lvreduce" logical volume size
Problems are common to all, but attitude makes the difference
James R. Ferguson
Acclaimed Contributor

Re: swap creation

Hi:

> can we do fragmentation in hpux so that we can reorder the PEs to get contigous space

Defragmentation usually refers to a filesystem, not the extents of a logical volume of a volume group. You do VxFS *filesystem* defragmention with the 'fsadm' command.

You question has relevance if you are talking about moving physical extents, though. Then, the 'pvmove' command exists to allow moving extents and the data they contain from a source physical volume, to one or more other physical volumes in the same volume group. However, the source and destination physical volumes *cannot* be the same.

As always, see the manpages for more insight!

Regards!

...JRF...
AVV
Super Advisor

Re: swap creation

If you created a 6GB lv with continuous allocation, swapon it .