Re: Adding more than 8 swap partitions

Peter Rival (frival@zk3.dec.com)
Thu, 20 May 1999 18:00:01 -0400


This is a multi-part message in MIME format.
--------------9031DCA2A84887C159A6CA05
Content-Type: multipart/alternative;
boundary="------------17035A9FF0E8A6D111DE0CE0"

--------------17035A9FF0E8A6D111DE0CE0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Okay, so I did that - I changed from:

#define MAX_SWAPFILES 8
to:
#define MAX_SWAPFILES 32

Now I can add up to 15 swap partitions, not 32. I have 20 disks hanging
off of an AS4000, with the possibility of somewhere in the area of 40
disks by the time I'm done. All of these disks are going to be configured
the same - 256MB for swap, and the rest as a standard ext2 filesystem.

Which brings me to my next point...This is a script of a session of me
trying to mount another of the 20 disks. The questioning comes after.

Script started on Fri Apr 14 13:26:59 1911
[root@frigate /root]# df -k
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/sdm2 108870 53943 49305 52% /
/dev/sdm5 1748525 1015714 642446 61% /usr
/dev/sda2 3788613 13 3592607 0% /usr/pest/test1/1
/dev/sde2 3788613 13 3592607 0% /usr/pest/test1/2
/dev/sdi2 3788613 13 3592607 0% /usr/pest/test1/3
/dev/sds2 3788613 13 3592607 0% /usr/pest/test1/4
/dev/sdw2 3788613 13 3592607 0% /usr/pest/test1/5
/dev/sdb2 3788613 13 3592607 0% /usr/pest/test1/6
/dev/sdf2 3788613 13 3592607 0% /usr/pest/test1/7
/dev/sdt2 3788613 13 3592607 0% /usr/pest/test1/9
/dev/sdx2 3788613 13 3592607 0% /usr/pest/test1/0
/dev/sdk2 3788613 13 3592607 0% /usr/pest/test2/3
/dev/sdl2 3788613 13 3592607 0% /usr/pest/test2/8
/dev/sdj2 3788613 13 3592607 0% /usr/pest/test1/8
[root@frigate /root]# mount /dev/sdc2
mount: /dev/sdc2 already mounted or /usr/pest/test2/1 busy
[root@frigate /root]# df -k
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/sdm2 108870 53943 49305 52% /
/dev/sdm5 1748525 1015714 642446 61% /usr

/dev/sda2 3788613 13 3592607 0% /usr/pest/test1/1
/dev/sde2 3788613 13 3592607 0% /usr/pest/test1/2
/dev/sdi2 3788613 13 3592607 0% /usr/pest/test1/3
/dev/sds2 3788613 13 3592607 0% /usr/pest/test1/4
/dev/sdw2 3788613 13 3592607 0% /usr/pest/test1/5
/dev/sdb2 3788613 13 3592607 0% /usr/pest/test1/6
/dev/sdf2 3788613 13 3592607 0% /usr/pest/test1/7
/dev/sdt2 3788613 13 3592607 0% /usr/pest/test1/9
/dev/sdx2 3788613 13 3592607 0% /usr/pest/test1/0
/dev/sdk2 3788613 13 3592607 0% /usr/pest/test2/3
/dev/sdl2 3788613 13 3592607 0% /usr/pest/test2/8
/dev/sdj2 3788613 13 3592607 0% /usr/pest/test1/8
[root@frigate /root]# umount /dev/sdc2
[root@frigate /root]# mount /dev/sdc2
[root@frigate /root]# df -k
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/sdm2 108870 53943 49305 52% /
/dev/sdm5 1748525 1015714 642446 61% /usr
/dev/sda2 3788613 13 3592607 0% /usr/pest/test1/1
/dev/sde2 3788613 13 3592607 0% /usr/pest/test1/2
/dev/sdi2 3788613 13 3592607 0% /usr/pest/test1/3
/dev/sds2 1748525 1015714 642446 61%
/usr/pest/test1/4 <-- HUH??
/dev/sdw2 3788613 13 3592607 0% /usr/pest/test1/5
/dev/sdb2 3788613 13 3592607 0% /usr/pest/test1/6
/dev/sdf2 3788613 13 3592607 0% /usr/pest/test1/7
/dev/sdt2 3788613 13 3592607 0% /usr/pest/test1/9
/dev/sdx2 3788613 13 3592607 0% /usr/pest/test1/0
/dev/sdk2 3788613 13 3592607 0% /usr/pest/test2/3
/dev/sdl2 3788613 13 3592607 0% /usr/pest/test2/8
/dev/sdj2 3788613 13 3592607 0% /usr/pest/test1/8
/dev/sdc2 3788613 13 3592607 0% /usr/pest/test2/1
[root@frigate /root]# exit
exit

Script done on Fri Apr 14 13:27:42 1911

This happened before and after a reboot, and after all of the disks had
been mke2fs-ed again. I had tried to run "mount -a" before this all
happened, and several of the mounts complained of the device being already
mounted or the mount point busy, neither of which were the case.

It appears that the system is silently unmounting a _random_ filesystem,
and not taking its entry out of the list of mounted filesystems.
Strange...again... One of my co-workers had mentioned that this could be
because of the fact that this is a Durango, not a Rawhide, but all the
disks are off of the first two PCI busses (which is all Linux sees right
now) and the Durango is in the Rawhide family of systems. Anyway, does
anyone have any clues about this?

Oh, and lest I forget, this is stock 2.2.8, plus some axp patches that
Richard Henderson sent out (which work fine on another system without as
many disks...), with that one #define changed. I can send the patches to
anyone interested. All I know is, this is a configuration that _should_
be able to work...hmmm.....

- Pete

Matthew Kirkwood wrote:

> On Wed, 19 May 1999, Peter Rival wrote:
>
> > I just wanted to make sure that I can add more than 8 swap partitions
> > under 2.2.8 by only changing the MAX_SWAPFILES #define in
> > include/linux/swap.h.
>
> You should be fine, although:
>
> > What is the maximum limit?
>
> It's 2Gb in 2.2, although I think you may need a new mkswap.
>
> Matthew.

--------------17035A9FF0E8A6D111DE0CE0
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
Okay, so I did that - I changed from:

    #define MAX_SWAPFILES    8
to:
    #define MAX_SWAPFILES    32

Now I can add up to 15 swap partitions, not 32.  I have 20 disks hanging off of an AS4000, with the possibility of somewhere in the area of 40 disks by the time I'm done.  All of these disks are going to be configured the same - 256MB for swap, and the rest as a standard ext2 filesystem.

Which brings me to my next point...This is a script of a session of me trying to mount another of the 20 disks.  The questioning comes after.

Script started on Fri Apr 14 13:26:59 1911
[root@frigate /root]# df -k
Filesystem         1024-blocks  Used Available Capacity Mounted on
/dev/sdm2             108870   53943    49305     52%   /
/dev/sdm5            1748525 1015714   642446     61%   /usr
/dev/sda2            3788613      13  3592607      0%   /usr/pest/test1/1
/dev/sde2            3788613      13  3592607      0%   /usr/pest/test1/2
/dev/sdi2            3788613      13  3592607      0%   /usr/pest/test1/3
/dev/sds2            3788613      13  3592607      0%   /usr/pest/test1/4
/dev/sdw2            3788613      13  3592607      0%   /usr/pest/test1/5
/dev/sdb2            3788613      13  3592607      0%   /usr/pest/test1/6
/dev/sdf2            3788613      13  3592607      0%   /usr/pest/test1/7
/dev/sdt2            3788613      13  3592607      0%   /usr/pest/test1/9
/dev/sdx2            3788613      13  3592607      0%   /usr/pest/test1/0
/dev/sdk2            3788613      13  3592607      0%   /usr/pest/test2/3
/dev/sdl2            3788613      13  3592607      0%   /usr/pest/test2/8
/dev/sdj2            3788613      13  3592607      0%   /usr/pest/test1/8
[root@frigate /root]# mount /dev/sdc2
mount: /dev/sdc2 already mounted or /usr/pest/test2/1 busy
[root@frigate /root]# df -k
Filesystem         1024-blocks  Used Available Capacity Mounted on
/dev/sdm2             108870   53943    49305     52%   /
/dev/sdm5            1748525 1015714   642446     61%   /usr

/dev/sda2            3788613      13  3592607      0%   /usr/pest/test1/1
/dev/sde2            3788613      13  3592607      0%   /usr/pest/test1/2
/dev/sdi2            3788613      13  3592607      0%   /usr/pest/test1/3
/dev/sds2            3788613      13  3592607      0%   /usr/pest/test1/4
/dev/sdw2            3788613      13  3592607      0%   /usr/pest/test1/5
/dev/sdb2            3788613      13  3592607      0%   /usr/pest/test1/6
/dev/sdf2            3788613      13  3592607      0%   /usr/pest/test1/7
/dev/sdt2            3788613      13  3592607      0%   /usr/pest/test1/9
/dev/sdx2            3788613      13  3592607      0%   /usr/pest/test1/0
/dev/sdk2            3788613      13  3592607      0%   /usr/pest/test2/3
/dev/sdl2            3788613      13  3592607      0%   /usr/pest/test2/8
/dev/sdj2            3788613      13  3592607      0%   /usr/pest/test1/8
[root@frigate /root]# umount /dev/sdc2
[root@frigate /root]# mount /dev/sdc2
[root@frigate /root]# df -k
Filesystem         1024-blocks  Used Available Capacity Mounted on
/dev/sdm2             108870   53943    49305     52%   /
/dev/sdm5            1748525 1015714   642446     61%   /usr
/dev/sda2            3788613      13  3592607      0%   /usr/pest/test1/1
/dev/sde2            3788613      13  3592607      0%   /usr/pest/test1/2
/dev/sdi2            3788613      13  3592607      0%   /usr/pest/test1/3
/dev/sds2            1748525 1015714   642446     61%   /usr/pest/test1/4    <-- HUH??
/dev/sdw2            3788613      13  3592607      0%   /usr/pest/test1/5
/dev/sdb2            3788613      13  3592607      0%   /usr/pest/test1/6
/dev/sdf2            3788613      13  3592607      0%   /usr/pest/test1/7
/dev/sdt2            3788613      13  3592607      0%   /usr/pest/test1/9
/dev/sdx2            3788613      13  3592607      0%   /usr/pest/test1/0
/dev/sdk2            3788613      13  3592607      0%   /usr/pest/test2/3
/dev/sdl2            3788613      13  3592607      0%   /usr/pest/test2/8
/dev/sdj2            3788613      13  3592607      0%   /usr/pest/test1/8
/dev/sdc2            3788613      13  3592607      0%   /usr/pest/test2/1
[root@frigate /root]# exit
exit

Script done on Fri Apr 14 13:27:42 1911

This happened before and after a reboot, and after all of the disks had been mke2fs-ed again.  I had tried to run "mount -a" before this all happened, and several of the mounts complained of the device being already mounted or the mount point busy, neither of which were the case.

It appears that the system is silently unmounting a _random_ filesystem, and not taking its entry out of the list of mounted filesystems.  Strange...again...  One of my co-workers had mentioned that this could be because of the fact that this is a Durango, not a Rawhide, but all the disks are off of the first two PCI busses (which is all Linux sees right now) and the Durango is in the Rawhide family of systems.  Anyway, does anyone have any clues about this?

Oh, and lest I forget, this is stock 2.2.8, plus some axp patches that Richard Henderson sent out (which work fine on another system without as many disks...), with that one #define changed.  I can send the patches to anyone interested.  All I know is, this is a configuration that _should_ be able to work...hmmm.....

 - Pete

Matthew Kirkwood wrote:

On Wed, 19 May 1999, Peter Rival wrote:

> I just wanted to make sure that I can add more than 8 swap partitions
> under 2.2.8 by only changing the MAX_SWAPFILES #define in
> include/linux/swap.h.

You should be fine, although:

> What is the maximum limit?

It's 2Gb in 2.2, although I think you may need a new mkswap.

Matthew.

--------------17035A9FF0E8A6D111DE0CE0--

--------------9031DCA2A84887C159A6CA05
Content-Type: text/x-vcard; charset=us-ascii;
name="frival.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Peter Rival
Content-Disposition: attachment;
filename="frival.vcf"

begin:vcard
n:Rival;Peter
x-mozilla-html:FALSE
org:Compaq Computer Corp.;Release Engineering Systems
adr:;;;;;;
version:2.1
email;internet:frival@zk3.dec.com
title:Engineer II
x-mozilla-cpt:;0
fn:Peter Rival
end:vcard

--------------9031DCA2A84887C159A6CA05--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/