swap space issue


 
Thread Tools Search this Thread
Operating Systems Solaris swap space issue
# 1  
Old 12-29-2010
swap space issue

HI All,

Recently during oracle install I realized that I did not have enough swap space.

So I -

1. Created a swap file "swap_fille1" in /rpool using mkfile -

PHP Code:
# ls -ltr /rpool
total 10487121
drwxr
-xr-x   3 root     root           3 Dec 21 12:09 boot
drwxr
-xr-x   2 root     root           3 Dec 21 12:09 etc
-rw------T   1 root     root     5368709120 Dec 29 13:38 swap_file1 
2. Then I added that file to the /etc/vfstab file -

PHP Code:
# cat /etc/vfstab
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
fd      -       /dev/fd fd      -       no      -
/
proc   -       /proc   proc    -       no      -
/
dev/zvol/dsk/rpool/swap        -       -       swap    -       no      -
/
devices        -       /devices        devfs   -       no      -
sharefs -       /etc/dfs/sharetab       sharefs -       no      -
ctfs    -       /system/contract        ctfs    -       no      -
objfs   -       /system/object  objfs   -       no      -
swap    -       /tmp    tmpfs   -       yes     -
/
rpool/swap_file1       -       -       swap    -       no      
3. Reboot .

But this did not help the swap space -

PHP Code:
# df -h
Filesystem             size   used  avail capacity  Mounted on
rpool
/ROOT/s10x_u6wos_07b
                       146G   6.2G   133G     5
%    /
/
devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0
%    /system/contract
proc                     0K     0K     0K     0
%    /proc
mnttab                   0K     0K     0K     0
%    /etc/mnttab
swap                   1.8G   360K   1.8G     1
%    /etc/svc/volatile
objfs                    0K     0K     0K     0
%    /system/object
sharefs                  0K     0K     0K     0
%    /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
                       139G   6.2G   133G     5
%    /lib/libc.so.1
fd                       0K     0K     0K     0
%    /dev/fd
swap                   1.8G    80K   1.8G     1
%    /tmp
swap                   1.8G    28K   1.8G     1
%    /var/run
rpool
/export           146G    19K   133G     1%    /export
rpool
/export/home      146G    24K   133G     1%    /export/home
rpool                  146G   5.0G   133G     4
%    /rpool 
Then where did the 5GB space go? How can I use the other space to increase the swap space becuase I have couple of big s/w installation pending.

current swap space info -
PHP Code:
# /usr/sbin/swap -s
total295428k bytes allocated 83004k reserved 378432k used1594308k available
# swap -l
swapfile             dev  swaplo blocks   free
/dev/zvol/dsk/rpool/swap 181,2       8 2052088 2052088 

I will appreciate any help.

Thanks
Sumeet
# 2  
Old 12-29-2010
You cannot use a file based swap file when that file is on ZFS. Simply add a zvol instead.
Code:
zfs create -V 5gb rpool/swap1
swap -a /dev/zvol/dsk/rpool/swap1

# 3  
Old 12-29-2010
But wont this be a temporary solution and will go away after reboot?

And How did you realize that this was a zfs filesystem?

Last edited by sumeet; 12-29-2010 at 07:02 PM.. Reason: additional question
# 4  
Old 12-29-2010
There are plenty of evidences in your posting that show you are using zfs.

My solution won't survive a reboot but adding a single line to /etc/vfstab referencing swap1 would make it persistent.

There is actually a much simpler and better solution, assuming you are not using the swap file when doing it, which looks like to be the case according to your "swap -l" output:
Code:
swap -d /dev/zvol/dsk/rpool/swap
zfs set volsize=6G rpool/swap
swap -a /dev/zvol/dsk/rpool/swap

That one will persist after a reboot.
# 5  
Old 12-29-2010
I tried doing the last 3 steps but got (exact message) -

PHP Code:
/dev/zvol/dsk/rpool/swap is normally mounted on   according to /etc/vfstabPlease remove this entry to use this device
Should I really remove this entry from the /etc/vfstab file?

Thanks
Sumeet
# 6  
Old 12-30-2010
After which command did you get this error message ?
# 7  
Old 12-30-2010
after this -

swap -a /dev/zvol/dsk/rpool/swap

I can see the same thing in the /etc/vfstab file. So I think we might have to remove this entry from there before running it.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Swap space issue

I have Solaris-10 with mutiple zones running in it. My Big Brother monitoring is complaining for very less swap space available, but I am not able to find, what process has consumed its swap space and how to clear it. All zones including global server have almost blank /tmp with very less data.... (3 Replies)
Discussion started by: solaris_1977
3 Replies

2. HP-UX

Swap space issue.

Hi, I am not sure how many scripts / java processes running on my HP-UX server. I need to calculate the total heap of these processes. I then need to recommend increasing the swap memory to be increase and equal to total heap if that is the right concept. Currently we are facing... (2 Replies)
Discussion started by: mohtashims
2 Replies

3. Linux

How to reclaim the space which i used to increse the swap space on Xen,

Hi, i have done a blunder here, i increased the swap space on Xen5.6 server machine using below steps :- 1056 dd if=/dev/zero of=/root/myswapfile bs=1M count=1024 1057 ls -l /root/myswapfile 1058 chmod 600 /root/myswapfile 1059 mkswap /root/myswapfile 1060 swapon /root/myswapfile ... (1 Reply)
Discussion started by: apm
1 Replies

4. Solaris

No Space Left - Memory/Swap issue

:wall:I'm having a bit of a problem with Solaris 10u8 and one of our applications requesting memory and being told, "no space left". The break down: 24GB Physical Memory 8GB swap at the time of occurance, here's what a memory breakdown looks like: Page Summary Pages ... (21 Replies)
Discussion started by: aychbee45
21 Replies

5. Solaris

Swap Space

Could someone please explain how you know how much swap space you have on your system. See below: # swap -s total: 8225048k bytes allocated + 4863488k reserved = 13088536k used, 4008032k available # swap -l swapfile dev swaplo blocks free /dev/dsk/c3t0d0s1 32,25 16... (2 Replies)
Discussion started by: jamba1
2 Replies

6. UNIX for Advanced & Expert Users

Issue with insufficient swap or memory space

Hi, When I execute one of my shellscript I am getting the below mentioned error message .This application takes 2input files which have the records counts 26463 and 1178046 exec(2): insufficient swap or memory available. exec(2): insufficient swap or memory available. exec(2): insufficient swap... (3 Replies)
Discussion started by: kavithakuttyk
3 Replies

7. Shell Programming and Scripting

Issue with insufficient swap or memory space

Hi, When I execute one of my shellscript I am getting the below mentioned error message .This application takes 2input files which have the records counts 26463 and 1178046 exec(2): insufficient swap or memory available. exec(2): insufficient swap or memory available. exec(2):... (2 Replies)
Discussion started by: kavithakuttyk
2 Replies

8. UNIX for Dummies Questions & Answers

Swap space used???

Plz I need to know how much swap mem free and used i have. I'm using Compaq Tru64 UNIX V5.1A (rev 1885) Thanx (1 Reply)
Discussion started by: Lestat
1 Replies

9. AIX

swap space / paging space

how do you get the paging space reduced without rebooting the machine ? the os is aix (2 Replies)
Discussion started by: aaronh
2 Replies

10. UNIX for Dummies Questions & Answers

pageing space vs swap space

Hello, I would like to know if there is any difference between the pageing space and the swap space. Thank you in advance. (1 Reply)
Discussion started by: VeroL
1 Replies
Login or Register to Ask a Question