increase swap after RAM upgrade, but no space available on resting partitions
Hi I am not a linux pro! I have 3 partitions, one swap (1G), one for winNT, and the main linux partition. I need to double the swap space (I have 2G RAM now). With yast I cannot resize (increase) the swap since no space is left in the other partitions. The linux main partition cannot be resized with yast as long as it is mounted and I have a bad feeling unmounting it.. what do you recommend? thanks a lot cheers c
What is your requirement to add swap? Just because you've added memory does not require an increase swap. -Herman On Tuesday 19 April 2005 07:35, Christoph Lehmann wrote:
Hi I am not a linux pro! I have 3 partitions, one swap (1G), one for winNT, and the main linux partition. I need to double the swap space (I have 2G RAM now). With yast I cannot resize (increase) the swap since no space is left in the other partitions. The linux main partition cannot be resized with yast as long as it is mounted and I have a bad feeling unmounting it..
what do you recommend?
thanks a lot cheers c
because sometimes I really need 2G of swap space (statistical computations) c Herman Knief wrote:
What is your requirement to add swap? Just because you've added memory does not require an increase swap.
-Herman
On Tuesday 19 April 2005 07:35, Christoph Lehmann wrote:
Hi I am not a linux pro! I have 3 partitions, one swap (1G), one for winNT, and the main linux partition. I need to double the swap space (I have 2G RAM now). With yast I cannot resize (increase) the swap since no space is left in the other partitions. The linux main partition cannot be resized with yast as long as it is mounted and I have a bad feeling unmounting it..
what do you recommend?
thanks a lot cheers c
On Tue April 19 2005 9:54 am, Christoph Lehmann wrote:
because sometimes I really need 2G of swap space (statistical computations) c
Well, you have a couple of options... 1. You might be able to resize the partition from "rescue mode". i.e. boot from the SuSE CD / DVD, select "rescue" (or whatever it's called) -- that'll boot up without the file system mounted. I honestly don't remember what resizing capabilites you'll have, so YMMV. 2. Create a "swap file" in your f/s and swap to it. This is pretty easy and can be done without rebooting, etc. The main limitation is that it'll be a little bit slower because you'll have the filesystem overhead in your swaps, so you'll want to set it at a lower priority. IIRC, the steps are something like this: BTW, if you choose to do this, you'll have to add the swapfile to your /etc/fstab to have it swap to it at bootup. # dd if=/dev/zero of=<swapfile> bs=1024k count=<size-in-megs> # mkswap <swapfile> # swapon -p <priority> <swapfile> Here's a quick example setting up a 10m swap (just for illustration)
talon:~ # dd if=/dev/zero of=/home/swapfile bs=1024k count=10 10+0 records in 10+0 records out talon:~ # mkswap /home/swapfile Setting up swapspace version 1, size = 10481 kB talon:~ # swapon -p 100 /home/swapfile talon:~ # cat /proc/swaps Filename Type Size Used Priority /dev/hda7 partition 1572944 12 42 /home/swapfile file 10232 0 100
Hope this helps. -Nick -- <<< There is no spoon. >>> /`-_ Nicholas R. LeRoy The Condor Project { }/ http://www.cs.wisc.edu/~nleroy http://www.cs.wisc.edu/condor \ / nleroy@cs.wisc.edu The University of Wisconsin |_*_| 608-265-5761 Department of Computer Sciences
because sometimes I really need 2G of swap space (statistical computations) c
Herman Knief wrote:
What is your requirement to add swap? Just because you've added memory does not require an increase swap.
-Herman
On Tuesday 19 April 2005 07:35, Christoph Lehmann wrote:
Hi I am not a linux pro! I have 3 partitions, one swap (1G), one for winNT, and the main linux partition. I need to double the swap space (I have 2G RAM now). With yast I cannot resize (increase) the swap since no space is left in the other partitions. The linux main partition cannot be resized with yast as long as it is mounted and I have a bad feeling unmounting it..
what do you recommend? First, you can have multiple swap spaces. Secondly, you can define a file in a Linux file system as swap. Take a look at the mkswap(8) and swapon(8) and swapoff(8) commands. The mkswap(8) man
On Tuesday 19 April 2005 10:54 am, Christoph Lehmann wrote:
page has a section on how to make a swap file.
If you need to resize the root partition, you need to boot Linux as a
standalone, either use the SuSE rescue Cd or any other modern Linux. I
usually use Knoppix with QTParted.
--
Jerry Feldman
Christoph, On Tuesday 19 April 2005 07:35, Christoph Lehmann wrote:
Hi I am not a linux pro! I have 3 partitions, one swap (1G), one for winNT, and the main linux partition. I need to double the swap space (I have 2G RAM now). With yast I cannot resize (increase) the swap since no space is left in the other partitions. The linux main partition cannot be resized with yast as long as it is mounted and I have a bad feeling unmounting it..
Bad feeling notwithstanding, the root file system cannot be unmounted while the system is running. That's why you need an alternative root (a CD/DVD, e.g., or a RAM disk) from which to boot if you want to run file system checks on the root.
what do you recommend?
You have 2G of RAM and you say (in a different reply) that you need 2G of swap. If the statistical software you run has a working set of 4G, then you better get 4G of RAM, or you'll be waiting a long time for those statistical computations to complete. That said, what I did when I found myself in a similar situation (hemmed in by existing disk partitioning in the face of evolving system requirements) was to simply swap to a file. In all likelihood, the overhead of accessing a large swap file will not be onerous (especially if you use a file system that's oriented toward very large files, such as XFS).
thanks a lot cheers c
Randall Schulz
The Tuesday 2005-04-19 at 16:35 +0200, Christoph Lehmann wrote:
I am not a linux pro! I have 3 partitions, one swap (1G), one for winNT, and the main linux partition. I need to double the swap space (I have 2G RAM now). With yast I cannot resize (increase) the swap since no space is left in the other partitions. The linux main partition cannot be resized with yast as long as it is mounted and I have a bad feeling unmounting it..
what do you recommend?
¿Do you have free space anywhere on that disk? Ideally, somewhere to create a new 1 G partition. -- Cheers, Carlos Robinson
participants (6)
-
Carlos E. R.
-
Christoph Lehmann
-
Herman Knief
-
Jerry Feldman
-
Nick LeRoy
-
Randall R Schulz