Operating System - HP-UX
1751807 Members
5015 Online
108781 Solutions
New Discussion юеВ

Re: How to add the secondary swap to /etc/fstab

 
amreek bansal
Frequent Advisor

How to add the secondary swap to /etc/fstab


Hi..I have setup a secondary swap, I just need to know whats the correct syntax to add it to /etc/fstab, so it gets picked up on reboot.

From what Ive seen and read, I have put

/dev/vgsw/myswap swap pri=X 0 0

It doesnt like correct to me, am I missing some syntax ??
Thanks.
7 REPLIES 7
Jozef_Novak
Respected Contributor

Re: How to add the secondary swap to /etc/fstab

Hello,

this is an example from fstab(1m) manpage:

/dev/vg01/lv10 / swap defaults 0 0

the directory field can be whatever you like, since it is ignored. Sometimes, three periods are entered in this field:

/dev/vg01/lv10 ... swap defaults 0 0

HTH,
J.
Steven E. Protter
Exalted Contributor

Re: How to add the secondary swap to /etc/fstab

Shalom,

Check against this document:
http://docs.hp.com/en/B2355-90950/ch06s03.html

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
Ganesan R
Honored Contributor

Re: How to add the secondary swap to /etc/fstab

Hi,

It should be like this..

/dev/vg01/swaplv . swap defaults 0 0
Best wishes,

Ganesh.
Michal Kapalka (mikap)
Honored Contributor

Re: How to add the secondary swap to /etc/fstab

Hi Amreek,

kmsrprdb:/#strings /etc/fstab |grep swap
/dev/vg00/lvolswap2 ... swap pri=1 0 0

mikap
Mohammad Sanaullah
Frequent Advisor

Re: How to add the secondary swap to /etc/fstab

Hi, Bansal

# echo "/dev/vg11/lvol1 ... swap pri=0 0 0" >> /etc/fstab
is the procedure to add the swap logical volume created on the /etc/fstab.

prior to this, after swap logical volume is created do # swapon -p 0 /dev/vg11/lvol1

where /dev/vg11/lvol1 is the logical volume created for the server.

Mohammad Sanaullah
Alive
Suraj K Sankari
Honored Contributor

Re: How to add the secondary swap to /etc/fstab

Hi,

To creating device swap 1st we have to check the value of maxswapchunks
current value will allow for more swap or not then
Create a swap volume

#lvcreate -l (size) -n swap123 -C y -r n /dev/vgxx

Then enable swap:

#swapon -p 1 /dev/vgxx/swap123

Then add the entry in the fstab file

/dev/vgxx/swap123 /default swap pri=1


Suraj
amreek bansal
Frequent Advisor

Re: How to add the secondary swap to /etc/fstab

I found solution