[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Swap

>    Thanks for the information, it has been interesting but is it not 
> to start on the current kernel and do swapoff and then change the swap 
> partition and then swapon again? Or comment it out in fstab and then reboot?
> Anyway, I have resized a swap partition some years ago that way.
> Regards
> Gudjon
> > Yes, that is another way to go.  However, in the case where only one
> swap space is configured, I don't believe the kernel will allow it to be
> deactivated (I may be mis-remembering, or perhaps its the case in a UNIX
> SVR4 system?).
Yes, I should have tried it again before posting,
# free
             total       used       free     shared    buffers     cached
Mem:       4126684    4071152      55532          0    1097868    1463912
-/+ buffers/cache:    1509372    2617312
Swap:      7711160          0    7711160

Then turn off swap

# swapoff -a
# free
             total       used       free     shared    buffers     cached
Mem:       4126684    4068316      58368          0    1097820    1464848
-/+ buffers/cache:    1505648    2621036
Swap:            0          0          0

and turn it on again

# swapon -a
# free
             total       used       free     shared    buffers     cached
Mem:       4126684    4071912      54772          0    1097844    1464840
-/+ buffers/cache:    1509228    2617456
Swap:      7711160          0    7711160

Worked perfectly but I guess it is safer if the partition is empty.
> So, it may be safer to boot from a rescue CD and work from that
> environment, than to try to use swapoff on a single swap space used by
> the currently running kernel.  And, if you're going to edit fstab and
> reboot anyway, why not just do it from the CD and avoid the fstab edit
> step altogether?
I always lend out or loose my rescue disks in some other way:)
> FYI, you should reply to the full list, not to a poster only, as others
> may be interested in the question and answer.
If I'm not sure of what I'm saying I try to minimise the traffic on the list 
by sending a private message, asking for a reply on the list if it makes 


Reply to: