1838662 Members
7923 Online
110128 Solutions
New Discussion

swap space

 
Donna Powell
Advisor

swap space

I posted a question at the beginning of the week, now I can't find it so here we go again:
I have 2 pieces of swap space, 1 in vg00 and an extra piece in vg01/ lvol2. what I would like to do is remove /dev/vg01 and put the swap space on another lvol. In my original request I was told to comment out the entry in the fstab and reboot, and the system would not recognize the lvol, But what I am really looking to do is bring the system to single user mode remove vg01 and recreate logical volumes over again. If anyone has a step by step help doc on this I would appreciate a cop
5 REPLIES 5
Roger Baptiste
Honored Contributor

Re: swap space

Here we go:

The assumption here is , you want to blow
away your vg01. In that case, take backup of
all the filesystems which are in vg01.
(grep vg01 /etc/fstab to get the list).

Next, comment out vg01 entries in /etc/fstab.

Boot in single user mode . IN fact, you
can boot even in multi user mode. Makes
no difference.

ll /dev/vg01/group -> make a note of this.

vgexport -m /tmp/vg01_old.map /dev/vg01
Now your VG01 is effectively gone.

Recreate Vg01,
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x??0000


pvcreate /dev/dsk/cxtydz (you may need to
use -f option, but be sure!)
vgcreate /dev/vg01 /dev/dsk/cxtydz ....

(make sure what disks you want.)

Next create LV's as per the needs.

****

IS there any specific reason to blow
away the VG and recreate it?? If you just
want to remove swap on vg01, you can
do a lvremove on the swap volume after the
reboot.

-raj
Take it easy.
John Bolene
Honored Contributor

Re: swap space

what you want to do is add more swap before taking away the old swap

device swap is the best if you have unused devices

go into sam -> disks and file systems -> swap -> add device swap using LVM (after having created a new volume)

you can then highlight the swap area you want to remove and remove it

exit SAM

then reboot
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
James R. Ferguson
Acclaimed Contributor

Re: swap space

Hi Donna:

Here's your original post:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf96d0b0717d1d5118ff40090279cd0f9,00.html

You cannot get around the reboot to rid yourself of the active device swap and therefore 'lvremove' the logical volume first.

Regards!

...JRF...
Sanjay_6
Honored Contributor

Re: swap space

Hi Donna,

My guess is, if you want to remove the swap, you have to reboot the system all the way down and then bring it back up. When you boot the system, the kernel recognises and activates the swap. It won't deactivate them, if the system is brought into single user mode. So you need to reboot the system after removing the swap.

Here are two threads which might help you,

http://us-support.external.hp.com/cki/bin/doc.pl/sid=c27550590abacaa2e9/screen=ckiDisplayDocument?docId=200000053039597

http://us-support.external.hp.com/cki/bin/doc.pl/sid=c27550590abacaa2e9/screen=ckiDisplayDocument?docId=200000056198282

Hope this helps.

Regds
Printaporn_1
Esteemed Contributor

Re: swap space

because that swap space is active , bring system to single user it still active.
the only is comment it out from /etc/fstab and reboot.
enjoy any little thing in my life