[kwlug-disc] Add swap space while a centos server is live.
Colin K
colin at void11.com
Sat Oct 29 19:51:22 EDT 2011
Currently there is no swap on this server! it tweaks me a little that this
VPS didnt come with swap by default but i think they do that for marketing.
On Sat, Oct 29, 2011 at 7:13 PM, Chris Frey <cdfrey at foursquare.net> wrote:
> You can turn swap partitions off and on at will with the swapon/swapoff
> commands.
>
> You can also use a plain old file as swap, in a pinch, as root:
>
> dd if=/dev/zero of=swapfile bs=1024000 count=512
> mkswap ./swapfile
> swapon ./swapfile
>
> So you could create this as a temporary swapfile, then turn off the main
> one,
> and then go about doing whatever resizing you need.
>
> Once this is changed, don't forget to update your /etc/fstab config for
> the new swap location.
>
> - Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20111029/dc66cbf6/attachment.htm>
More information about the kwlug-disc
mailing list