Add swap space ??

I am getting messages that 'the swap swap is below 10 percent' and some times 'not able to allocate the requested swap space'. It's is old system. Oracle database is running on this system.

Below is the configuration of my system:

OS : OSF1 V4.0 1229 alphaMemory: 256 MBSwap space : 512 MB

So I want to increase the swap space. I have only one partition is free in one of the Hard disk which is the system disk. What I mean is it contains the /, /usr /var and the existing swap. The diskconfig of the same is as below:

Re: Add swap space ??

Ok thanks for the reply. But I dont think I have understood completely what you said. The closest region is g but it is not ending at 30435875 ...rather it shows as 22020096.Am I wrong ? Please bare with me as I am a newbie in TRU64.

Moreover if h is to be used, please let me know if the following commands are enough to add extra swap space in TRU64 V4.0.

Re: Add swap space ??

> Ok thanks for the reply. But I dont think I have understood completely what you said. The closest region is g but it is not ending at 30435875 ...rather it shows as 22020096.

Yes, you are misunderstanding the disklabel output. The first two numeric fields in each line are the size (in blocks) and the starting block of the partition. So "g: 84157779 22020096" indicates the partition starts at block 22020096 and extends for 8415779 blocks. Thus the last block in the partition is is 30435874. Partition h starts in the next block (30435875) and extends for 5129205 blocks, which is the remainder of the disk.

> Moreover if h is to be used, please let me know if the following commands are enough to add extra swap space in TRU64 V4.0.

Not quite. See below.

> disklabel -rw -t advfs /dev/rz0h

This is not needed. Disk rz0 is already labeled. You're just using one of its already existing partitions.

> swapon /dev/rz0h

This will add the swap space immediately, but it will not persist after reboot unless you also add the swap partition to /etc/fstab. (Note: this is true in V4, but V5 is different.) Edit /etc/fstab and look for a line like:

/dev/rz0b swap1 ufs sw 0 2

Immediately AFTER this line, add one like this:

/dev/rz0h swap2 ufs sw 0 2

> Reboot

A reboot is not needed as long as you perform the swapon command above to activate the swap space.

Re: Add swap space ??

Yes.. Martin sure is. I did what exactly he said and it seems to have used the free space to add as swap. And I have modified the /etc/fstab file as well. But not interested in rebooting the system at the moment.

PS: I suppose I really need to understand the basic steps to create a advfs filesystem from scratch/raw hard disk. Any such good source of documentation then please point me there. I tried to go through the PDF "Advanced File System andUtilities for Digital UNIX Version 4.0 Guide to File System Administration" But strangely did not find much help from it.