Operating System - HP-UX
1752292 Members
4793 Online
108786 Solutions
New Discussion юеВ

Re: How to recuperate a lvol taht is allocated to swap ?

 
SOLVED
Go to solution
Frank de Vries
Respected Contributor

How to recuperate a lvol taht is allocated to swap ?

I have a swap configured like this:

sapsrv1:/root#swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1048576 0 1048576 0% 0 - 1 /dev/vg00/lvol2
dev 5120000 0 5120000 0% 0 - 0 /dev/vg00/lvol9
dev 8192000 0 8192000 0% 0 - 0 /dev/vg00/lvol10
dev 8192000 0 8192000 0% 0 - 0 /dev/vg00/lvol11
reserve - 61444 -61444
memory 4479808 313928 4165880 7%
sapsrv1:/root#

As this is too much I would like to remove
the lvol9

What is the command to do that.

I tried lvremove but that gives this message:

sapsrv1:/root#lvremove /dev/vg00/lvol9
The logical volume "/dev/vg00/lvol9" is not empty;
do you really want to delete the logical volume (y/n) : y
lvremove: Couldn't delete logical volume "/dev/vg00/lvol9":
The specified logical volume is open, or
a sparing operation is in progress.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
sapsrv1:/root#

Thanks
Look before you leap
9 REPLIES 9
Stephen Keane
Honored Contributor
Solution

Re: How to recuperate a lvol taht is allocated to swap ?

You can't remove swap from a running system. You need to edit /etc/fstab and remove the entry for lvol9, then reboot the machine. Then you can lvremove the lvol if you wish.
Frank de Vries
Respected Contributor

Re: How to recuperate a lvol taht is allocated to swap ?

Just one comment,
your advise to take a swap-lvol from fstab
appears to be difficult because
it is not part of fstab

/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg00/lvol4 /tmp vxfs delaylog 0 2
/dev/vg00/lvol5 /home vxfs delaylog 0 2
/dev/vg00/lvol6 /opt vxfs delaylog 0 2
/dev/vg00/lvol7 /usr vxfs delaylog 0 2
/dev/vg00/lvol8 /var vxfs delaylog 0 2
/dev/vg00/lvol9 ... swap pri=0 0 0
/dev/vg00/lvorasys /usr/oracle vxfs delaylog 0 1

Any idea how I get the lvol out of swap ?
Look before you leap
Arunvijai_4
Honored Contributor

Re: How to recuperate a lvol taht is allocated to swap ?

/dev/vg00/lvol9 ... swap pri=0 0 0

Is it not a swap ?? But, i can't see lvol2,10 and 11.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Stephen Keane
Honored Contributor

Re: How to recuperate a lvol taht is allocated to swap ?

It's this line

/dev/vg00/lvol9 ... swap pri=0 0 0

you can either comment it out, or remove it.
Muthukumar_5
Honored Contributor

Re: How to recuperate a lvol taht is allocated to swap ?

Remove as,

# lvremove -v /dev/vg00/lvol9

It will not expect user confirmation.

hth.
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: How to recuperate a lvol taht is allocated to swap ?

Really bad today on typing :)

Try as,

lvremove -f /dev/vg00/lvol9

hth.
Easy to suggest when don't know about the problem!
Stephen Keane
Honored Contributor

Re: How to recuperate a lvol taht is allocated to swap ?

Sorry, I thought you wanted to remove lvol9 only. You need to differentiate between device swap and filesystem swap. Looking at your swapinfo output it appears you are using device swap only.

The easiest way is to go into SAM

SAM -> Disk and Filesystems -> Swap

Select the lvols you want to remove ... (space)

Actions -> Remove
Yogeeraj_1
Honored Contributor

Re: How to recuperate a lvol taht is allocated to swap ?

hi,

Secured and easiest way is to do it using SAM.

SAM Areas:Disks and File Systems->Swap


This will list all the SWAPs and you can just select (using space bar) and action->remove

hope this help!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Frank de Vries
Respected Contributor

Re: How to recuperate a lvol taht is allocated to swap ?

Thanks for your replies,
I am up to date know.

Further more I enjoyed the the extra comments/feedback.
Not only constructive but sometimmes
humurous as well.

Keep smiling ;)

Thanks
Look before you leap