Swap size increase

Thread Tools Search this Thread
Operating Systems Solaris Swap size increase
# 1  
Old 06-06-2011
Swap size increase

Dear All,

How to increase the swap size when physicall memory reaches 60 %. OR it can be only done after the physicall memory is full.

# 2  
Old 06-06-2011
See man mkswap. Swap can change any time short of when you need more (because your commands will fail).
# 3  
Old 06-06-2011
umount /dev/sda1
Perform a check on the file system

e2fsck -f /usr/sda1
Now resize with

resize2fs /usr/sda1 60M
resize is a tool to perform partition.

try this.
# 4  
Old 06-06-2011
I'm afraid mkswap is a Linux command, not a Solaris one. e2fsck/resize2fs and sda1 are also Linux specific (and unrelated to swap increase).

On Solaris you increase the swap area with the "swap -a swapname" command.

Swapname can be a partition, slice or file.

mkfile 1g /extraswap
swap -a /extraswap

To have this extra swap persisting after a reboot, add a line for it in /etc/vfstab.
# 5  
Old 06-07-2011
You can in crease the swap size in two ways

1. By Adding another slice
2. By adding file

Example: Please follow the below steps

Adding Swap Files
To add a swap file, complete the following steps:
1. The
/export/data file system appears to have adequate space to
create an additional swap file. Create a 20-Mbyte swap file named

in the /export/data directory.

mkfile 20m /export/data/swapfile

2. Add the swap file to the system's swap space.
swap -a /export/data/swapfile

3. List the details of the modified system swap space.
swap -l

swapfile dev swaplo blocks free
/dev/dsk/c0t0d0s1 136,1 16 1206736 1084736
/export/data/swapfile - 16 40944 40944
4. List a summary of the modified system swap space.
swap -s

total: 106256k bytes allocated + 8512k reserved = 114768k used,
5. To use a swap file when the system is subsequently rebooted, add an
entry for the swap file in the
/etc/vfstab file.

vi /etc/vfstab

#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot opt
/export/data/swapfile - - swap - no -

Adding Slice
all the above steps are followed

except here u mention ,

#swap -a /dev/rdsk/c*t*d*s*

make an entry in /etc/vfstab, to make it permanent.

Hope this will help you....
This User Gave Thanks to sudhansu For This Post:
# 6  
Old 06-07-2011
Hi Sudhansu,

Thanks for your reply....

And I also have one doubt which i have mentioned in another post.

I have a hard disk which have some mount points... and now the requirement is the resize the hard disk ...( increase in size ) ...

SVM is also present...Do you have any link which shows the steps for resizing under SVM ( raid 1 )

# 7  
Old 06-08-2011
Dear Rj,

I am bit confused by the question. What u asking is increasing the size of harddisk. I don't think u can increase the size of the hard disk rather u can increase the size of a file system

What you can do, that u can add a separate silce to an existing file system to increase it's size.

Here are some steps to do the things.

Suppose u have /home mounted on /dev/rdsk/c0t0d0s7.. Here u can increase the size of /home. suppose u have another hard disk(c1t0d0) and u want to add the fihth slice (c1t0d0s5) to /home for increasing the size.

step 1 : create the metadevices by metadb command. If alrady configured then leave it.

STEP 2 :
# metainit -f d* 2 1 c0t0d0s7(i:e /home) 1 c1t0d1s5 (new slice)

Edit the /etc/vfstab and input the below entry

/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2 yes - <Old entry >

now give this new entry and omit the above entry

/dev/md/dsk/d* /dev/md/rdsk/d* /export/home ufs 2 yes -

STEP 4: then unmount /home and mount it back.

STEP 5 : this is the important command

# growfs -M /home /dev/md/rdsk/d*

now u can check df -h to find out whether the size is increased or not.
This User Gave Thanks to sudhansu For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. What is on Your Mind?

How Can We Increase the Size of Our Community?

Any suggestions on how to increase the number of posters and contributors? Please vote and write in your suggestions. Thank you! (72 Replies)
Discussion started by: Neo
72 Replies

2. Solaris

/tmp size is less whereas size allocated to swap is more

Hi, the /tmp size is less whereas the size allocated to swap is quite big. how to increase the size of /tmp - #: swap -l swapfile dev swaplo blocks free /dev/md/dsk/d20 85,20 8 273096 273096 #: swap -s total: 46875128k bytes allocated + 2347188k reserved =... (2 Replies)
Discussion started by: psb74
2 Replies

3. Solaris

Possible to increase swap size for existing UFS-based drive slice?

I like to increase swap size for my current server running solaris 10. Seems like the system is not using it's full 16G of physical memory. #swap -l swapfile dev swaplo blocks free /dev/dsk/c0t0d0s1 32,1 16 1058288 1058288 # swap -s total: 4125120k bytes... (17 Replies)
Discussion started by: JT-KGY
17 Replies

4. Solaris

increase SWAP on ZFS file system

Hi All, I am using this commands to dynamically increase ZFS swap space on Solaris my question is: 1- after i make these commands it will permanent or it will remove after restart 2- how to make it permanent # swap -l swapfile dev swaplo bloques libre /dev/zvol/dsk/rpool/swap... (4 Replies)
Discussion started by: osmanux
4 Replies

5. UNIX for Dummies Questions & Answers

Increase size to sd[b-c]

hi guys I am working on my vmware workstation. I have a /dev/sdb which is 5GB. I am using LVM. Now I increase /dev/sdb 2 more GB. fdisk -l shows 7 GB but pvscan still shows 5GB. how do I make my system recognize the new 7GB added and be able to add those to my physical volumen and... (1 Reply)
Discussion started by: kopper
1 Replies

6. HP-UX

Increase of partition Size In HP-UX

Experts, I want to know how to increase partion size in Hp-ux.Actually we installed oracle in separate part ion.As increase of database went to 99% :eek:.What ever data which is in it is important.so i dont want to delete any data in that partion.Now the size of that is 250 GB.I want the same to... (2 Replies)
Discussion started by: naveennella
2 Replies

7. Solaris

increase metadevice size

Hi, I am having two metadevices d50 and d100 which are used to created soft partitions as and when required. d50 and d100 are metadevices formed on different disks. d50 -- disks 0 & 1 d100 -- disks 2 & 3 I have a soft partition d70 os 50 GB on d50. Now there is no free space on d50. ... (1 Reply)
Discussion started by: sag71155
1 Replies

8. UNIX for Dummies Questions & Answers

How to increase process size ???

Hi All, Could anybody tell me how to increase/decrease a process size in UNIX HP machine ? Whether the process size limitation will cause core dump ? Thanks, Rohit.. (1 Reply)
Discussion started by: ronix007
1 Replies

9. Solaris

Increase size of /tmp swap File

Hi Guys I need to increase the size of my /tmp swap file. What is the easiest way to do this. Thanks Carson (2 Replies)
Discussion started by: cmackin
2 Replies

10. HP-UX

increase size

Hi All, one of the mount point in Hp ux server has reached 95% its a data base file and can not be deleted. so i want to know how to increase the size of mount point i am new to unix ,please help me (1 Reply)
Discussion started by: jyoti
1 Replies
Login or Register to Ask a Question