Operating System - HP-UX
1833276 Members
3077 Online
110051 Solutions
New Discussion

Re: add device swap space

 
SOLVED
Go to solution
szhiyong
Frequent Advisor

add device swap space

Hi,

I meet some problem when I try to add deevice swap space. I first use sam to add swap kind of logical volume. Then I go to swap manager, I use "use logical volume mamager " to add device swap space. It return error "no unused logical volume".

Would someone please tell me what is wrong?

Thanks a lot.

Zhiyong
My life is now asking and learning, I wish It can change into replying and discussing
7 REPLIES 7
steven Burgess_2
Honored Contributor

Re: add device swap space

Hi

Are you using the whole disk approach or adding the device swap at the end of a disk?
take your time and think things through
steven Burgess_2
Honored Contributor
Solution

Re: add device swap space

Try it from the command line

If you are using a swap area of 200 Mbytes at the end of disk c1t1d0 and the rest of it for filesystem, the newfs command is as follows

newfs -R 200 /dev/rdsk/c1t1d0

For complete disk use the swapon command
take your time and think things through
Michael Tully
Honored Contributor

Re: add device swap space

Hi,

First you need to see what swap has been
configured. I don't use SAM for any disk
related activities. See if you can follow
this. You need to be 'root'

e.g.
# swapinfo -tam
# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 33 991 3% 0 - 1 /dev/vg00/lvol2
dev 4096 33 4063 1% 0 - 1 /dev/vgswap1/swap2
reserve - 3131 -3131
memory 3149 2586 563 82%
total 8269 5783 2486 70% - 0 -

If your newly created swap partition does not
appear, you may need to create it again.

# lvcreate -C y -n swapname /dev/yourvg
# lvextend -L /dev/yourvg/swapname
# swapon /dev/yourvg/swapname
add entry to /dev/fstab file like below

/dev/yourvg/swapname ... swap pri=1 0 0

Save the file and your finished. Do make sure
that you have enough space in your volume
group before starting.

# vgdisplay /dev/yourvg

HTH
-Michael

Anyone for a Mutiny ?
steven Burgess_2
Honored Contributor

Re: add device swap space

By the way, I like your personal quote

`My life is now asking and learning, I wish It can change into replying and discussing'

I feel like that.

steve
take your time and think things through
steven Burgess_2
Honored Contributor

Re: add device swap space

I have attached a complete LVM reference doc

take your time and think things through
Animesh Chakraborty
Honored Contributor

Re: add device swap space

Hi,
If you go to swap manager area then it is a normal message.

Go to Logical volume manager
create new logical volume
select fs type as swap with drop down menu press space bar to see the list.(file system,None(raw) and swap three options will be there)

I too liked your quote:)
Did you take a backup?
szhiyong
Frequent Advisor

Re: add device swap space

Hi,

Thanks a lot for all your help. I really appreciated it.

Steven, thanks for your attached documentation.

Have a good day.

zhiyong
My life is now asking and learning, I wish It can change into replying and discussing