[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 256
  • Last Modified:

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
0
sganta
Asked:
sganta
  • 4
  • 3
1 Solution
 
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now