1846990 Members
3533 Online
110257 Solutions
New Discussion

Swap on SAN Volume

 
SOLVED
Go to solution
panks
Regular Advisor

Swap on SAN Volume

Hi All,

In my production system I found that there are 2 swap spaces confgured. One is on local disk and other is on SAN volume.
Now in my new system I will be configuring the same. I have created the swap on local disk on small size and now I will be creating the other swap on SAN volume. How I will be activating both, so that system should start making the use of it. How to create the swap space ?? Also, I found that entry for both is diff in fstab for one:
/dev/vg00/lvol2 ... swap pri=0 0 2
for second:
/dev/vg05/swap . swap defaults 0 0 # swap device

8 REPLIES 8
Sajjad Sahir
Honored Contributor
Solution

Re: Swap on SAN Volume

first create logical volume
then swapon lv
lvcreate -L 100 /dev/vg01/lvol3
u are creating 100 MB now
swapon /dev/vg01/lvol3

swapon -a for activating swap
if u want permanent menas next reboot onwards make an entry in /etc/fstab file

sajjad
George_Dodds
Honored Contributor

Re: Swap on SAN Volume

Once you have created your lvol's to be used as swap space then run the following command if you are using the same lvols on your new server.

swapon /dev/vg00/lvol2

swapon /dev/vg05/swap

If you arent sure it may be easier and safer to use SAM.

panks
Regular Advisor

Re: Swap on SAN Volume

Thanks Sajid !! It seems bit simpler but what about the entry in fstab as in my fstab file for first swap it is ... and for second it is . Is there any specification that we need to take care while mounting more than one swap.
SKR_1
Trusted Contributor

Re: Swap on SAN Volume

lvcreate -r N -L size -n name VG name
swapon -p 0 /dev/VG name/swapname(LV name)
Make the entry in /etc/fstab also.

Thanks
Hein van den Heuvel
Honored Contributor

Re: Swap on SAN Volume

free advice.. :-)

Your SAN swap device probably has some raid write protection (Hopefuly raid-1 or raid-10).
If you want maximum protection then please make sure that the local swap device also has a local mirror. Otherwise a single (swap) disk failure can take out the system.

fwiw,
Hein
Steven E. Protter
Exalted Contributor

Re: Swap on SAN Volume

Shalom,

swap on SAN is a bad idea.

A SAN problem which is easy enough to happen with those delicate fiber cables stops your system dead, probably with little or no diagnostics.

Also, default configuration uses the same device for swap and dump. A crash dump can't be written to a SAN because more than likely the drivers that permit that are not functioning as the system has crashed.

Some short term filesystem swap to get you out of jam, thats all I'd ever do on a SAN.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
panks
Regular Advisor

Re: Swap on SAN Volume

As I discussed, I can not create the entire swap on local disk. The physical RAM is 64 GB, so it is not possible to give a double or atleast 64 Gb on local disk. Thats why I created some 8Gb of SWAP on local disk and want to create the another swap which will be on SAN volume, and the same type of configuration is there in my other servers.
OFC_EDM
Respected Contributor

Re: Swap on SAN Volume

Why so much swap?? You probably don't even need half that.

I'll refer you to this link where they've discussed this
http://forums12.itrc.hp.com/service/forums/parseCurl.do?admit=109447627+1213713403203+28353475&CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0xf2ce99f08a51d61190040090279cd0f9%2C00.html

The one point someone made was there was so much RAM on their system that the large swap wasn't needed because everything was being handled in memory....by having a large swap all that was done was swap space was pre-allocated and not used....a waste of resources.

So check you need that much before defining it.

Cheers
The Devil is in the detail.