Operating System - OpenVMS
1820643 Members
1881 Online
109626 Solutions
New Discussion юеВ

moving a page and swap file

 
Karen Lee_3
Frequent Advisor

moving a page and swap file

I have a disk with a page_1

DISK$ALPHA32:[PAGE_SWAP]PAGEFILE_1.SYS;1

I need to rename that disk and use it for another purpose - how to i get rid of this reference or move it to another disk. Openvms 7.3-1
14 REPLIES 14
Robert_Boyd
Respected Contributor

Re: moving a page and swap file

Karen,

If the pagefile is currently in use, you will want to make sure that the system startup procedures no longer attempt to install it.
Check to see if the file is in use by doing a SHOW MEMORY/FILE on each node that has access to the disk(all nodes in a cluster if MSCP served).

Next you will want to make sure that the file cannot by found. This can be done by RENAME.
Rename the file to something else like TOBEDELETED.JUNK

If the file was in use and you need to recreate it on another disk, then use SYSGEN to create another file. I usually look for a disk that's got plenty of room and is lightly used in terms of I/O load.

$ MCR SYSGEN CREATE DISK$:[PAGE_SWAP]PAGEFILE_1.SYS;1/CONTIG/SIZE=

Then edit your SYS$MANAGER:SYPAGSWPFILES.COM or other startup procedures/data files to point to the new disk to find the file.

Then reboot whichever system was using the file. After the reboot make sure that the file you are wanting to remove is no longer in use anywhere, and verify that the new one has been installed as a pagefile.

Then you can delete the old file, rename the old disk volume and/or re-init it and do whatever you like.

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Heinz W Genhart
Honored Contributor

Re: moving a page and swap file

Hi Karen

You must create a new Pagefile on another disk.

$ MC SYSGEN cre disk:[page_swap]pagefile_1.sys/size=xy

Then You have to change SYS$STARTUP:SYPAGSWPFILES.COM. There You must mount the new disk and You have to install the new Pagefile with

MC sysgen instal disk:[page_swap]pagefile_1.sys/PAGEFILE

Finnaly You will have to reboot Your machine that this changes take effect.
Joseph Huber_1
Honored Contributor

Re: moving a page and swap file

Rename the file to something different, then delete it after a reboot.

But caveat: if in one of the VMS startup files the disk is referenced in a way to wait for the disk, then first remove the reference.
References may be in either:

sys$manager:syslogicals.com, systartup_vms.com
sys$system:satellite_page.com
sys$system:sypagswpfiles.com

or any file called from them.

To use a pagefile on another disk, don't copy or backup the existing, but create a new one on the other disk with SYSGEN:

$ MCR SYSGEN
Create filespec /CONTIG/SIZE=nblocks

then add the SYSGEN INSTALL command to one of the above files (or modify existing commands to point to the new location).
http://www.mpp.mpg.de/~huber
Karen Lee_3
Frequent Advisor

Re: moving a page and swap file

what about the sysgen 'deinstall' command - won't that remove the file without a reboot?
Jan van den Ende
Honored Contributor

Re: moving a page and swap file

Karen,

good answers given already.

But DO NOT forget to check your MODPARAMS.DAT for any references! If you find any, remove or adjust them, or you might be in for a nasty surprise sometime in the future!

Success.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Robert Gezelter
Honored Contributor

Re: moving a page and swap file

Karen,

As I recall, there is no way to migrate the pages currently active in a page file to a different page file.

- Bob Gezelter, http://www.rlgsc.com
Ian Miller.
Honored Contributor

Re: moving a page and swap file

the sysgen deinstall marks a file for deinstall and when it is no longer used then it will be deinstalled. Additionally it won't be used for new processess. You will have to stop and start processes to get them to stop using the pagefile after you do the deinstall command. If you are lucky you can get all the processes using that pagefile to stop using it but often this is not the case. In this case do as previously mentioned, create the new file, edit the dcl procedures and reboot.
____________________
Purely Personal Opinion
Karen Lee_3
Frequent Advisor

Re: moving a page and swap file

just for arguments sake - at this moment the only process that has the page_1 file open is

00000000 [PAGE_SWAP]PAGEFILE_1.SYS;1

can I assume at this point that no application is using the pagefile_1.sys file?
Volker Halle
Honored Contributor

Re: moving a page and swap file

Karen,

no. A process does not handle a page file by opening it, so you can't easily see, which processes are currently using (or having reserved for them) pages in a pagefile.

$ ANAL/SYS
SDA> CLUE MEM/FILES

would at least tell you total size and free blocks, so if both are equal, there is a good chance that SYSGEN DEINSTALL might work.

Consider to first create and install a NEW pagefile, before you try to DEINSTALL the existing one. A reboot certainly helps ;-)

Volker.
Volker Halle
Honored Contributor

Re: moving a page and swap file

Karen,

you can check the pagefile reference count with SDA:

$ ANAL/SYS
SDA> CLUE MEM/FILES
...
Pagefile (Index 254) Device DSA0:
PFL Address FFFFFFFF.82DC7900 UCB Address FFFFFFFF.82D39580
...

SDA> FORMAT 82DC7900 ! use PFL addr from above
...
FFFFFFFF.82DC7960 PFL$L_REFCNT 0000B5F7
...

If PFL$L_REFCNT is ZERO, there are no references to this pagefile and DEINSTALL should work immediately.

Volker.
Karen Lee_3
Frequent Advisor

Re: moving a page and swap file

i assume this is zero

FFFFFFFF.82297A80 PFL$L_SWPREFCNT 00000000

FFFFFFFF.82297A98 PFL$L_REFCNT 00000000
Volker Halle
Honored Contributor

Re: moving a page and swap file

Karen,

looks like ZERO to me as well.

Go ahead and try SYSGEN> DEINSTALL on that pagefile...

Make sure you just didn't look at the FIRST entry shown by CLUE MEM/FILES, as this would be a SWAPFILE entry !

Volker.
Karen Lee_3
Frequent Advisor

Re: moving a page and swap file

cool - it's gone....
Volker Halle
Honored Contributor

Re: moving a page and swap file

Karen,

to just give you an indication, that it's not a straightforward and 'easy' procedure to find out, which processes have pages in which pagefile, here are 2 - not very helpful ;-) references to ATW:

http://h71000.www7.hp.com/wizard/wiz_5535.html

http://h71000.www7.hp.com/wizard/wiz_7232.html

The pagefile assignment code has also changed slightly over the recent versions of OpenVMS.

Volker.