Jeremy,

Dave Jones of Sine Nomine has written an EXEC that will do just what you
want, in the guest's CMS startup phase:
http://www.sinenomine.net/downloads/SWAPGEN.EXEC

According to the downloads page there, it is used "to initialize a VDISK for
Linux swap space."


Mark Post

-----Original Message-----
From: Jeremy Warren [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 6:06 PM
To: [EMAIL PROTECTED]
Subject: Sles8 and V-Disk FBA Swap Two part question


Setting up a new SLES8 image under zVM 4.2.  This is a 2 part question
regarding my first go at an image with a v-disk based swap file (We have
been using disk swap up to this point).  This of course convieniently
requires knowledge of REXX, VM and the linux modules environment all of
which I am about big-toe deep into : )

Part 1: Asks if my setup of the v-disk swap looks reasonably correct with
all of the usual disclaimers that you know nothing about my environment or
what I am trying to do : )
Part 2: How do I get SLES8 to automatically recognize the FBA device the
way it does other devies (i.e. my HSI card) where it automatically insmods
the module when needed.

So I added the entry:
MDISK 9000 FB-512 V-DISK 262144 MR ALL SOME FEW   * 128MB SWAP FILE

I seed it during the profile exec:
/*  */
'CP SET PF1 FILEL * * '
'CP SET PF07 IMMED FILEL'
'CP SET PF12 RETRIEVE'
'CP SET PF24 RETRIEVE FORWARD'
'CP SET MSG ON'
'CP SET EMSG ON'            /* ERROR MESSAGES ARE ACTIVE          */
BOOTFLAG=0
'EXECIO * CP (STR Q' USERID()
PULL QANS
PARSE VAR QANS . . TERMID .
IF TERMID='DSC' THEN BOOTFLAG=1
 ELSE DO
   SAY 'ENTER 1 TO BOOT THE LINUX MACHINE'
   SAY 'ANTHING ELSE WILL EXIT TO CMS'
   PULL OPTION
   IF OPTION=1 THEN BOOTFLAG=1
 END
IF BOOTFLAG=1 THEN CALL BOOTLINUX
EXIT
/*    */
BOOTLINUX:
'SET IMPCP ON'
'CP SET RUN ON'
'CP TERM CHARDEL OFF'      /* TO USE @ IN INTERNET ADDRESSES         */
'SET RELPAGE OFF'          /* AVOIDS A LINUX PROBLEM                 */
 QUEUE '1'                 /* START SETUP SWAP TO VDISK              */
 QUEUE 'LXSWAP'
 'FORMAT 9000 E ( BLK 4096'
 IF RC <> 0 THEN EXIT RC
 QUEUE '1'
 'RESERVE LINUX SWAP E6'
 IF RC <> 0 THEN EXIT RC   /* END SETUP SWAP TO VDISK                */
'CP I 1000 CLEAR'          /* IPL IT                                 */
RETURN



If I issue swapon /dev/dasda it fails with the message:
swapon: /dev/dasda: No such device

I have also tried mkswap /dev/dasda;swapon /dev/dasda to no avail.

It does SEE the device as dev/dasda in the /proc/dasd/devices:
9000(none) at ( 94:  0) is dasda      : unknown

But doesn't recognize the type as FBA (comes up none)

So then if I do:
insmod dasd_fba_mod

Then do a swapon /dev/dasda I get:
swapon: /dev/dasda: Invalid argument

But if after the insmod I do a mkswap and a swapon at this point it works.

I know my issue with the "No such device" is the fba module isn't being
loaded (part2) but as far as part 1 goes, I "thought" (always dangerous
words) that the QUEUE 1 LXSWAP stuff in the profile exec was seeding the
swap disk so I didn't have to do a mkswap during boot and all I needed to
do was add a swapon line to the boot.local.

Thank you in advance..any and all advice greatly appreciated!!

Jeremy Warren
Sr. Systems Programmer
KB Toy Stores
mailto:[EMAIL PROTECTED]@kbtoys.com

Reply via email to