1839588 Members
2395 Online
110151 Solutions
New Discussion

removing /swap question

 
SOLVED
Go to solution
Chris Bailey_4
Occasional Contributor

removing /swap question

I have a box that came preconfigured and when I run the bdf command I come accross an entry:
/dev/vg00/swap 5120000 2428 4797795 0% /swap

when I run the swapinfo command I get:
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4194304 0 4194304 0% 0 - 0 /dev/vg00/lvol2
dev 4096000 0 4096000 0% 0 - 1 /dev/vg00/swap2
reserve - 170168 -170168
memory 1459116 400412 1058704 27%

To me it looks like I have about 13GB of swap. I have 2GB of RAM so I would only need 4GB of swap. Is it safe for me to remove /dev/vg00/swap and should I remove /dev/vg00/swap2 and leave /dev/vg00/lvol2?

Also I have to increase the size of /opt, currently it is:
/dev/vg00/lvol6 1327104 1284560 42352 97% /opt

Could anyone recommend a size I should increase it to? It's only about 200MB right now.

And finally, I need to increase my / size but have read you are not able to, is that true?
Thanks for any help you can give!
4 REPLIES 4
Pete Randall
Outstanding Contributor

Re: removing /swap question

Chris,

Yes, it looks like you could safely remove the "swap2" entry.

As far as the size of /opt is concerned, it depends. Do you anticipate a lot of growth? Do you have a lot of application software to install? If you do, then you might want to double the size to roughly 2Gb. If not, then adding a couple of hundred Mb would be sufficient.


Pete

Pete
David Child_1
Honored Contributor

Re: removing /swap question

Chris,

It doesn't look like your system is defined to use /swap as actual swap. If it were I would highly recommend against it as file system swap is really slow.

Most likely this /swap file system was intended for another purpose. If you are sure you are not using it then you can remove it without having to worry about reconfiguring swap.

David
Patrick Wallek
Honored Contributor
Solution

Re: removing /swap question

OK, the /dev/vg00/swap is NOT showing up in the swapinfo ouput as swap. It appears that someone created an LV and named it swap and mounted it. Maybe it was used for filesystem swap at some point, but it's not in use now, so it should be safe to lvremove it.

Unless you desperately need the disk space, I wouldn't worry too much with swap2. Keep in mind that the only way to remove swap is to comment it out of /etc/fstab (or just delete the line) and reboot your system. There is NO other way.

Judging from your swapinfo output, you aare doing fine so 4GB swap would probably be safe for you.

Now for /opt -- If you have the disk space increase it to 3GB (3072 MB). You are currently at 1.3 GB and 97% used so if anything else needs to be installed to /opt it will probably fail because of disk space issues.

Finally / -- The ONLY fairly easy supported way to increase your / LV is to create an Ignite backup (either tape or network via make_tape_recovery or make_net_recovery), boot from that backup and increase / as part of the reinstall.

There have been discussions here about manipulating the LV immediately following /, but that can be a pain.

The key thing to keep in mind with the / LV is that /stand (lvol1), pri. swap (lvol2) and / (lvol3) MUST be contiguous and all their extents must be contiguous. That's why it is not an easy task.
Chris Bailey_4
Occasional Contributor

Re: removing /swap question

Wow, you guys are fast! All of your answers have helped and I much appreciate it!

Thanks!

Chris