linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Support for > 2GB swap partitions?
@ 2005-01-10  0:34 Justin Piszcz
  2005-01-10  0:47 ` Grzegorz Kulewski
  2005-01-10  2:20 ` Andries Brouwer
  0 siblings, 2 replies; 6+ messages in thread
From: Justin Piszcz @ 2005-01-10  0:34 UTC (permalink / raw)
  To: linux-kernel

I remember reading in the past that > 2GB swap partitions were supported 
in Linux as of recent util-linux packages with a 2.6 kernel or am I wrong?

# fdisk -l

Disk /dev/sda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          16      128488+  83  Linux
/dev/sda2              17         526     4096575   82  Linux swap
/dev/sda3             527       30515   240886642+  83  Linux

# top
top - 19:33:43 up  3:26,  1 user,  load average: 1.33, 2.63, 1.66
Tasks: 166 total,   1 running, 165 sleeping,   0 stopped,   0 zombie
Cpu(s):  9.1% us,  3.4% sy,  0.0% ni, 83.5% id,  1.8% wa,  0.1% hi,  2.2% si
Mem:   2075192k total,  2062540k used,    12652k free,       64k buffers
Swap:        0k total,        0k used,        0k free,  1608272k cached


Only recognizes 2GB of 4GB?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Support for > 2GB swap partitions?
  2005-01-10  0:34 Support for > 2GB swap partitions? Justin Piszcz
@ 2005-01-10  0:47 ` Grzegorz Kulewski
  2005-01-10 10:09   ` Justin Piszcz
  2005-01-10  2:20 ` Andries Brouwer
  1 sibling, 1 reply; 6+ messages in thread
From: Grzegorz Kulewski @ 2005-01-10  0:47 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: linux-kernel

On Sun, 9 Jan 2005, Justin Piszcz wrote:

> I remember reading in the past that > 2GB swap partitions were supported in 
> Linux as of recent util-linux packages with a 2.6 kernel or am I wrong?
>
> # fdisk -l
>
> Disk /dev/sda: 251.0 GB, 251000193024 bytes
> 255 heads, 63 sectors/track, 30515 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
>   Device Boot      Start         End      Blocks   Id  System
> /dev/sda1   *           1          16      128488+  83  Linux
> /dev/sda2              17         526     4096575   82  Linux swap
> /dev/sda3             527       30515   240886642+  83  Linux
>
> # top
> top - 19:33:43 up  3:26,  1 user,  load average: 1.33, 2.63, 1.66
> Tasks: 166 total,   1 running, 165 sleeping,   0 stopped,   0 zombie
> Cpu(s):  9.1% us,  3.4% sy,  0.0% ni, 83.5% id,  1.8% wa,  0.1% hi,  2.2% si
> Mem:   2075192k total,  2062540k used,    12652k free,       64k buffers
> Swap:        0k total,        0k used,        0k free,  1608272k cached
>
>
> Only recognizes 2GB of 4GB?

No. It looks like you forgot to enable your swap at all! 2GB is your RAM. 
Your swap is 0.

Try
$ swapon /dev/sda2

or

$ swapon -a

if your swap is listed in /etc/fstab

(possibly with

$ mkswap /dev/sda2

before).

I am using 4 GB swaps on many machines (x86 and x86_64) for long time 
without any problems.


Grzegorz Kulewski


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Support for > 2GB swap partitions?
  2005-01-10  0:34 Support for > 2GB swap partitions? Justin Piszcz
  2005-01-10  0:47 ` Grzegorz Kulewski
@ 2005-01-10  2:20 ` Andries Brouwer
  2005-01-10 10:10   ` Justin Piszcz
  1 sibling, 1 reply; 6+ messages in thread
From: Andries Brouwer @ 2005-01-10  2:20 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: linux-kernel

On Sun, Jan 09, 2005 at 07:34:38PM -0500, Justin Piszcz wrote:

> I remember reading in the past that > 2GB swap partitions were supported 
> in Linux as of recent util-linux packages with a 2.6 kernel or am I wrong?
> 
> # fdisk -l
> /dev/sda2              17         526     4096575   82  Linux swap
> 
> # top
> Mem:   2075192k total,  2062540k used,    12652k free,       64k buffers
> 
> Only recognizes 2GB of 4GB?

A swap partition has a swap header that specifies its size
(and possibly what bad blocks exist on the swap partition).
Thus, if you did mkswap long ago, the useful size will not
have changed. Do swapoff; mkswap; swapon and mkswap will
tell you how large a swap partition it made, and swapon
will cause the kernel to say how much swap space was added.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: Support for > 2GB swap partitions?
  2005-01-10  0:47 ` Grzegorz Kulewski
@ 2005-01-10 10:09   ` Justin Piszcz
  2005-01-10 14:59     ` Nikola Ciprich
  0 siblings, 1 reply; 6+ messages in thread
From: Justin Piszcz @ 2005-01-10 10:09 UTC (permalink / raw)
  To: Grzegorz Kulewski; +Cc: linux-kernel

Oops, for some reason when I created the partitions with fdisk it did not 
create the swap parititon correctly even though I specified it was type 
swap.  mkswap /dev/sda2 && swapon /dev/sda2 fixed the problem, thanks.

On Mon, 10 Jan 2005, Grzegorz Kulewski wrote:

> On Sun, 9 Jan 2005, Justin Piszcz wrote:
>
>> I remember reading in the past that > 2GB swap partitions were supported in 
>> Linux as of recent util-linux packages with a 2.6 kernel or am I wrong?
>> 
>> # fdisk -l
>> 
>> Disk /dev/sda: 251.0 GB, 251000193024 bytes
>> 255 heads, 63 sectors/track, 30515 cylinders
>> Units = cylinders of 16065 * 512 = 8225280 bytes
>> 
>>   Device Boot      Start         End      Blocks   Id  System
>> /dev/sda1   *           1          16      128488+  83  Linux
>> /dev/sda2              17         526     4096575   82  Linux swap
>> /dev/sda3             527       30515   240886642+  83  Linux
>> 
>> # top
>> top - 19:33:43 up  3:26,  1 user,  load average: 1.33, 2.63, 1.66
>> Tasks: 166 total,   1 running, 165 sleeping,   0 stopped,   0 zombie
>> Cpu(s):  9.1% us,  3.4% sy,  0.0% ni, 83.5% id,  1.8% wa,  0.1% hi,  2.2% 
>> si
>> Mem:   2075192k total,  2062540k used,    12652k free,       64k buffers
>> Swap:        0k total,        0k used,        0k free,  1608272k cached
>> 
>> 
>> Only recognizes 2GB of 4GB?
>
> No. It looks like you forgot to enable your swap at all! 2GB is your RAM. 
> Your swap is 0.
>
> Try
> $ swapon /dev/sda2
>
> or
>
> $ swapon -a
>
> if your swap is listed in /etc/fstab
>
> (possibly with
>
> $ mkswap /dev/sda2
>
> before).
>
> I am using 4 GB swaps on many machines (x86 and x86_64) for long time without 
> any problems.
>
>
> Grzegorz Kulewski
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Support for > 2GB swap partitions?
  2005-01-10  2:20 ` Andries Brouwer
@ 2005-01-10 10:10   ` Justin Piszcz
  0 siblings, 0 replies; 6+ messages in thread
From: Justin Piszcz @ 2005-01-10 10:10 UTC (permalink / raw)
  To: Andries Brouwer; +Cc: linux-kernel

This was the problem, thanks!

On Mon, 10 Jan 2005, Andries Brouwer wrote:

> On Sun, Jan 09, 2005 at 07:34:38PM -0500, Justin Piszcz wrote:
>
>> I remember reading in the past that > 2GB swap partitions were supported
>> in Linux as of recent util-linux packages with a 2.6 kernel or am I wrong?
>>
>> # fdisk -l
>> /dev/sda2              17         526     4096575   82  Linux swap
>>
>> # top
>> Mem:   2075192k total,  2062540k used,    12652k free,       64k buffers
>>
>> Only recognizes 2GB of 4GB?
>
> A swap partition has a swap header that specifies its size
> (and possibly what bad blocks exist on the swap partition).
> Thus, if you did mkswap long ago, the useful size will not
> have changed. Do swapoff; mkswap; swapon and mkswap will
> tell you how large a swap partition it made, and swapon
> will cause the kernel to say how much swap space was added.
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: Support for > 2GB swap partitions?
  2005-01-10 10:09   ` Justin Piszcz
@ 2005-01-10 14:59     ` Nikola Ciprich
  0 siblings, 0 replies; 6+ messages in thread
From: Nikola Ciprich @ 2005-01-10 14:59 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: linux-kernel

the reason is, that fdisk did set swap partition, but it did not set
swap header as it's not its task (as is not creating filesystems).
mkswap must be always used while creating new swap partitions/files.

On Mon, 2005-01-10 at 05:09 -0500, Justin Piszcz wrote:
> Oops, for some reason when I created the partitions with fdisk it did not 
> create the swap parititon correctly even though I specified it was type 
> swap.  mkswap /dev/sda2 && swapon /dev/sda2 fixed the problem, thanks.
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-01-10 14:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-10  0:34 Support for > 2GB swap partitions? Justin Piszcz
2005-01-10  0:47 ` Grzegorz Kulewski
2005-01-10 10:09   ` Justin Piszcz
2005-01-10 14:59     ` Nikola Ciprich
2005-01-10  2:20 ` Andries Brouwer
2005-01-10 10:10   ` Justin Piszcz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).