Operating System - HP-UX
1758784 Members
2895 Online
108875 Solutions
New Discussion юеВ

how to remove /dev/vg01/myswap?

 
SOLVED
Go to solution
iambluegary
Advisor

how to remove /dev/vg01/myswap?

can i use rm /dev/vg01/myswap?
help ,help,help :-)
6 REPLIES 6
Steven Sim Kok Leong
Honored Contributor

Re: how to remove /dev/vg01/myswap?

Hi,

The proper way is to use lvremove.

# lvremove /dev/vg01/myswap

Hope this helps. Regards.

Steven Sim Kok Leong
Kurt Beyers.
Honored Contributor
Solution

Re: how to remove /dev/vg01/myswap?

That won't do the trick. Launch SAM:

Disk and File Systems
Swap
Select /dev/vg01/myswap
Actions -> Remove

Kurt
Michael Tully
Honored Contributor

Re: how to remove /dev/vg01/myswap?

Hi,

Unfortunately you can't just remove swap. The
system will require a reboot to remove it
permanently.
This is how:

Comment out the line in /etc/fstab that contains your swap volume.

Reboot your system.

Remove the logical volume or re-use it.
Anyone for a Mutiny ?
Steven Sim Kok Leong
Honored Contributor

Re: how to remove /dev/vg01/myswap?

Hi,

Yes, if this is a swap logical volume, then SAM should do the trick.

Hope this helps. Regards.

Steven Sim Kok Leong
Juan Manuel L├│pez
Valued Contributor

Re: how to remove /dev/vg01/myswap?

Hi.
First of all, you have to eliminate the input of your swap of /etc/fstab. Them, reboot your system, with it, your swap will be not active ( cause you can NOT delete any swap if is being used ), and them use lvdelete command to delete your lv swap.

I hope this clear your doubs

Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.
Trond Haugen
Honored Contributor

Re: how to remove /dev/vg01/myswap?

If the swap-lv isn't in use simply remove it using SAM or 'lvremove /dev/vg01/myswap'. You can check with swapinfo it it enabled as swap.
If it is you need or first disbale swapping on the lvol. Again you can use SAM or simply delete the line in fstab. Then a reboot is required.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn