Nah.....it's just easier to use SWAPGEN....:-)

DJ

On 08/05/2011 01:55 PM, Christian Paro wrote:
> FWIW, if you use an init scrit rather than SWAPGEN to handle swap creation
> on VDisk, this also frees you from having to IPL CMS prior to booting Linux
> - shaving a little time off of the boot process.
>
> It also allows you to easily use one script for all your systems while
> defining different VDisk/TDisk configurations in your user directory to meet
> different swapping requirements.
>
> Here's an example that will bring online, prepare as swap volumes, and
> swapon any VDisk and TDisk volumes defined for the user ID within which
> Linux is running:
>
> #!/bin/bash
> # /etc/init.d/boot.makeswap
> # chkconfig: 3 07 92
> # Description: Creates swap on V-Disk.
> #
> ### BEGIN INIT INFO
> # Provides:          boot.makeswap
> # Required-Start:    boot.localfs boot.device-mapper
> # Should-Start:
> # Required-Stop:     boot.localfs boot.device-mapper
> # Should-Stop:
> # Default-Start:     B
> # Default-Stop:
> # Description:       Enable swap on vdisk/tdisk
> # Short-Description: Enable swap on vdisk/tdisk
> ### END INIT INFO
>
> if [[ $1 = 'start' ]]; then
>   # Create swap on VDISKs:
>   for vdev in $(vmcp q v dasd | awk '/(VDSK)/{print $2}'); do
>     chccwdev -e ${vdev} &>/dev/null
>     sleep 1
>     udevadm settle &>/dev/null || udevsettle &>/dev/null
>     sleep 1
>     if [[ -b /dev/disk/by-path/ccw-0.0.${vdev} ]]; then
>       mkswap -f /dev/disk/by-path/ccw-0.0.${vdev}
>       # The -p option here sets a priority to force the use of this vdisk
>       # swap before any real-disk swap partitions or swap files.
>       swapon -p 1023 /dev/disk/by-path/ccw-0.0.${vdev}
>     fi
>   done
>   # Create swap on TDISKS:
>   for vdev in $(vmcp q v dasd | awk '/(TEMP)/{print $2}'); do
>     chccwdev -e ${vdev} &>/dev/null
>     sleep 1
>     udevadm settle &>/dev/null || udevsettle &>/dev/null
>     sleep 1
>     if [[ -b /dev/disk/by-path/ccw-0.0.${vdev} ]]; then
>       if [[ $(grep "^0.0.${vdev}" /proc/dasd/devices | grep '(ECKD)') ]];
> then
>         dasdfmt -y -b 4096 /dev/disk/by-path/ccw-0.0.${vdev}
>         sync
>         sleep 1
>         fdasd -a /dev/disk/by-path/ccw-0.0.${vdev}
>         udevadm settle &>/dev/null || udevsettle &>/dev/null
>         sleep 1
>         mkswap -f /dev/disk/by-path/ccw-0.0.${vdev}-part1
>         swapon -p 255 /dev/disk/by-path/ccw-0.0.${vdev}-part1
>       elif [[ $(grep "^0.0.${vdev}" /proc/dasd/devices | grep '(FBA )') ]];
> then
>         mkswap -f /dev/disk/by-path/ccw-0.0.${vdev}
>         swapon -p 255 /dev/disk/by-path/ccw-0.0.${vdev}
>       fi
>     fi
>   done
> fi
>
> ...also setting swap priorities such that your (fast) VDisk swap space will
> be used before any TDisk swap space is used, and your TDisk swap space will
> be used before any static swap files or partitions (assuming those are
> brought up with without specifying a priority level, or with a priority
> level of < 255 specified).
>
> This behavior can, of course, be modified to suit your needs by modifying
> the script.
>
> On Fri, Aug 5, 2011 at 12:35 PM, Mark Post <[email protected]> wrote:
>
>>>>> On 8/5/2011 at 12:11 PM, <[email protected]> wrote:
>>> OK found my problem.    When I uploaded initrd.img, I didn't realize I
>> had
>>> a disk full error.  My bad.
>>>
>>> Fixed that and everything comes up.  I have Fedora 15 installed.
>>>
>>> Does SWAPGEN work with this?   What do you do regarding your swap
>>> partitions?
>>>
>>> I used vdisk for my swap disks and when I did a swapon, linux complained.
>>
>> SWAPGEN is not distribution specific.  If you don't want to modify your
>> Linux startup scripts to do a "mkswap" on your VDISKS, then SWAPGEN is the
>> only way to go.
>>
>>
>> Mark Post
>>
>> ----------------------------------------------------------------------
>> For LINUX-390 subscribe / signoff / archive access instructions,
>> send email to [email protected] with the message: INFO LINUX-390 or
>> visit
>> http://www.marist.edu/htbin/wlvindex?LINUX-390
>> ----------------------------------------------------------------------
>> For more information on Linux on System z, visit
>> http://wiki.linuxvm.org/
>>
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO LINUX-390 or visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
> ----------------------------------------------------------------------
> For more information on Linux on System z, visit
> http://wiki.linuxvm.org/
>

--
Dave Jones
V/Soft Software
www.vsoft-software.com
Houston, TX
281.578.7544

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to