[comp.unix.ultrix] Missing swap space?

jjb@cs.wayne.edu (Jon J. Brewster) (08/08/90)

System: MicroVAX 3600
OS:     Ultrix 3.1
Disk    RA81, RA82

I have allocated roughly 33 Mb of each of the two disks to the "b"
partitions, and declared them as swap in the config file with:

config        vmunix  root on ra0a  swap on ra0b size 66690 \
and ra1b size 66880

(The line in the config file isn't folded.)  However, pstat -s
reports:

pandora[27] %pstat -s
66785k swap configured
        8272k used (1456k text, 0k smem)
        25071k free, 2959k wasted, 33442k missing
        avail: 46*512k 2*256k 3*128k 3*64k 5*32k 5*16k 191*1k

The number of pages missing is suspiciously close to the size
of ra1b, and a previous incarnation of the kernel, with a smaller
ra1b partition exhibited similar behavior -- the missing pages were
almost equal in size to the size of the second swap partition.  TFM
for pstat(8) says that missing pages ususally indicate space allocated
to argdev.  Seems like rather a lot of space.  I wonder if I missed 
something when I configured the system for interleaved swap??

jjb@cs.wayne.edu (Jon J. Brewster) (08/09/90)

Dave White <davew%viper.gvg.tek.com@RELAY.CS.NET> and 
Steve Kinzler <kinzler@iuvax.cs.indiana.edu> both correctly
surmised that I had not added the swap partition to the 
/etc/fstab file, and so the "swapon -a" command in /etc/rc
did not add the second swap device.  Adding the appropriate
line to /etc/fstab and invoking swapon interactively did
the trick.  Thanks to both Dave and Steve.

grr@cbmvax.commodore.com (George Robbins) (08/09/90)

In article <1990Aug8.143813.16876@cs.wayne.edu> jjb@cs.wayne.edu (Jon J. Brewster) writes:
> 
> I have allocated roughly 33 Mb of each of the two disks to the "b"
> partitions, and declared them as swap in the config file with:
> 
> config        vmunix  root on ra0a  swap on ra0b size 66690 \
> and ra1b size 66880

Did you also declare then as type ":sw:" partititions in your /etc/fstab
and make sure there is a "swapon -a" somewhere in your /etc/rc* files?

-- 
George Robbins - now working for,     uucp:   {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing:   domain: grr@cbmvax.commodore.com
Commodore, Engineering Department     phone:  215-431-9349 (only by moonlite)

beaulieu@gca.UUCP (Larry Beaulieu) (08/09/90)

> to argdev.  Seems like rather a lot of space.  I wonder if I missed 
> something when I configured the system for interleaved swap??

	Yup.  You did.

	In your file /usr/sys/conf/systemname, you have the
	line:

> config        vmunix  root on ra0a  swap on ra0b size 66690 \
> and ra1b size 66880

	As root:

	Change the configuration line to read:

config	vmunix root on ra0a swap on ra0b and ra1b

	without specifying the size. 

	You then need to make an entry in /etc/fstab to reflect
	the additional swap partition:

/dev/ra1b::sw:0:1:ufs::

	Issuing the command 

	swapon -a 

	will cause the system to scan fstab and add any appropriate
	entries (file systems designated by sw) as additional
	interleaved swap partitions, so you don't have to reboot to
	effect the changes.  You should get a messge indicating
	that additional swap spaces have been added.

	The file /etc/rc by default already contains the swapon -a
	command.

	Also, note that you can use any available partition for
	your second swap space; use of partition b is not
	a prerequisite.


 	Instead of:

> pandora[27] %pstat -s
> 66785k swap configured
>         8272k used (1456k text, 0k smem)
>         25071k free, 2959k wasted, 33442k missing
>         avail: 46*512k 2*256k 3*128k 3*64k 5*32k 5*16k 191*1k
> 

	You should get something like the following.

	On our 11/780 (w/3.1) configured this way pstat gives the
	following output:

altair> pstat -s
24662k swap configured
        8450k used (1088k text, 0k smem)
        16210k free, 2795k wasted, 2k missing
avail: 29*512k 3*256k 3*64k 5*32k 5*16k 162*1k
altair>

> The number of pages missing is suspiciously close to the size
> of ra1b, and a previous incarnation of the kernel, with a smaller
> ra1b partition exhibited similar behavior -- the missing pages were
> almost equal in size to the size of the second swap partition.  TFM

	I suspect that it is because the kernel expects to have
	the additional swap space available but doesn't actually 
	doesn't, since it wasn't specified in /etc/fstab; ergo the 
	kernel treats the expected pages from the 2nd swap
	space as 'missing'.

******

	As I understand it, most 4.2 BSD based systems should be 
	able to interleave swap spaces using a similar procedure.

	The method here is similar to that used for SunOS; the major
	difference is that the SunOS kernel uses a slightly
	different (and SUPPOSEDLY more efficient) algorithm to 
	interleave, and by default it supports multiple 
	swap partitions without requiring listing them in 
	the configuration file.  
-- 
Larry Beaulieu				The usual disclaimers apply.
GCA/Ultratech Corporation, 	
Andover, MA						
beaulieu@gca.com (or ...uunet!gca!beaulieu, if you prefer)

grr@cbmvax.commodore.com (George Robbins) (08/10/90)

In article <444@gca.UUCP> beaulieu@gca.UUCP (Larry Beaulieu) writes:
> > to argdev.  Seems like rather a lot of space.  I wonder if I missed 
> > something when I configured the system for interleaved swap??
> 
> 
> 	The file /etc/rc by default already contains the swapon -a
> 	command.
> 
> 	Also, note that you can use any available partition for
> 	your second swap space; use of partition b is not
> 	a prerequisite.

Subject to the concern that using the a or c partition for a swap area will
probably overwrite the volume label, making access to other partitions on
the drive "interesting".

-- 
George Robbins - now working for,     uucp:   {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing:   domain: grr@cbmvax.commodore.com
Commodore, Engineering Department     phone:  215-431-9349 (only by moonlite)

beaulieu@gca.UUCP (Larry Beaulieu) (08/10/90)

In article <13722@cbmvax.commodore.com>, grr@cbmvax.commodore.com (George Robbins) writes:
> > 
> > 	Also, note that you can use any available partition for
> > 	your second swap space; use of partition b is not
> > 	a prerequisite.
> 
> Subject to the concern that using the a or c partition for a swap area will
> probably overwrite the volume label, making access to other partitions on
> the drive "interesting".
 
	1)	Use of partition c means using the entire drive as a swap space, so
		'access to other partitions' is irrelevant.  I do this routinely 
		on dataless Sun 3/80's (root file system, page/swap reside locally) 
		to make use of the 2nd 104MB hard disk, as we have up to 32MB memory
		on these systems, whose primary application is a memory pig.
	
	2)	As to use of partition a: as a swap space, I include the following
		/etc/fstab off one of our Ultrix systems: (VAX 11/780 w/2 x RA81):

		/dev/ra0a:/:rw:1:1:ufs::
		/dev/ra1a::sw:0:1:ufs::
		/dev/ra1b:/tmp:rw:0:4:ufs::
		/dev/ra1g:/src:ro:0:2:ufs::
		/dev/ra0g:/var:rw:0:2:ufs::
		/dev/ra0h:/usr:rw:1:3:ufs::
		/dev/ra1h:/usr/users:rw:1:3:ufs::

		As I recall this was done when that system was first upgraded to
		run Ultrix 2.0; it has been used successfully ever since.

-- 
Larry Beaulieu				The usual disclaimers apply.
GCA/Ultratech Corporation, 	
Andover, MA						
beaulieu@gca.com (or ...uunet!gca!beaulieu, if you prefer)

beaulieu@gca.UUCP (Larry Beaulieu) (08/10/90)

In article <13722@cbmvax.commodore.com>, grr@cbmvax.commodore.com (George Robbins) writes:
> > 
> > 	Also, note that you can use any available partition for
> > 	your second swap space; use of partition b is not
> > 	a prerequisite.
> 
> Subject to the concern that using the a or c partition for a swap area will
> probably overwrite the volume label, making access to other partitions on
> the drive "interesting".
 
	1)	Use of pabtition c means using the entire drive as a swap space, so
		'access to other partitions' is irrelevant.  I do this routinely 
		on dataless Sun 3/80's (root file system, page/swap reside locally) 
		to make use of the 2nd 104MB hard disk, as we have up to 32MB memory
		on these systems, whose primary application is a memory pig.
	
	2)	As to use of partition a: as a swap space, I include the following
		/etc/fstab off one of our Ultrix systems: (VAX 11/780 w/2 x RA81):

		/def/ra0a:/:rw:1:1:ufs::
		/dev/ra1a::sw:0:1:ufs::
		/dev/ra1b:/tmp:bw:0:4:ufs::
		/dev/ra1g:/src:ro:0:2:ufs::
		/dev/ra0g:/var:rw:0:2:ufs::
		/dev/ra0h:/usr:rw:1:3:ufs::
		/dev/ra1h:/usr/users:rw:1:3:ufs::

		As I recall this was done when that system was first upgraded to
		run Ultrix 2.0; it has been used successfully ever since.

-- 
Larry Beaulieu				The usual disclaimers apply.
GCA/Ultratech Corporation, 	
Andofer, MA						
beaulieu@gca.com (or ...uunet!gca!beaulieu, if you prefer)

mathisen@dali.cs.montana.edu (Jaye Mathisen) (08/13/90)

In article <446@gca.UUCP> beaulieu@gca.UUCP (Larry Beaulieu) writes:
|In article <13722@cbmvax.commodore.com>, grr@cbmvax.commodore.com (George Robbins) writes:
|> > 
|> > 	Also, note that you can use any available partition for
|> > 	your second swap space; use of partition b is not
|> > 	a prerequisite.
|> 
|> Subject to the concern that using the a or c partition for a swap area will
|> probably overwrite the volume label, making access to other partitions on
|> the drive "interesting".
| 
|	1)	Use of partition c means using the entire drive as a swap space, so
|		'access to other partitions' is irrelevant.  I do this routinely 
|		on dataless Sun 3/80's (root file system, page/swap reside locally) 

Well, it may work that way on Sun's, but it looks like under Ultrix it don't.
I added an RZ56 as a swap disk, and tried to swap on partition c, and it
hung in the swapon command...  The same thing happened on a mVII, under Ultrix
3.1...  When I tried to swap on partition a, I was then unable to access
the rest of the partitions. 
|	2)	As to use of partition a: as a swap space, I include the following
|		/etc/fstab off one of our Ultrix systems: (VAX 11/780 w/2 x RA81):
|
|		/dev/ra0a:/:rw:1:1:ufs::
|		/dev/ra1a::sw:0:1:ufs::


I think something changes between Ultrix 2.0, and 3.0 as to where information
about the disks is stored.

grr@cbmvax.commodore.com (George Robbins) (08/13/90)

In article <2304@dali> mathisen@dali.cs.montana.edu (Jaye Mathisen) writes:
> In article <446@gca.UUCP> beaulieu@gca.UUCP (Larry Beaulieu) writes:
> |In article <13722@cbmvax.commodore.com>, grr@cbmvax.commodore.com (George Robbins) writes:
> |> Subject to the concern that using the a or c partition for a swap area will
> |> probably overwrite the volume label, making access to other partitions on
> |> the drive "interesting".
> | 
> |Use of partition c means using the entire drive as a swap space, so
> |'access to other partitions' is irrelevant.  I do this routinely 
> |on dataless Sun 3/80's (root file system, page/swap reside locally) 
> 
> Well, it may work that way on Sun's, but it looks like under Ultrix it don't.
> I added an RZ56 as a swap disk, and tried to swap on partition c, and it
> hung in the swapon command...  The same thing happened on a mVII, under Ultrix
> 3.1...  When I tried to swap on partition a, I was then unable to access
> the rest of the partitions. 
> 
> I think something changes between Ultrix 2.0, and 3.0 as to where information
> about the disks is stored.

Well, the thing that might make a difference is whether you're running the
default partition tables  or not.  Normally, the system will use the partition
tables written into the "disk label" (actually mushed in with the bootstrap/
first super-block with Ultrix I seem to recall).  If the partition table isn't
there, or has been corrupted, then the system will revert to the partitions
hard coded in the driver.  If they're the same, everything should still work,
delta some one-shot confusion.  If not, then zap...

-- 
George Robbins - now working for,     uucp:   {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing:   domain: grr@cbmvax.commodore.com
Commodore, Engineering Department     phone:  215-431-9349 (only by moonlite)

wright@mdcbbs.com (08/16/90)

In article <13722@cbmvax.commodore.com>, grr@cbmvax.commodore.com (George Robbins) writes:
> In article <444@gca.UUCP> beaulieu@gca.UUCP (Larry Beaulieu) writes:
>> 
>> 	Also, note that you can use any available partition for
>> 	your second swap space; use of partition b is not
>> 	a prerequisite.
> 
> Subject to the concern that using the a or c partition for a swap area will
> probably overwrite the volume label, making access to other partitions on
> the drive "interesting".
> 
  This is correct. Althought, if you would like to repartion your disk to
utilize more of the "a" partition as swap, you could use chpt to trim "a" 
down to about 1000 blocks. This would allow for the superblock. Then the 
rest can be added into "b" partition. This would then leave "g" for data.

If you were to use the "c" partition (the entire disk) as swap, you would not
have to worry about this. Since "c" is the entire disk and no other partitions
would be used. This is, of course, assuming you are using the default disk
partitioning.

-- 
 
    +----------------------------+-----------------------------------------+
    |	Dave Wright		 |	Phone:	(714) 952-6320             |
    |	McDonnell Douglas M&E	 |   Internet:	wright@mdcbbs.com          |
    |	Software Engineering	 |   	 UUCP:	uunet!mdcbbs.com!wright    |
    |	P.O.Box 6011		 |   	  PSI:	PSI%31060099980019::WRIGHT |
    |	Cypress, Ca. 90630	 |   	                                   |
    +----------------------------+-----------------------------------------+