[comp.unix.ultrix] increase swap space

mueller@daisy.cis.ohio-state.edu (klaus d mueller) (06/13/91)

Someone knows ?? 

I'm having problems with my swap space being too small. So I thought about
creating a big file and using SWAPON <file name> to add this file to my swap 
space. Will this create a problem when the file is not written in contiguous 
blocks ?

OR

Is there a way to divide an existing partition into two pieces without 
having to re-format the entire hard disk ?

I have a DECStation 3100 running ULTRIX version 3. Thank's for your help.

           Cheers  Klaus@lvd1.bme.ohio-state.edu 

boyd@prl.dec.com (Boyd Roberts) (06/13/91)

In article <133933@tut.cis.ohio-state.edu>, mueller@daisy.cis.ohio-state.edu (klaus d mueller) writes:
> I'm having problems with my swap space being too small. So I thought about
> creating a big file and using SWAPON <file name> to add this file to my swap 
> space. Will this create a problem when the file is not written in contiguous 
> blocks ?

No, you can't do that.  The `file' argument is _not_ an ordinary file.
It's a block special file refering to (part of) an unused disk partition.
It is just a chunk of disk, there is no file-system structure on it.

You have to create (or find) a spare partition, configure it into the
kernel and then use `swapon' to make it available to the kernel for paging.

To quote from then swapon(8) manual:

    The second form gives individual _block devices_, as listed in
    the system swap configuration table.  The call makes only
    this space available to the system for swap allocation.

                                                  [emphasis added]

Be careful when you configure this.  A mis-configured swap partition is a
sure-fire file-system trasher, faster than you can say `backups?'.


Boyd Roberts			boyd@prl.dec.com

``When the going gets wierd, the weird turn pro...''

kevink@bryant.NCD.COM (Kevin Kelleher) (06/15/91)

In article <1991Jun13.165603.6240@prl.dec.com>, boyd@prl.dec.com (Boyd
Roberts) writes:
|> In article <133933@tut.cis.ohio-state.edu>,
mueller@daisy.cis.ohio-state.edu (klaus d mueller) writes:
|> > I'm having problems with my swap space being too small. So I thought about
|> > creating a big file and using SWAPON <file name> to add this file
to my swap 
|> > space. Will this create a problem when the file is not written in
contiguous 
|> > blocks ?
|> 
|> No, you can't do that.  The `file' argument is _not_ an ordinary file.
|> It's a block special file refering to (part of) an unused disk partition.
|> It is just a chunk of disk, there is no file-system structure on it.
|> 
|> You have to create (or find) a spare partition, configure it into the
|> kernel and then use `swapon' to make it available to the kernel for paging.
|> 
|> To quote from then swapon(8) manual:
|> 
|>     The second form gives individual _block devices_, as listed in
|>     the system swap configuration table.  The call makes only
|>     this space available to the system for swap allocation.

SWAPON <file name> where 'file name' is a large ordinary file
works for SunOS and possibly other flavors of Unix(tm).

It would sure be nice if DEC would consider this for a future
release.

Disclaimer: These are my opinions only, not my employeers.

Kevin Kelleher				kevink@ncd.com
Network Computing Devices (NCD)		(415) 691-2593

yzarn@lhdsy1.chevron.com (Philip Yzarn de Louraille) (06/15/91)

In article <133933@tut.cis.ohio-state.edu> mueller@daisy.cis.ohio-state.edu (klaus d mueller) writes:
>Someone knows ?? 
>
>I'm having problems with my swap space being too small. So I thought about
>creating a big file and using SWAPON <file name> to add this file to my swap 
>space. Will this create a problem when the file is not written in contiguous 
>blocks ?
>
>OR
>
>Is there a way to divide an existing partition into two pieces without 
>having to re-format the entire hard disk ?
>
>I have a DECStation 3100 running ULTRIX version 3. Thank's for your help.

If you have a partition on your disk that you are not using, then add it
to the swap space by modifying the /sys/mips/config/HOSTNAME
configuration file: 
config    vmunix  root on rz0a  swap on rz0b
modify to 
config    vmunix  root on rz0a  swap on rz0b and rz0?
where ? is your "free" partition.
Actually, if you have more than one disk, you can also do
config    vmunix  root on rz0a  swap on rz0b and rz#?
where # is the scsi address number and ? the partition you want to use.
-- 
  Philip Yzarn de Louraille                 Internet: yzarn@chevron.com
  Research Support Division                 Unix & Open Systems
  Chevron Information & Technology Co.      Tel: (213) 694-9232
  P.O. Box 446, La Habra, CA 90633-0446     Fax: (213) 694-7709