How to distribute the swap memory across the disks ?

Could you please tell me how to distribute the swap area
across the disks ?

Thanks in Advance
LVL 4
sgantaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ahoffmannCommented:
depends on your OS.
Either you need to make special swap partitions, and/or use the swap command to add prepared files to the swap area (man swap)
0
sgantaAuthor Commented:
Hi,

I am working on Solaris OS 2.x (UNIX)
I would like to make parititions across the different disks.

I have Swap memory about 500MB in one disk.
I would like to distribute this swap across 5 disks.

Could you please tell me which is the best way ?

Thanks & Regards
sganta
0
ahoffmannCommented:
best is to make swap partitions using Solaris' format, then assign these partitions filetype swap in /etc/vfstab.

If you cannot (re)partition you disk, use mkfile to create a file with size of your required swap for this disk, and add it to the swap space using
      swap -a /path/to/file/created/with/mkfile
(probably you should add this command to one of the rc scripts then)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

sgantaAuthor Commented:
Hi,

Thanks for your prompt answer.

I am new to the Sysadmin tools. Could you please
give me the syntax  to do the partition.
0
sgantaAuthor Commented:
Hi,

Thanks for your prompt answer.

I am new to the Sysadmin tools. Could you please
give me the syntax  to do the partition.
0
ahoffmannCommented:
man format
man swap      # or see my comment
0
johns_philipCommented:
What ahoffmann told is correct.
Pls look into this.

1. Create a file in each disk using mkfile command
eg:  # mkfile 100 m  /opt/addlswap
 Where  100 m is the file size ie. 100 MB
2.  Add this file to swap
eg:  #/usr/sbin/swap -a   /opt/addlswap
 3. Now this is added to swap space. But this is only temporary.
 After rebooting this will not be available. So make an entry in
/etc/vfstab
 eg:   add the following entry in /etc/vfstab
  /opt/addlswap  -   -   swap  -  no  -
4. The modified swap size can be viewed by  swap -l command
     This will be in 512 K block size
    Use swap -s to view in 1024 k block size


JP
0
sgantaAuthor Commented:
Thanks to all of you for your favours towards me !

Best Regards
sganta
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.