1834149 Members
2128 Online
110064 Solutions
New Discussion

swapfile

 
navin
Super Advisor

swapfile

Hello ALl,
I have log of space in my root file system, can i create a swapfile in there using mkfile and use it as additional swap space
thanks - if so can you please tell me the syntax
Learning ...
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: swapfile

Shalom,

How to do it:

http://docs.hp.com/en/B2355-90950/ch06s03.html

http://docs.hp.com/en/7408/HPUXSANBootWP_final_v2_update.pdf

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
Venkatesh BL
Honored Contributor

Re: swapfile

Yes, you could do it. But, note that file system swap would any day be inefficient and slow than device swap.
Yogeeraj_1
Honored Contributor

Re: swapfile

hi Navin,

Post the output of the following commands:

swapinfo -tam
bdf /
glance -m
(the memory details)

e.g.
SRX2:>swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 512 0 512 0% 0 - 1 /dev/vg00/lvol2
dev 9728 0 9728 0% 0 - 0 /dev/vg01/swap01
reserve - 448 -448
memory 6310 927 5383 15%
total 16550 1375 15175 8% - 0 -
You have mail in /var/mail/root
SRV2:>bdf /
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 204800 88440 115504 43% /
SRV2:>


Normally, we dont create anything on the root file system.

Can you check if you have unused space on other Volume groups or disks?


revert!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Sajjad Sahir
Honored Contributor

Re: swapfile


Dear Navin

if u want to create additional swap create
one more device swap ok not file system ok
eg:
lvcreate -L 100 /dev/vg01/lvol5
swapon /dev/vg01/lvol5
if u want to this next boot time onwards
make an entry in /etc/fstab file

thanks and regards

Sajjad Sahir
Rasheed Tamton
Honored Contributor

Re: swapfile

Hi Navin,

There is no mkfile command in HP-UX. It is avble in Solaris.

It is not advisable to create on root file system or simply, I think, you cannot create one on a mounted filesystem.

If you have an existing file system which can be unmounted then you can do something like this or create a new one.

umount /mountpoint
newfs -F vxfs -R90 /dev/vg01/rlvol9
(be sure you use the correct file sytem - it will reserve 90MB for swap)

You can also use -s90M (90MB size)

mount -F vxfs /dev/vg00/lvol9 /mountpoint
swapon /mountpoint
swapinfo -ft
[see the fs value]
swapinfo -tam
[localfs value]

Regards.