System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to give secondary swap entry in /etc/fstab.

 
jeevarajkn
Frequent Advisor

How to give secondary swap entry in /etc/fstab.

Dear All

server-HPUX B.11.23

Current swapinfo output.
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192 1829 6363 22% 0 - 1 /dev/vg00/lvol2
dev 6144 1833 4311 30% 0 - 1 /dev/vg00/lvswap
reserve - 10182 -10182
total 14384 13608 776 95% - 0 -

we are planning to create one more secondary swap of 4GB, please let me know how I can swapon(command syntax) this LV and what entry wants to give in fstab file.
current fstab entry is,

/dev/vg00/lvswap ... swap pri=1 0 0

Regards

Jeeva.
4 REPLIES
Johnson Punniyalingam
Honored Contributor

Re: How to give secondary swap entry in /etc/fstab.

Hi Jeeva,

Create the physical volume on the disk:
# pvcreate /dev/rdsk/c1t0d0

Create vg directory:
# mkdir /dev/vg14

Create the device file for your new character device:
# mknod /dev/vg14/group c 64 0x014000

NOTE: "vgnn: nn" is the vg number in decimal, "c" = character device, "64"
= driver number, "0xnn0000: nn" is the vg number in hexadecimal)

Create the volume group which will contain your secondary swap:
# vgcreate /dev/vg14 /dev/dsk/c1t0d0

Create the logical volume for your secondary swap:
# lvcreate -L 128 /dev/vg14

NOTE: "-L 128" is the size of desired swap

Verify the physical volume:
# pvdisplay /dev/dsk/c1d0d0

Verify the physical volume assigned to volume group:
# vgdisplay -v

Verify the logical volume:
# lvdisplay /dev/vg14/lvol15

Use SAM to declare your new secondary swap or use the command line:
# swapon /dev/vg14/lvol15

Verify it has been added in "/etc/fstab" when using SAM, or add it manually when using the command line.

Example:
/dev/vg14/lvol15 . swap defaults 0 0

Thanks,
Johnson

Pls assign points
Problems are common to all, but attitude makes the difference
Venkatesh BL
Honored Contributor

Re: How to give secondary swap entry in /etc/fstab.

Tingli
Esteemed Contributor

Re: How to give secondary swap entry in /etc/fstab.

Go to SAM and create a logical volume. When creating the volume you can define it as a swap space. And it settles things all.
jeevarajkn
Frequent Advisor

Re: How to give secondary swap entry in /etc/fstab.

Dear All

I have completed the same through SAM>

Thanks.