1834197 Members
2499 Online
110065 Solutions
New Discussion

Re: Swap Help

 
SOLVED
Go to solution
Steven Chen_1
Super Advisor

Swap Help

Hi,

I don't have swap shortage issue, but some doc indicates fstab should have an entry for sway file. Our K260 came as having no primary entry on fstab, but swapinfo does show that we have that on one lvm.

Just would like to confirm again with HP guru: would that means it is loaded or not?

Thanks,

Steven
Steve
7 REPLIES 7
Praveen Bezawada
Respected Contributor
Solution

Re: Swap Help

HI
/etc/fstab is the file, the system reads upon reboot to mount the filesystems.
Initially the filesystems are mounted manually but after reboot the filesystems which do not have entries in /etc/fstab do not get mounted.

..BPK..
James R. Ferguson
Acclaimed Contributor

Re: Swap Help

Hi Steven:

Your primary swap is *not* represented in /etc/fstab. If you place an entry there, as you would for additional device swap, then you will get an error at boot/startup, since activation of the primary swap device will be attempted twice.

...JRF...
JACQUET
Frequent Advisor

Re: Swap Help

Hi,

Runing the command "swapinfo -a" will show you the configured swap area on your system.
For information, there are 2 kinds of swap :
Device Swap and File System Swap.
For device swap (which is usually /dev/vg00/lvol2 on a standard installation of HP-UX), you don't have of course an entry in /etc/fstab, because the swap is directly R/W from the device (this is more efficient)
But for FS swap, if you want to activate it at boot, you have to modify an add an entry in /etc/fstab.
swapinfo -a, in the first column, show you what type of swap is concerned.

PJA.
PJA
Victor_5
Trusted Contributor

Re: Swap Help

Hi Steven:

/etc/fstab contains a list of mountable file-system entries. for those entries, just to make sure they are enabled at every system boot. You cannot see the swap info if you have no entry in your /etc/fstab after system reboot. However, a system needs at least one device swap area as primary swap area, by default, it is located on the same disk as the root file system. After system boot, you can use swapon -a to enable all entried in /etc/fstab.

For swapinfo, it lists every configured swap areas and reports what percentage of each is currently in use.
Magdi KAMAL
Respected Contributor

Re: Swap Help

Hi Steven,

When installing hp-ux you got automaticaly the device swap. This you must not integrate it in /etc/fstab ( conflicts will happen ).

But if you manualy create a new file system swap ( for better performance for example ) in this case you need to manually add it in /etc/fstab so that in the next boot it will be mounted.

Magdi
Sundar_7
Honored Contributor

Re: Swap Help


I am also going to repeat the same thing
(Yes ofcourse with the hope of getting some marks :-)

Yes..Some doc may say U have to have an entry for swap in the /etc/fstab..

But this is not true for Primary Swap..

U are always going to have a raw lv as ur primary swap which will be automatically enbaled at boot..

Only in the case that Primary swap is not good enough to handle ur VM load then U are going to add additional swap space to the system.

And here U are having the option of selecting between Raw lv or a File system.

in that case U are going to add entry to the /etc/fstab ..

Hope I am clearing (again) U.

Sundar
Learn What to do ,How to do and more importantly When to do ?
A. Clay Stephenson
Acclaimed Contributor

Re: Swap Help

Hi Steven,

The replies you have received are correct but I actually do make an /etc/fstab entry (of sorts) for primary swap. I find it useful to insert an entry as a comment ('#') so that other admins don't help me out (or myself in a moment of mental challenge) and find some 'unused' space just begging to be used.

Clay
If it ain't broke, I can fix that.