Operating System - Tru64 Unix
1748028 Members
4827 Online
108757 Solutions
New Discussion юеВ

Add swap space ??

 
admin1979
Super Advisor

Add swap space ??


Hello,

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 alpha
Memory: 256 MB
Swap 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:

# size offset fstype [fsize bsize cpg] # NOTE: values not exact
a: 2097152 0 AdvFS # (Cyl. 0 - 412*)
b: 1048576 2097152 swap # (Cyl. 412*- 619*)
c: 35565080 0 unused 0 0 # (Cyl. 0 - 7000)
d: 2097152 3145728 AdvFS # (Cyl. 619*- 1032*)
e: 2097152 5242880 AdvFS # (Cyl. 1032*- 1444*)
f: 14680064 7340032 AdvFS # (Cyl. 1444*- 4334*)
g: 8415779 22020096 AdvFS # (Cyl. 4334*- 5991*)
h: 5129205 30435875 unused 0 0 # (Cyl. 5991*- 7000)

Can I use the last partition ( that is 'h') for the additional swap partition? Right now I can't go for RAM increase.

Please suggest.
6 REPLIES 6
Venkatesh BL
Honored Contributor

Re: Add swap space ??

Yes, you can.

The closest region is the 'g' partition, which starts from 22020096 and ends at 30435875 (size: 8415779). So, the 'h' partition is free.
admin1979
Super Advisor

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.

disklabel -rw -t advfs /dev/rz0h
swapon /dev/rz0h
Reboot

Please correct me if Im wrong or atleast point me in right direction.

Thanks
Martin Moore
HPE Pro

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.

Martin

I work for HPE
A quick resolution to technical issues for your HPE products is just a click away HPE Support Center
See Self Help Post for more details

Accept or Kudo

Venkatesh BL
Honored Contributor

Re: Add swap space ??

Martin is right.

[OT]:
Also, read http://forums11.itrc.hp.com/service/forums/helptips.do?#28 to learn about member points system and assign points accordingly.
admin1979
Super Advisor

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 and
Utilities for Digital UNIX Version 4.0 Guide to File System Administration" But strangely did not find much help from it.

Am I missing out something here?

Thanks
Venkatesh BL
Honored Contributor