*** Reply to note of Thu, 19 Jan 2006 10:18:30 -0500 (EST/CDT)
*** by [email protected]
This is the way I did it a while ago on SLES9 (but it may need
modifications
as dcssblk behaves differently depending on your release).
Make sure that you have enough SPOOL and PAGING space.
In the examples, I define multiple DCSSs, 128M
big - you could start with a single 64M DCSS.
You will need to give your Linux server VM privilege class E, and
have a another VMuserid such as MAINT, that has class E and
and a maximum virtual machine size of 1G in the CP directory
(or the top address of the biggest DCSS)
1) From any VMuserid with class E (e. g. MAINT)
a. CP DEFINE STORAGE 1G
b. Create dummy DCSSs
CP DEFSEG LXSW0128 8000-8000 EW 8001-FFFF EN
CP DEFSEG LXSW0256 10000-10000 EW 10001-17FFF EN
CP DEFSEG LXSW0384 18000-18000 EW 18001-1FFFF EN
CP DEFSEG LXSW0512 20000-20000 EW 20001-27FFF EN
CP SAVESEG LXSW0128
CP SAVESEG LXSW0256
CP SAVESEG LXSW0384
CP SAVESEG LXSW0512
2) You are done with MAINT
3) Give your Linux server VMuserid privilege class E and virtual
storage size to 128M
4) Shutdown Linux and logoff the VMuserid of the Linux server.
5) Restart the Linux server
6) As root on the Linux server (SLES9):
a. Run mk_swap_dcss
7) To access the SWAPDCSS from any SLES9, run load_swap_dcss
8) Type "swapon -s " to verify.
9) You can remove privilege class E and reset any other CP
directory changes you did.
10) It works on SLES8, but you need to use /proc instead of /sys in
the scripts
11) You may need to create the /dev devices (i=0 to 15)
mknod -m 0600 /dev/dcssblk$i b 252 $i
Hope it helps,
sal
mk_swap_dcss script:
#!/bin/bash
# mk_swap_dcss
#
DCSS_LIST="LXSW0128 LXSW0256 LXSW0384 LXSW0512"
modprobe -v dcssblk
for DCSS in $DCSS_LIST; do
echo "creating swap DCSS $DCSS"
echo "$DCSS" > /sys/devices/dcssblk/add
num=$(cut -d: -f2 /sys/devices/dcssblk/$DCSS/block/dev)
if [ "$?" != 0 ]; then
echo "DCSS $DCSS was not loaded!"
exit 1
fi
dcss_dev=/dev/dcssblk$num
echo "Using device $dcss_dev for $DCSS"
mkswap $dcss_dev
echo "re-saving DCSS: $DCSS"
echo "1" > /sys/devices/dcssblk/LXSW1280/save
sleep 2
echo "removing DCSS: $DCSS"
echo "$DCSS" > /sys/devices/dcssblk/remove
done
exit
##
## end of mk_swap_dcss
load_swap_dcss script:
#!/bin/bash
# load_swap_dcss
modprobe -v dcssblk
swap_priority=60
DCSS_LIST="LXSW0128 LXSW0256 LXSW0384 LXSW0512"
for DCSS in $DCSS_LIST; do
echo "Loading DCSS $DCSS"
echo "$DCSS" > /sys/devices/dcssblk/add
#get the dcss blk number and rc
num=$(cut -d: -f2 /sys/devices/dcssblk/$DCSS/block/dev)
if [ "$?" != 0 ]; then
echo "$me: DCSS $DCSS was not loaded!"
continue
fi
dcss_dev=/dev/dcssblk$num
echo "$me: Using device $dcss_dev for $DCSS"
/sbin/swapon -p $swap_priority $dcss_dev
let swap_priority-=1
done
##
## end load_wap_dcss
"James G. Stracka" <[EMAIL PROTECTED]> writes:
>I was reading a document that suggested using DCSS as the SWAP disk for
>z/LINUX
>guests instead of V-DISK. This sounded interesting for several reasons.
>Unfortunately, the document did not describe how to implement this.
>
>Has anyone done this or experimented with it?
>
>My guess would be that this DCSS would have to be defined Exclusive Write.
>
>Can the DCSS be inside the guest's Virtual Storage or must it be outside?
>
>How would this be formatted? And, how would it be "mounted"?
>
>Jim