Re: Swap does not showup

 
brian_31
Super Advisor

Swap does not showup

I was trying to add swap by 8GB and here is what i found

# swapinfo -atm
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2
dev 8192 0 8192 0% 0 - 1 /dev/vg00/lvswap1
reserve - 12288 -12288
memory 19523 13975 5548 72%
total 31811 26263 5548 83% - 0 -
# lvcreate -C y -r n -L 8192 -n lvswap2 /dev/vg00
lvcreate: Logical volume "/dev/vg00/lvswap2" already exists.

Two things strange here i do not find the entry for lvswap2 in /etc/fstab and also inspite of high memory usage the processes are not swapping (0 usage). i am not seeing this lvswap2 at all

Thanks

Brian
3 REPLIES 3
Luk Vandenbussche
Honored Contributor

Re: Swap does not showup

Hi,

Check the output off
vgdisplay -v vg00

Perhaps a lv with the name lvswap2 exists yet.

But is might not be activated
IT_2007
Honored Contributor

Re: Swap does not showup

It look like lvswap2 already exist but not activated. Add it in /etc/fstab and activate it using swapon -a

you can check results using swapinfo -ntm
Victor BERRIDGE
Honored Contributor

Re: Swap does not showup

Hi Brian...
As mentionned, next step after creation is:
swapon /dev/vg00/lvswap2 (priority defaults to 1)

update /etc/fstab isnt automatic you will have to add yourself this line in fstab:

All the best
Victor
/dev/vg00/lvswap2 ... swap pri=0 0 0