Operating System - HP-UX
1753792 Members
7245 Online
108799 Solutions
New Discussion юеВ

one of two swap dev is not added in /etc/fstab.

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

one of two swap dev is not added in /etc/fstab.

Hi

I am using hpux 11.00.

I joined recently as unix admin.

I am able to see two swap devices in "swapinfo" output. But i can find that only one swap dev is added in /etc/fstab.

Ex:

root@lgapps:/root > swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4194304 0 4194304 0% 0 - 1 /dev/vg00/lvol2
dev 4194304 0 4194304 0% 0 - 1 /dev/vg00/lvol11
reserve - 7034260 -7034260
memory 9223336 2034284 7189052 22%




root@lgapps:/root > more /etc/fstab | grep swap
/dev/vg00/lvol11 ... swap pri=1 0 0


So can we add the missing swap dev in /etc/fstab?

we can't the swap device if we did not add that in /etc/fstab?


can we have two swap entries in /etc/fstab?

pls adivce me.
17 REPLIES 17
Pete Randall
Outstanding Contributor
Solution

Re: one of two swap dev is not added in /etc/fstab.

Your primary swap will not appear in /etc/fstab (nor should it). The man pages are your friends!


Pete

Pete
Sajjad Sahir
Honored Contributor

Re: one of two swap dev is not added in /etc/fstab.

Dear Senthil kumar.

if u want the swap next reboot onwards u should add in /etc/fstab file

thanks and regards

Sajjad Sahir
Patrick Wallek
Honored Contributor

Re: one of two swap dev is not added in /etc/fstab.

Your primary swap area, /dev/vg00/lvol2, does not have to be in /etc/fstab.

If you run 'lvlnboot -v' you will see a line for "swap" followed by an lvol name, which should be lvol2, followed by the disks that this contain it.

This is activated automatically by HP-UX during boot before the fstab file is processed.
Mel Burslan
Honored Contributor

Re: one of two swap dev is not added in /etc/fstab.

/dev/vg00/lvol2 is the primary swap and regardless it is in fstab or not, it gets activated at boot time. Any secondary, tetriary and so forth swap devices need to be addressed in the fstab file in order to get activated at boot time automatically. Otherwise you will need to enable them manually after the boot.

Hope this explains
________________________________
UNIX because I majored in cryptology...
Sajjad Sahir
Honored Contributor

Re: one of two swap dev is not added in /etc/fstab.


but one think i assume u have two swap only
one is u primary swap and one is u second swap, primary swap will not be in /etc/fstab file.if u want to create new swap then u should make an entry in /etc/fstab file otherwise u will not get next reboot onwards

thanks and regards

Sajjad Sahir
V. Nyga
Honored Contributor

Re: one of two swap dev is not added in /etc/fstab.

Hi,

/dev/vg00/lvol2 is the 'standard swap' and is not shown in /etc/fstab.

Your lvol11 is an additional swap and so shown in fstab.
Everything is ok, so.

You can use SAM to check your swap, too.
Both device swaps should be 'Enabled - now/on boot'

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
Sunny123_1
Esteemed Contributor

Re: one of two swap dev is not added in /etc/fstab.

Hi Senthil kumar

The primary swap area, /dev/vg00/lvol2, does not have to be in /etc/fstab.

If you want to list your swap device use lvlnboot -v

It will shows the swap devices you have which is automatically added after reboot.

Regards
Sunny
senthil_kumar_1
Super Advisor

Re: one of two swap dev is not added in /etc/fstab.

Hi All

Output of lvlnboot is

root@lgapps:/root > lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c1t6d0 (0/0/2/0.6.0) -- Boot Disk
/dev/dsk/c2t6d0 (0/0/2/1.6.0) -- Boot Disk

Boot: lvol1 on: /dev/dsk/c1t6d0
/dev/dsk/c2t6d0
Root: lvol3 on: /dev/dsk/c1t6d0
/dev/dsk/c2t6d0
Swap: lvol2 on: /dev/dsk/c1t6d0
/dev/dsk/c2t6d0
Dump: lvol2 on: /dev/dsk/c1t6d0, 0


In above output, I am not able to find the "/dev/vg00/lvol2".

So how to find that "/dev/vg00/lvol2" is the primary swap.


More examples:

Example 1:

root@lgapps:/root > lvdisplay -v /dev/vg00/lvol2 | more
--- Logical volumes ---
LV Name /dev/vg00/lvol2
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 4096
Current LE 512
Allocated PE 1024
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c1t6d0 512 512
/dev/dsk/c2t6d0 512 512



my understanding: this swap is placed in two physical volumes (c1t6d0, c2t6d0). so it is mirrored.

Example 2:

root@lgapps:/root > lvdisplay -v /dev/vg00/lvol11 | more

--- Logical volumes ---
LV Name /dev/vg00/lvol11
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 4096
Current LE 512
Allocated PE 512
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c1t6d0 512 512

My understanding: it is created in "/dev/dsk/c1t6d0".


Pls explain me.
Patrick Wallek
Honored Contributor

Re: one of two swap dev is not added in /etc/fstab.

This is your primary swap:

Swap: lvol2 on: /dev/dsk/c1t6d0
/dev/dsk/c2t6d0

The "lvol2" above refers to /dev/vg00/lvol2.

You are correct in that your primary swap is mirrored.

Your secondary swap is NOT mirrored. It needs to be.

If you have the disk space I would immediately do:

# lvextend -m 1 /dev/vg00/lvol11 /dev/dsk/c2t6d0