Memory Based NS/1000 Q: Is it possible to backup and restore an RTE-A system via LAN? A: This question has been asked many times, and though it has never been a "supported" backup strategy, it is feasible. It is also much more practical now thanks to the performance increases of NS/1000. These performance increases greatly speed up transferring files between systems. So lets dive right in. The fundamental pieces required are: 1) A full function memory-based system which includes NS/1000 and backup utilities. Memory based NS/1000 was supported as of the 5.2 release. 2) A host from which the RTE-A system can be booted. 3) A backup archive which contains everything necessary to rebuild the system. 4) Ideally, a command file which automates the entire process. The examples I will provide here are meant as an outline of the steps required. Obviously, every system is different and may require changes to what you see here. The concept remains the same. The key to the whole idea is having a memory based system, which includes NS/1000, and has all the utilities (FST, FPUT, CI etc) that are needed to install a system onto an empty disk. So lets start there. In order to have NS run in a memory based system requires that the system file include RAM disk. If your system does not currently have any RAM disk LUs generated in, you will need to do this. Refer to the SGI for details. At a minimum, two RAM disk LUs are needed. It is not necessary that your normal disk system have RAM disk, but the system/snap file for the memory based system must. Listing 1 shows a BUILD command file for the memory based system. This system requires 3072 pages (6144 Kbytes) of memory. LISTING 1 Comments --------- -------- !memsys::system::-192 Output file name answer.snp Snap file answer.sys System file yes Automatic partitioning 3072 Size in pages rp,/programs/drtr.run,d.rtr Required programs. rp /programs/derr.run,d.err | rp /programs/ci.run,cm | rp /programs/ci.run,start | st,,2 Define START as startup program rp /programs/nm2.run | rp /programs/uplin.run | rp /programs/inpro.run | rp /programs/outpro.run | rp /programs/inetd.run | rp /programs/rpmmn.run | rp /programs/nftmn.run | rp /programs/promt.run | rp /programs/logon.run | /e 2,mc Mount RAM disk LU 2 /programs/io.run Copy program files to /programs/li.run RAM disk /programs/fput.run | /programs/dl.run | /programs/wh.run | /programs/ci.run | /programs/cix.run | /programs/fst.run | /programs/fstp.run | /programs/ftp.run | /gen/ftpls.run Copy of LS.RUN since we /programs/ls.run don't have symbolic links. /programs/nsinit.run | /programs/mminit.run | /programs/rdate.run | /programs/systz.run | /programs/tnsrv.run | /programs/ftpsv.run | /programs/hpmdm.run | /programs/edit.run | /e | programs Name of directory on RAM disk /catalogs/>fs000 More files to copy /catalogs/inetd.c000 | /e | catalogs Name of directory on RAM disk /gen/welcome2.cmd More system files /gen/nsfile.nsin | /system/nsinit.msg | /system/nserrs.msg | /gen/"mess.txt | /gen/restore.cmd | /gen/ftpcmd.cmd | /gen/fstcmd.cmd | /e | system Name of directory on RAM disk /etc/inetd.conf More system files /etc/services | /etc/hosts | /e | etc Name of directory on RAM disk /m_users/logonprompt User files /m_users/ftp | /m_users/manager | /m_users/nogroup.grp | /m_users/masteraccount | /m_users/mastergroup | /m_users/system.grp | /m_users/jackg | /m_users/walt | /m_users/marc | /e | users Name of directory on RAM disk /e /e ------------------------------------------------ As you can see, key programs are RP'ed into memory, as in any typical memory based system, since these programs should never be removed. All other programs are placed into RAM disk, and are RP'ed as needed just like in a disk based system. Additionally, other files are also placed in RAM disk, particularly /SYSTEM, /ETC, /CATALOGS and /USERS. /USERS is optional. But without it, you cannot TELNET or FTP into the memory based system. I have included it here to illustrate how to build a fully functional NS memory-based system. A comment about the /M_USERS directory: There is no reason why one could not use the existing /USERS directory. I decided to create a new /USERS directory, called /M_USERS, and then use a modified GRUMP which acts on this directory. Why I did this I am not quite sure. But it works. In our disk based system, LU 12 is the boot LU and contains all critical directories: /PROGRAMS, /SYSTEM, /CATALOGS etc. This LU is backed up to an FST archive and then this archive is copied to another system using FTP. This is the ONLY backup. Make certain that a copy of the current Boot Extension (BOOTEX) file is included, I keep mine in the /SYSTEM directory. I use this other disk based system as both the boot source and the backup location for the FST archive. This system must be RTE-A if you plan to boot from it (Booting RTE-A from a 9000 is not supported). If you have no other 1000 on the network, then you will need an alternate medium from which to boot the memory based system. Listings 2 and 3 show the Welcome and NSINIT answer file used by the memory based system. You will note that since all required NS programs were RPed in the build, nothing else needs to be RPed prior to running NSINIT. The procedure used to recover the system using the memory based system is documented in LISTING 4, which is a command file used to perform all the steps. This command file exists in the SYSTEM directory of the memory based system. LISTING 2 COMMENTS --------- -------- * WELCOME2.CMD REV.6.2 for Brutus * set log = on * * cn,3,25b,200 Initialize and mount auxilary in,3,,ok RAM disk LU 3 for /SCRATCH crdir /scratch 3 prot /scratch rw/rw/rw * * wd /programs * * nsinit nsfile.nsin::system Initialize NS * hpmdm 79 ad Add TELNET LUs hpmdm 80 ad hpmdm 82 ad * * systz -s +8 Optional: Set time via rdate mamba HP9000 (6.2 only) * co "mess.txt::system 1 * * set log = off ex LISTING 3 --------- * DEFAULT.NSIN 91790-17088 REV.6200 <:00218.1454> * SOURCE : 91790-17088 * NSINIT Answer File * * * This is an NSINIT answer file to initialize NS-ARPA/1000 with a default * configuration. The configuration is a simple case for a node on a LAN with * no gateway. It does not include DS/1000-IV services. * * DO NOT EDIT THIS FILE TO ADD DS/1000-IV SERVICES, AS MORE INFORMATION IS * REQUIRED. * * This file is used by NSSTART_EZ.CMD. * *---------------------------------------------------------------------------- * NSINIT file: DEFAULT.NSIN 4:05 PM FRI., 6 MAY , 1994. * * Network Initialization Options: * 1: Build Output File. * 2: Build Output File & Initialize Network. * 3: Initialize Network. * 4: Shut Down Network Subsystem. * Enter an option number [(1)..4]: 3 * Initialize Network * * Enter the local node name. Format: name.domain.organization * (Each field may be 1..16 char). * Local Name: BRUTUS.HP.COM *++ Classes of Events to log ++* * 6: Resource limit exceeded * 5: Disaster (irrecoverable error) * 4: Error (severe, but recoverable error) * 3: Warning (unexpected event) * 2: Event message * 1: Internal State Information * * Enter the event classes to log, one per line. * [/D = 4, 5, and 6]. Type /E to end. * Event class: /E * Enter an event log file name [default = /system/ns_event.log]: * No EVENT logging since we said /E above. * Do you want to start NSTRC when NS is enabled [Y/(N)]? /D * Do you want Network File Transfer (NFT) [(Y)/N]? N *++ Network File Transfer (NFT) ++* * Default Buffer Size: 2048 Bytes * Transport Checksum Used: No * * Do you want to modify these values [Y/(N)]? * /D * *++ DS/1000-IV Compatible Services ++* * * Do you want any DS/1000-IV compatible services [Y/(N)]? /D *++ NS Nodal Information ++* * * Defaults are derived from previous responses. * Maximum number of active NS programs is: 24 * Maximum number of active NS sockets is: 77 * * Do you want to modify these values [Y/(N)]? /D *++ Nodal Registry ++* * * Maximum number of Connect-Site path reports is: 101 * (The above value is derived from previous responses.) * Maximum number of Nodal path reports is: 20 * * Do you want to modify these values [Y/(N)]? /D * Enter the maximum number of name records (the default is derived * from previous responses) [1..(50)..303]: /D *++ Transmission Control Protocol (TCP) ++* * * Initial Segment Size in bytes: 4096 * Retransmission Backoff Algorithm: Exponential * Retransmission Smoothing parameter Alpha: 9 * Retransmission Smoothing parameter Beta: 20 * Do you want to modify these values? [Y/(N)]: /D *++ DCN ++* * Enter information on this node for each Directly Connected Network. * Format: * * , <[subnet mask],> RTR, * , <[subnet mask],> 802/LAN/ETHERNET, * , , (E)/NE, <[station addr]> * * Where E = Enable, NE = do Not Enable. Type /E to end. * *DCN: 15.37.241.7,,LAN,,96 *DCN: /E ** Internal Use Only ** /e *++ GT ++* * Enter information for each Gateway (GT). * Format: * * , , * * Where: Dest IP Net = IP Address of any node on a remote net * Gateway IP = DCN IP Address of Gateway to use * Hops = Maximum allowed IP hops to Dest IP Net * Type /E to end. * *GT: /E * Enter the maximum number of Path Records for IP. The default is derived * from previous responses [6..(103)..200]: /D *+++ ADDRESS RESOLUTION +++* * Maximum number of active PCB Records: 10 * Retry interval timeout in centi-seconds: 100 * Proxy Nodal Registry Server: No * * Do you want to modify these values [Y/(N)]: /D * * Default IEEE-802 Multicast Addresses for Probe: * Target Address: 09-00-09-00-00-01 * Proxy Address: 09-00-09-00-00-02 * * Do you want to modify these values [Y/(N)]? /D * Enter the Network security code for this node [1..2 char]: NS * Enter the Network User's security code for this node [1..2 char]: NS *++ EMA Usage ++* * 3 pages available 1 pages used *+++ System resources required for this file +++* * DSAM Table size in words: 32146 * Number of RTE Class Numbers: 4 * Number of RTE Resource Numbers: 4 * SMB size in words: 0 * NSINIT successfully completed action BUILD. LISTING 4 --------- * * Command file to restore BRUTUS from an FST archive * kept on REMUS * * Procedure is as follows: * * 1) Boot BRUTUS via LAN from REMUS * %BDS37 * * This brings up a NS Memory-Based system * * 2) This command file will perform the following steps: * * a) Rename existing Ram Disk directories so that the disk based * directories on LU 12 can be restored with FST * * b) Initialize LU 12 * * c) Create directory structure on LU 12 * * d) FTP the FST archive, /BRUTUS/ARCHIVE.FST from REMUS * * e) Restore FST backup * * f) FPUT bootex to LU 12 * * 3) If things go wrong, you simply reboot the memory based system, * and start over. * * We set the WD to /PROGRAMS, so that we can access programs * after we change the directory name. * * wd /programs * * Rename directories that we will be restoring from the FST backup. * Since these are in RAM, we do not need to change them back, we * can simply reboot the memory based system. * rn /programs /p rn /system /s rn /etc /e rn /users /u rn /scratch /sc * * We next initialize the LU we wil be restoring, create a * /SCRATCH directory to hold the FST archive. Then create * necessary directories based on the backup. This step is not * required, since FST will generally put files back where they * came from, but it does avoid confusion. * in,12,768,ok * crdir /scratch 12 prot /scratch rw/rw/rw/ * crdir /programs 12 crdir /system 12 crdir /users 12 crdir /m_users 12 * * Next we FTP the FST archive over from the system it is stored * on. In this example, we have command files in the /S (renamed * from /SYSTEM) directory of the memory based system. * ftp -l/scratch/ftp.log -t/s/ftpcmd.cmd * * * Now we run FST and restore the files. * Echo ` ` Echo `Restoring system files` Echo ` ` * fst tr /s/fstcmd.cmd * Echo ` ` echo `Installing Bootex` Echo ` ` * * Re-install Bootex. If you have a FMGR boot LU, this would be * done with a FMGR DU command. * * fput /system/bootex 12 0 * Echo ` ` Echo `Finished' Echo ` ` Echo ` Ready to Reboot system from disk` Echo ` Hit Break, and type %BDC6027` Echo ` ` Echo ` ` * Listings 5 and 6 show the command files used to copy the archive file and then restore the backup using FST LISTING 5 --------- * * Command file used to get a FST archive file from a * remote system * * Run string: ftp -l/scratch/ftp.log -t/s/ftpcmd.cmd * as shown in RESTORE.CMD * open 15.37.241.3 user walt ***password get /brutus/archive.fst /scratch/archive.fst exit LISTING 6 --------- * Command file to restore from a archive file * * Run string: fst,tr,/s/fstcmd.cmd * as shown in RESTORE.CMD * mt /scratch/archive.fst re @ go *