LVM and VxVM

trouble adding additional drive to vg00 to increase swap

 
mike worrell
Regular Advisor

trouble adding additional drive to vg00 to increase swap

I have added an additional drive to vg00 so I can increase my swap space on /dev/vg00/lvol2.
When I tried to increase swap it said no additional physical extents available.

Did a vgdisplay -v vg00 and looked at the additional drive and saw this
PV Name /dev/dsk/c0t0d0
PV Status available
Total PE 250
Free PE 250

It's a 1gb drive and I did pvcreate on it.
What can I do to free it up so I can use it?
Never had this happen before.

Thanks for any help I can get.
Mike
8 REPLIES 8
Pete Randall
Outstanding Contributor

Re: trouble adding additional drive to vg00 to increase swap

Mike,

Swap space needs to be contiguous. Add a secondary swap volume (you can use SAM, even) and set the priority the same as primary. That should do it.


Pete


Pete
Tim Adamson_1
Honored Contributor

Re: trouble adding additional drive to vg00 to increase swap

Swap must be contigous. Most likely you don't have any free PEs next to the last allocated PE for lvol2.

So just create a second swap logical volume. Make sure it is contigous and bad block relocation is off (-C y -r n)

If in doubt, use SAM to do it.


Tim
Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.
James R. Ferguson
Acclaimed Contributor

Re: trouble adding additional drive to vg00 to increase swap

Hi Mike:

Swap space must be contiguous(ly) allocated, so expanding primary swap isn't possible. Instead, all you need to do is create secondary device swap (one or more) as another logical volume. I suggest creating the secondary swap on a volume group other than vg00 and then setting its swap priority to a higher value (lower number, here zero) than the swap priority of primary swap which is one. In this way, preference is given to utilizing secondary swap before primary, reducing any I/O to you vg00.

Of course, you never want to swap. You should have adequate physical memory for your process needs; turn on the kernel 'swapmem_on' and therefore only use swap space for memory reservation because you have adequate memory in the first place never to have to swap (page).

Regards!

...JRF...
George_Dodds
Honored Contributor

Re: trouble adding additional drive to vg00 to increase swap

Did you run a vgextend on the volume group to add the disk to the group?

#vgextend /dev/vg00 /dev/dsk/c0t0d0

Assuming you want to add swap using all 250 extents available in vg00.

#lvcreate -l 250 -n swap2 -C y /dev/vg00

#swapon -p 1 /dev/vg00/swap2

#swapinfo -mat

then add entry in /etc/fstab file.

Ta

George
George_Dodds
Honored Contributor

Re: trouble adding additional drive to vg00 to increase swap

Ignore my vgextend reference i misread your question.....need more coffee!!

Ta

George
mike worrell
Regular Advisor

Re: trouble adding additional drive to vg00 to increase swap

Thanks everyone for your answers, going to try them now. I just assigned the points to each of you, let me know if you don't get them and I"ll resubmit the point
Thankkkkkk ya
Mike
Pete Randall
Outstanding Contributor

Re: trouble adding additional drive to vg00 to increase swap

Mike,

I think you might have to try the point thing again (and possibly again).


Pete


Pete
mike worrell
Regular Advisor

Re: trouble adding additional drive to vg00 to increase swap

I added my swap by adding the drive to a new volume group, created using SAM a lv called swap, made it swap with pri of 2 and 500 mb

System rebooted , now for some reason it will not mount my file systems automatically. If I do a more on /etc/fstab and mount by hand all is ok. What can I do to fix
Mike