Re: Dasd_diag_mod question
I agree with Mark. We have added som mkswap and swapon to fix these VDISK swaps, and it works almost all times, so after a z/VM restart there is always a number of alarms from servers without a valid swap. It seams to be a timing problem, the mkswap is running but could'nt allocate the VDISK for some reason. It's annoying and time-stealing. We will start using SWAPGEN.EXEC and the the arguments is - no need to change in boot-scripts, keep the installation as clean as possible. - no problems at restart/reboot Cordialement / Vriendelijke Groeten / Best Regards / Med Vänliga Hälsningar Tore Agblad Volvo Information Technology Infrastructure Mainframe Design & Development SE-405 08, Gothenburg Sweden E-mail: tore.agb...@volvo.com http://www.volvo.com/volvoit/global/en-gb/ From: Linux on 390 Port [linux-...@vm.marist.edu] On Behalf Of Mark Post [mp...@novell.com] Sent: Friday, September 11, 2009 17:52 To: LINUX-390@VM.MARIST.EDU Subject: Re: Dasd_diag_mod question >>> On 9/11/2009 at 11:36 AM, Larry Uher wrote: > I guess my question would be why is a complex EXEC needed to do a > normal system administration task? It's not all that complex, just a lot of parameter parsing and error checking surrounding a couple of lines of code that actually do the work. The reason why it's useful is so that people using VDISKs don't need to have their Linux admins make any changes to the Linux system itself, and so it doesn't appear to be different from midrange Linux systems. Eliminating these platform specific differences helps ease acceptance of the platform. It's also good system management practice in that you're not modifying distribution-provided scripts that will get over-written at some point by maintenance or an upgrade. Saves time, less hassle in the long run. > A second question is why didn't > Novell provide a straightforward method for doing this and document it > in a manual (without using a complex 3rd party EXEC) ? When SWAPGEN was written, the Linux distribution providers had much bigger fish to fry. After it was written, there wasn't a need for them to do anything, since a solution already existed. Limited resources, re-inventing wheels, etc., etc. And, given the growth and evolution of the platform, there are still far bigger fish that need frying, perhaps more than before. Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
On Sat, Sep 12, 2009 at 5:00 PM, Rich Smrcina wrote: > I made one of the original requests for this support. I thought it was > strange to have to provide the VDISK size for each individual virtual > machine in a shared profile environment when it could be done in the > directory, which is perhaps a more natural place for VM systems programmers. It may be easier, but not necessarily the most effective. The optimal size for the VDISK depends on workload and resource contention. Wouldn't it be nifty to use your performance data archives to determine the optimal size of the VDISKs and pick up that information next time the server restarts? Rob -- Rob van der Heij Velocity Software http://www.velocitysoftware.com/ -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
I made one of the original requests for this support. I thought it was strange to have to provide the VDISK size for each individual virtual machine in a shared profile environment when it could be done in the directory, which is perhaps a more natural place for VM systems programmers. Adam Thornton wrote: So, for those of you playing along at home: I'll eventually release a new VMARC, but I need to find and update the help file sources first, and I need to do the whole thing under update control and build the package, and in the meantime: I'm using the 0803 SWAPGEN as my starting point. Lines 243-244 read: parse var msg . . . . . newblks . if blks <> newblks then signal WrongBlks/* Mismatch, error */ Between these two lines, stick: if blks = '' then blks = newblks (that's two single quotes, not one double quote) And there you go: if you use REUSE (as you would if the VDISK is specified in your directory entry) then you no longer need to specify the number of blocks. Adam -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- Rich Smrcina Phone: 414-491-6001 http://www.linkedin.com/in/richsmrcina Catch the WAVV! http://www.wavv.org WAVV 2010 - Apr 9-14, 2010 Covington, KY -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
> >If you put the VDISK in the CP directory entry and use > > the REUSE option, SWAPGEN will simply format what's there and write > > the signature on the disk. > Well, NOW it will, with the change I just posted. Hmph. I'd fixed that while back, but guess I didn't commit the fix to the main repository. My bad, me. -- db -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
It's a religious debate at this point. We had our reasons for doing it the way we did at the time. YMMV. -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of O'Brien, Dennis L Sent: Friday, September 11, 2009 2:52 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: [LINUX-390] Dasd_diag_mod question I prefer running SWAPGEN under CMS before starting Linux. If my primary background were Linux, I might feel differently. Adam's fix to pick up the disk size from the directory certainly makes things easier. Dennis O'Brien My computer beat me at chess, but it was no match for me in kickboxing. -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of David Boyes Sent: Friday, September 11, 2009 10:59 To: LINUX-390@VM.MARIST.EDU Subject: Re: Dasd_diag_mod question > I guess my question would be why is a complex EXEC needed to do a > normal system administration task? It's a multi-step process whether you do it at the hypervisor level or inside the Linux guest, so you're going to need some kind of scripting either way. The basic Unix philosophy is write tools that do one thing well, then use scripting to sequence the execution of the one-thing tools to accomplish bigger tasks. You could write a custom tool that did it all -- but you'd be duplicating a lot of work and you'd have to maintain it over time. Big PITA. I happen to be of the school that it's easier and simpler for this kind of preparation work to be done at the hypervisor level, and let the guest OS concentrate on identifying stuff it can use and managing the process of devices coming and going in a rational way. In this case, also, having swap is kind of necessary to getting Linux to run decently, and it's hard to do Linux stuff without a running Linux system, so creating SWAPGEN was a way to do the deed before you had a running Linux system to do it with. > A second question is why didn't > Novell provide a straightforward method for doing this and document it > in a manual (without using a complex 3rd party EXEC) ? It sounds like the issue is more that it's a 3rd party tool than that it's done the way it's done. If either of the distributors wants to include SWAPGEN, we're open to discussing the idea. No one has asked. It would be nice if the documentation included the way to set up DIAG disk I/O, though. -- db David Boyes Sine Nomine Associates -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- This message w/attachments (message) may be privileged, confidential or proprietary, and if you are not an intended recipient, please notify the sender, do not use or share it and delete it. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Merrill Lynch. Subject to applicable law, Merrill Lynch may monitor, review and retain e-communications (EC) traveling through its networks/systems. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or error-free. References to "Merrill Lynch" are references to any company in the Merrill Lynch & Co., Inc. group of companies, which are wholly-owned by Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this E-communication may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you consent to the foregoing. -- -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
I prefer running SWAPGEN under CMS before starting Linux. If my primary background were Linux, I might feel differently. Adam's fix to pick up the disk size from the directory certainly makes things easier. Dennis O'Brien My computer beat me at chess, but it was no match for me in kickboxing. -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of David Boyes Sent: Friday, September 11, 2009 10:59 To: LINUX-390@VM.MARIST.EDU Subject: Re: Dasd_diag_mod question > I guess my question would be why is a complex EXEC needed to do a > normal system administration task? It's a multi-step process whether you do it at the hypervisor level or inside the Linux guest, so you're going to need some kind of scripting either way. The basic Unix philosophy is write tools that do one thing well, then use scripting to sequence the execution of the one-thing tools to accomplish bigger tasks. You could write a custom tool that did it all -- but you'd be duplicating a lot of work and you'd have to maintain it over time. Big PITA. I happen to be of the school that it's easier and simpler for this kind of preparation work to be done at the hypervisor level, and let the guest OS concentrate on identifying stuff it can use and managing the process of devices coming and going in a rational way. In this case, also, having swap is kind of necessary to getting Linux to run decently, and it's hard to do Linux stuff without a running Linux system, so creating SWAPGEN was a way to do the deed before you had a running Linux system to do it with. > A second question is why didn't > Novell provide a straightforward method for doing this and document it > in a manual (without using a complex 3rd party EXEC) ? It sounds like the issue is more that it's a 3rd party tool than that it's done the way it's done. If either of the distributors wants to include SWAPGEN, we're open to discussing the idea. No one has asked. It would be nice if the documentation included the way to set up DIAG disk I/O, though. -- db David Boyes Sine Nomine Associates -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
On Sep 11, 2009, at 1:15 PM, David Boyes wrote: My complaint with SWAPGEN going back to when it was first announced was that it needs to know the number of blocks to format. Actually, it needs to know how many blocks to define if you don't want to code it in the directory entry -- it always formats everything. If you put the VDISK in the CP directory entry and use the REUSE option, SWAPGEN will simply format what's there and write the signature on the disk. Well, NOW it will, with the change I just posted. Adam -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
> My complaint with SWAPGEN going back to when it was first announced was > that it needs to know the number of blocks to format. Actually, it needs to know how many blocks to define if you don't want to code it in the directory entry -- it always formats everything. If you put the VDISK in the CP directory entry and use the REUSE option, SWAPGEN will simply format what's there and write the signature on the disk. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
On Sep 11, 2009, at 12:59 PM, David Boyes wrote: It sounds like the issue is more that it's a 3rd party tool than that it's done the way it's done. If either of the distributors wants to include SWAPGEN, we're open to discussing the idea. No one has asked. They don't even need to ask, actually. It's under the Artistic License, which is OSI-approved. Just saying. Adam -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
> When SWAPGEN was written, the Linux distribution providers had much > bigger fish to fry. When SWAPGEN was written, there WEREN'T any distribution providers for 390 (other than Marist, who definitely had other things to do). 8-) As you say, though, ain't broke, don't fix it. -- db -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
> I guess my question would be why is a complex EXEC needed to do a > normal system administration task? It's a multi-step process whether you do it at the hypervisor level or inside the Linux guest, so you're going to need some kind of scripting either way. The basic Unix philosophy is write tools that do one thing well, then use scripting to sequence the execution of the one-thing tools to accomplish bigger tasks. You could write a custom tool that did it all -- but you'd be duplicating a lot of work and you'd have to maintain it over time. Big PITA. I happen to be of the school that it's easier and simpler for this kind of preparation work to be done at the hypervisor level, and let the guest OS concentrate on identifying stuff it can use and managing the process of devices coming and going in a rational way. In this case, also, having swap is kind of necessary to getting Linux to run decently, and it's hard to do Linux stuff without a running Linux system, so creating SWAPGEN was a way to do the deed before you had a running Linux system to do it with. > A second question is why didn't > Novell provide a straightforward method for doing this and document it > in a manual (without using a complex 3rd party EXEC) ? It sounds like the issue is more that it's a 3rd party tool than that it's done the way it's done. If either of the distributors wants to include SWAPGEN, we're open to discussing the idea. No one has asked. It would be nice if the documentation included the way to set up DIAG disk I/O, though. -- db David Boyes Sine Nomine Associates -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
So, for those of you playing along at home: I'll eventually release a new VMARC, but I need to find and update the help file sources first, and I need to do the whole thing under update control and build the package, and in the meantime: I'm using the 0803 SWAPGEN as my starting point. Lines 243-244 read: parse var msg . . . . . newblks . if blks <> newblks then signal WrongBlks/* Mismatch, error */ Between these two lines, stick: if blks = '' then blks = newblks (that's two single quotes, not one double quote) And there you go: if you use REUSE (as you would if the VDISK is specified in your directory entry) then you no longer need to specify the number of blocks. Adam -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
>There will be plenty of us reminding you on this post when you found >something happened to the order of your disks in the virtual machine >configuration and the mkswap wiped out your root file system or some >other relevant data... That shouldn't happen if you are using udev to address them Pieter Harder Brabant Water N.V. Postbus 1068 5200 BC 's-Hertogenbosch http://www.brabantwater.nl Handelsregister: 16005077 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
On Fri, Sep 11, 2009 at 5:36 PM, Larry Uher wrote: > I guess my question would be why is a complex EXEC needed to do a > normal system administration task? A second question is why didn't > Novell provide a straightforward method for doing this and document it > in a manual (without using a complex 3rd party EXEC) ? There will be plenty of us reminding you on this post when you found something happened to the order of your disks in the virtual machine configuration and the mkswap wiped out your root file system or some other relevant data... Rob -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
We use two vdisks, plus one DASD swap. If the guest overflows the first vdisk, it's time to watch it. If it overflows the second, it's time to increase the memory. -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of Pat Carroll Sent: Friday, September 11, 2009 1:14 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: [LINUX-390] Dasd_diag_mod question Changing the size isn't an issue for me; I size memory so that we *barely* swap anyway. I've never has to change the size of a vdisk. Spelling courtesy of Blackberry - Original Message - From: Linux on 390 Port To: LINUX-390@VM.MARIST.EDU Sent: Fri Sep 11 13:02:54 2009 Subject: Re: Dasd_diag_mod question My complaint with SWAPGEN going back to when it was first announced was that it needs to know the number of blocks to format. This means that if the size or number of the vdisk(s) changes in the directory, the VM admin also has to go to the target machine's 191 disk and update the PROFILE EXEC so the right number of blocks get formatted on the right devices. Having to change things in multiple places seemed like something to be avoided. So I wrote a Linux init script that does the whole thing internally within the guest. It finds all of the FBA disks, formats them, and runs mkswap. It also enables them in increasing priority order, so they get used before the default DASD swap partition, and it handles the diag module and enabling access via diag. We use this on about 100 guests, and it works very well. My only complaint with it is that it treats all FBA disks as swap disks, which might be a problem if we had any real FBA disks, but since we're entirely on 3390's and the odd FCP device, it's a non issue. It also generates one bogus error message that I never got around to suppressing. This version is for Red Hat (RHEL5), but it shouldn't be hard to customize for Suse. #!/bin/bash # $Id: vdswap,v 1.7 2007/11/06 20:44:38 root Exp $ # # vdswapThis shell script does the following: # 1) Looks in sysfs for any FBA disks # 2) If they are not already enabled for swap, it formats # them, and enables them for swap with a higher priority # than the default disk swap space # # Should run after filesystems are mounted, before starting required daemons # that might need to be configured # # chkconfig: 2345 01 99 # Description: Formats and enables vdisk swap spaces # prog=`basename $0` start() { SYSDEV=/sys/bus/ccw/drivers/dasd-fba echo "Enabling vdisk swap spaces " modprobe -q dasd_diag_mod if ls $SYSDEV | grep -q 0.0 ; then PRIO=1 for A in $SYSDEV/0.0.* do DEVICE=`ls $A/block* | grep dasd | head -n 1` if lsmod | grep -q dasd_diag_mod ; then echo 0 > $A/online echo 1 > $A/use_diag echo 1 > $A/online sleep 1 fi DEVBASE=${DEVICE:0:${#DEVICE}-1} if ! swapon -s | grep -q $DEVBASE ; then parted -s /dev/$DEVBASE mkpartfs primary swap 1 mkswap /dev/$DEVICE swapon -p $PRIO /dev/$DEVICE let PRIO=$PRIO+1 fi done fi touch /var/lock/subsys/vdswap } stop() { echo -n $"Shutting down $prog: " rm -f /var/lock/subsys/vdswap return 0 } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status vdswap RETVAL=0 ;; restart|reload) stop start RETVAL=$? ;; condrestart) RETVAL=0 ;; *) echo $"Usage: $0 {start|stop|restart|condrestart|status}" exit 1 esac exit $RETVAL -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of Adam Thornton Sent: Friday, September 11, 2009 12:30 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: [LINUX-390] Dasd_diag_mod question On Sep 11, 2009, at 10:36 AM, Larry Uher wrote: > I guess my question would be why is a complex EXEC needed to do a > normal system administration task? A second question is why didn't > Novell provide a straightforward method for doing this and document it > in a manual (without using a complex 3rd party EXEC) ? Complex? After the description and the license and update comment blocks, it's about 240 lines. Of those, about 120 are the various ways the program can exit (with descriptive text) and the help message. That leaves about 120 lines of actual code, and those lines are not dense (e.g. one line per pipe stage). That handles both the raw FBA and the DIAG device cases. It
Re: Dasd_diag_mod question
Didn't seem worth it. The scheme we use works fine, and didn't require us to change PROFILE EXEC on 50-odd servers. The package containing the script was rolled out with a scheduled update on the Linux side. The directory changes could be scripted through VMSecure. -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of Adam Thornton Sent: Friday, September 11, 2009 1:09 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: [LINUX-390] Dasd_diag_mod question On Sep 11, 2009, at 12:02 PM, Hall, Ken (GTS) wrote: > My complaint with SWAPGEN going back to when it was first announced > was > that it needs to know the number of blocks to format. This means that > if the size or number of the vdisk(s) changes in the directory, the VM > admin also has to go to the target machine's 191 disk and update the > PROFILE EXEC so the right number of blocks get formatted on the right > devices. Having to change things in multiple places seemed like > something to be avoided. Hm. Did you ever send us a requirement for that? If so, I apologize for having missed it. Since we already look for the number of blocks in the "reuse" code, I think it should be pretty straightforward to do that check and then use the number of blocks detected if the user doesn't specify. Adam -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- This message w/attachments (message) may be privileged, confidential or proprietary, and if you are not an intended recipient, please notify the sender, do not use or share it and delete it. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Merrill Lynch. Subject to applicable law, Merrill Lynch may monitor, review and retain e-communications (EC) traveling through its networks/systems. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or error-free. References to "Merrill Lynch" are references to any company in the Merrill Lynch & Co., Inc. group of companies, which are wholly-owned by Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this E-communication may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you consent to the foregoing. -- -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
Changing the size isn't an issue for me; I size memory so that we *barely* swap anyway. I've never has to change the size of a vdisk. Spelling courtesy of Blackberry - Original Message - From: Linux on 390 Port To: LINUX-390@VM.MARIST.EDU Sent: Fri Sep 11 13:02:54 2009 Subject: Re: Dasd_diag_mod question My complaint with SWAPGEN going back to when it was first announced was that it needs to know the number of blocks to format. This means that if the size or number of the vdisk(s) changes in the directory, the VM admin also has to go to the target machine's 191 disk and update the PROFILE EXEC so the right number of blocks get formatted on the right devices. Having to change things in multiple places seemed like something to be avoided. So I wrote a Linux init script that does the whole thing internally within the guest. It finds all of the FBA disks, formats them, and runs mkswap. It also enables them in increasing priority order, so they get used before the default DASD swap partition, and it handles the diag module and enabling access via diag. We use this on about 100 guests, and it works very well. My only complaint with it is that it treats all FBA disks as swap disks, which might be a problem if we had any real FBA disks, but since we're entirely on 3390's and the odd FCP device, it's a non issue. It also generates one bogus error message that I never got around to suppressing. This version is for Red Hat (RHEL5), but it shouldn't be hard to customize for Suse. #!/bin/bash # $Id: vdswap,v 1.7 2007/11/06 20:44:38 root Exp $ # # vdswapThis shell script does the following: # 1) Looks in sysfs for any FBA disks # 2) If they are not already enabled for swap, it formats # them, and enables them for swap with a higher priority # than the default disk swap space # # Should run after filesystems are mounted, before starting required daemons # that might need to be configured # # chkconfig: 2345 01 99 # Description: Formats and enables vdisk swap spaces # prog=`basename $0` start() { SYSDEV=/sys/bus/ccw/drivers/dasd-fba echo "Enabling vdisk swap spaces " modprobe -q dasd_diag_mod if ls $SYSDEV | grep -q 0.0 ; then PRIO=1 for A in $SYSDEV/0.0.* do DEVICE=`ls $A/block* | grep dasd | head -n 1` if lsmod | grep -q dasd_diag_mod ; then echo 0 > $A/online echo 1 > $A/use_diag echo 1 > $A/online sleep 1 fi DEVBASE=${DEVICE:0:${#DEVICE}-1} if ! swapon -s | grep -q $DEVBASE ; then parted -s /dev/$DEVBASE mkpartfs primary swap 1 mkswap /dev/$DEVICE swapon -p $PRIO /dev/$DEVICE let PRIO=$PRIO+1 fi done fi touch /var/lock/subsys/vdswap } stop() { echo -n $"Shutting down $prog: " rm -f /var/lock/subsys/vdswap return 0 } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status vdswap RETVAL=0 ;; restart|reload) stop start RETVAL=$? ;; condrestart) RETVAL=0 ;; *) echo $"Usage: $0 {start|stop|restart|condrestart|status}" exit 1 esac exit $RETVAL -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of Adam Thornton Sent: Friday, September 11, 2009 12:30 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: [LINUX-390] Dasd_diag_mod question On Sep 11, 2009, at 10:36 AM, Larry Uher wrote: > I guess my question would be why is a complex EXEC needed to do a > normal system administration task? A second question is why didn't > Novell provide a straightforward method for doing this and document it > in a manual (without using a complex 3rd party EXEC) ? Complex? After the description and the license and update comment blocks, it's about 240 lines. Of those, about 120 are the various ways the program can exit (with descriptive text) and the help message. That leaves about 120 lines of actual code, and those lines are not dense (e.g. one line per pipe stage). That handles both the raw FBA and the DIAG device cases. It's not a normal system administration task on any other Linux architecture. It's really quite unusual for your swap device to be destroyed and recreated every time you power on the machine. In the normal case the swap signature sits there between power cycles. That's why Dave and I wrote the thing in the first place--Linux does not generally consider needing to format the swap device as p
Re: Dasd_diag_mod question
On Sep 11, 2009, at 12:02 PM, Hall, Ken (GTS) wrote: My complaint with SWAPGEN going back to when it was first announced was that it needs to know the number of blocks to format. This means that if the size or number of the vdisk(s) changes in the directory, the VM admin also has to go to the target machine's 191 disk and update the PROFILE EXEC so the right number of blocks get formatted on the right devices. Having to change things in multiple places seemed like something to be avoided. Hm. Did you ever send us a requirement for that? If so, I apologize for having missed it. Since we already look for the number of blocks in the "reuse" code, I think it should be pretty straightforward to do that check and then use the number of blocks detected if the user doesn't specify. Adam -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
My complaint with SWAPGEN going back to when it was first announced was that it needs to know the number of blocks to format. This means that if the size or number of the vdisk(s) changes in the directory, the VM admin also has to go to the target machine's 191 disk and update the PROFILE EXEC so the right number of blocks get formatted on the right devices. Having to change things in multiple places seemed like something to be avoided. So I wrote a Linux init script that does the whole thing internally within the guest. It finds all of the FBA disks, formats them, and runs mkswap. It also enables them in increasing priority order, so they get used before the default DASD swap partition, and it handles the diag module and enabling access via diag. We use this on about 100 guests, and it works very well. My only complaint with it is that it treats all FBA disks as swap disks, which might be a problem if we had any real FBA disks, but since we're entirely on 3390's and the odd FCP device, it's a non issue. It also generates one bogus error message that I never got around to suppressing. This version is for Red Hat (RHEL5), but it shouldn't be hard to customize for Suse. #!/bin/bash # $Id: vdswap,v 1.7 2007/11/06 20:44:38 root Exp $ # # vdswapThis shell script does the following: # 1) Looks in sysfs for any FBA disks # 2) If they are not already enabled for swap, it formats # them, and enables them for swap with a higher priority # than the default disk swap space # # Should run after filesystems are mounted, before starting required daemons # that might need to be configured # # chkconfig: 2345 01 99 # Description: Formats and enables vdisk swap spaces # prog=`basename $0` start() { SYSDEV=/sys/bus/ccw/drivers/dasd-fba echo "Enabling vdisk swap spaces " modprobe -q dasd_diag_mod if ls $SYSDEV | grep -q 0.0 ; then PRIO=1 for A in $SYSDEV/0.0.* do DEVICE=`ls $A/block* | grep dasd | head -n 1` if lsmod | grep -q dasd_diag_mod ; then echo 0 > $A/online echo 1 > $A/use_diag echo 1 > $A/online sleep 1 fi DEVBASE=${DEVICE:0:${#DEVICE}-1} if ! swapon -s | grep -q $DEVBASE ; then parted -s /dev/$DEVBASE mkpartfs primary swap 1 mkswap /dev/$DEVICE swapon -p $PRIO /dev/$DEVICE let PRIO=$PRIO+1 fi done fi touch /var/lock/subsys/vdswap } stop() { echo -n $"Shutting down $prog: " rm -f /var/lock/subsys/vdswap return 0 } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status vdswap RETVAL=0 ;; restart|reload) stop start RETVAL=$? ;; condrestart) RETVAL=0 ;; *) echo $"Usage: $0 {start|stop|restart|condrestart|status}" exit 1 esac exit $RETVAL -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of Adam Thornton Sent: Friday, September 11, 2009 12:30 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: [LINUX-390] Dasd_diag_mod question On Sep 11, 2009, at 10:36 AM, Larry Uher wrote: > I guess my question would be why is a complex EXEC needed to do a > normal system administration task? A second question is why didn't > Novell provide a straightforward method for doing this and document it > in a manual (without using a complex 3rd party EXEC) ? Complex? After the description and the license and update comment blocks, it's about 240 lines. Of those, about 120 are the various ways the program can exit (with descriptive text) and the help message. That leaves about 120 lines of actual code, and those lines are not dense (e.g. one line per pipe stage). That handles both the raw FBA and the DIAG device cases. It's not a normal system administration task on any other Linux architecture. It's really quite unusual for your swap device to be destroyed and recreated every time you power on the machine. In the normal case the swap signature sits there between power cycles. That's why Dave and I wrote the thing in the first place--Linux does not generally consider needing to format the swap device as part of its normal bootup routine and rather than mess with system startup scripts and their ordering, we thought it was a lot easier to just take care of it in CMS before handing control to Linux, so that the swap device was pre-prepared like it expected. And that, by the way, is the reason Novell doesn't do it: it's
Re: Dasd_diag_mod question
On Sep 11, 2009, at 10:36 AM, Larry Uher wrote: I guess my question would be why is a complex EXEC needed to do a normal system administration task? A second question is why didn't Novell provide a straightforward method for doing this and document it in a manual (without using a complex 3rd party EXEC) ? Complex? After the description and the license and update comment blocks, it's about 240 lines. Of those, about 120 are the various ways the program can exit (with descriptive text) and the help message. That leaves about 120 lines of actual code, and those lines are not dense (e.g. one line per pipe stage). That handles both the raw FBA and the DIAG device cases. It's not a normal system administration task on any other Linux architecture. It's really quite unusual for your swap device to be destroyed and recreated every time you power on the machine. In the normal case the swap signature sits there between power cycles. That's why Dave and I wrote the thing in the first place--Linux does not generally consider needing to format the swap device as part of its normal bootup routine and rather than mess with system startup scripts and their ordering, we thought it was a lot easier to just take care of it in CMS before handing control to Linux, so that the swap device was pre-prepared like it expected. And that, by the way, is the reason Novell doesn't do it: it's not a task that's necessary on other architectures, and Novell, not surprisingly, likes to keep as much the same between platforms as possible. Adam -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
And if you put it in your PROFILE EXEC then as soon as the guest is autologged the disk is created and the system can then be booted by the PROFILE EXEC. On 9/11/09 11:52 AM, "Mark Post" wrote: On 9/11/2009 at 11:36 AM, Larry Uher wrote: > It's not all that complex, just a lot of parameter parsing and error checking > surrounding a couple of lines of code that actually do the work. The reason > why it's useful is so that people using VDISKs don't need to have their Linux > admins make any changes to the Linux system itself, and so it doesn't appear > to be different from midrange Linux systems. Eliminating these platform > specific differences helps ease acceptance of the platform. It's also good > system management practice in that you're not modifying distribution-provided > scripts that will get over-written at some point by maintenance or an upgrade. > Saves time, less hassle in the long run. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
I don't consider it complex; it's very useful. Thanks to SineNomine. Patrick Carroll | Enterprise Technical Architect L.L.Bean, Inc.® | Double L St. | Freeport ME 04033 http://www.llbean.com | pcarr...@llbean.com | 207.552.2426 CONFIDENTIALITY NOTICE: This e-mail and any attachments may contain confidential information that is legally privileged. The information is solely for the use of the intended recipient(s). Any disclosure, copying, distribution, or other use of this information is strictly prohibited. If you have received this e-mail in error, please notify the sender by return e-mail and delete this message. -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of Larry Uher Sent: Friday, September 11, 2009 11:37 AM To: LINUX-390@VM.MARIST.EDU Subject: Re: Dasd_diag_mod question I guess my question would be why is a complex EXEC needed to do a normal system administration task? A second question is why didn't Novell provide a straightforward method for doing this and document it in a manual (without using a complex 3rd party EXEC) ? --- On Fri, 9/11/09, Mark Post wrote: From: Mark Post Subject: Re: Dasd_diag_mod question To: LINUX-390@VM.MARIST.EDU Date: Friday, September 11, 2009, 3:33 PM >>> On 9/11/2009 at 11:20 AM, Larry Uher wrote: > Following is the method I used to switch a swap from FBA to DIAG. I > did not wish to use the third party SWAPGEN EXEC. Any particular reason? I recommend it to all my z/VM customers. Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
>>> On 9/11/2009 at 11:36 AM, Larry Uher wrote: > I guess my question would be why is a complex EXEC needed to do a > normal system administration task? It's not all that complex, just a lot of parameter parsing and error checking surrounding a couple of lines of code that actually do the work. The reason why it's useful is so that people using VDISKs don't need to have their Linux admins make any changes to the Linux system itself, and so it doesn't appear to be different from midrange Linux systems. Eliminating these platform specific differences helps ease acceptance of the platform. It's also good system management practice in that you're not modifying distribution-provided scripts that will get over-written at some point by maintenance or an upgrade. Saves time, less hassle in the long run. > A second question is why didn't > Novell provide a straightforward method for doing this and document it > in a manual (without using a complex 3rd party EXEC) ? When SWAPGEN was written, the Linux distribution providers had much bigger fish to fry. After it was written, there wasn't a need for them to do anything, since a solution already existed. Limited resources, re-inventing wheels, etc., etc. And, given the growth and evolution of the platform, there are still far bigger fish that need frying, perhaps more than before. Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
I guess my question would be why is a complex EXEC needed to do a normal system administration task? A second question is why didn't Novell provide a straightforward method for doing this and document it in a manual (without using a complex 3rd party EXEC) ? --- On Fri, 9/11/09, Mark Post wrote: From: Mark Post Subject: Re: Dasd_diag_mod question To: LINUX-390@VM.MARIST.EDU Date: Friday, September 11, 2009, 3:33 PM >>> On 9/11/2009 at 11:20 AM, Larry Uher wrote: > Following is the method I used to switch a swap from FBA to DIAG. I did > not wish to use the third party SWAPGEN EXEC. Any particular reason? I recommend it to all my z/VM customers. Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
>>> On 9/11/2009 at 11:20 AM, Larry Uher wrote: > Following is the method I used to switch a swap from FBA to DIAG. I did > not wish to use the third party SWAPGEN EXEC. Any particular reason? I recommend it to all my z/VM customers. Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
Following is the method I used to switch a swap from FBA to DIAG. I did not wish to use the third party SWAPGEN EXEC. 1) update /etc/init.d/boot.swap remove mkswap command shutdown 2) update PROFILE EXEC (swaps are formatted here) change format 162 h to format 162 h (blksize 512 boot system 3) YaST DASD : Deactivate the 162 device set Diag On for the 162 device Activate the 162 device Set MODULE="dasd_fba_mod" instead of MODULE="dasd_diag_mod" in /etc/sysconfig/hardware/hwcfg-dasd-bus-ccw-0.0.0162 leave as is DASD_USE_DIAG="1" mkswap /dev/dasdd1 swapon -a lsdasd (swap device 162 should show as DIAG now, not FBA) cd /boot mkinitrd zipl -V update /etc/init.d/boot.swap add mkswap command shutdown boot system again --- On Wed, 7/29/09, Mrohs, Ray wrote: From: Mrohs, Ray Subject: Dasd_diag_mod question To: LINUX-390@VM.MARIST.EDU Date: Wednesday, July 29, 2009, 2:04 PM Hi All, We are running SLES10 SP2, and I am trying to switch our vdisk swap from fba to diag. So far I: 1) run SWAPGEN EXEC with the reuse option (vdisks are defined in the CP directory) 2) included dasd_diag_mod in the kernel configuration and ran mkinitrd (verified with lsmod) 3) set the yast DASD option to use diag for the vdisk devices (verified in /etc/sysconfig/hardware/*) 4) included the devices in fstab as swap 5) reboot /etc/fstab: /dev/dasdf1 none swap sw 0 0 /dev/dasdg1 none swap sw 0 0 /dev/dasdh1 none swap sw 0 0 Swapon -s: Filename Type Size Used Priority /dev/dasdf1 partition 123948 0 -1 /dev/dasdg1 partition 247912 0 -2 /dev/dasdh1 partition 371872 0 -3 But the disks still show up like this: 0.0.0105(FBA ) at ( 94: 20) is dasdf : active at blocksize 512, 25 blocks, 122 MB 0.0.0106(FBA ) at ( 94: 24) is dasdg : active at blocksize 512, 50 blocks, 244 MB 0.0.0107(FBA ) at ( 94: 28) is dasdh : active at blocksize 512, 75 blocks, 366 MB How can I figure out what's missing? Any help is appreciated. Ray Mrohs US DOJ -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
My impression is that its more efficient, and that you would build that efficiency into your 'golden image' so that it can be leveraged with the building of each new image. I agree that in normal conditions theres negligible difference, but when the host system is being stressed and you really NEED swapping, I think the shorter I/O paths could only work in your favor. Still, I'll have to see if I'm comfortable with the number of modifications needed to implement diag, since fba mode works right out of the box. Ray Mrohs -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of Marcy Cortes Sent: Wednesday, July 29, 2009 7:33 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: Dasd_diag_mod question Question, what is the value of using diag for swapping to vdisk? Even if it is a more efficient driver, you're swapping to memory. How much does it save? And how much swapping would you need to be doing for any savings to be worthwhile? Wouldn't it be simpler to just increase the VM size to an amount that minimizes swapping? Or are there servers you *want* swapping a lot for some reason and if so why? Inquiring minds... Marcy -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
On Thu, Jul 30, 2009 at 1:33 AM, Marcy Cortes wrote: > Question, what is the value of using diag for swapping to vdisk? > Even if it is a more efficient driver, you're swapping to memory. How much > does it save? Hey, what's happening. Wasn't I supposed to ask those questions? ;-) I'm afraid the desire to do this comes from lack of performance data and combining different recommendations (assuming that 1+1=2 in Linux on z/VM Performance). Some of the observations relate to older Linux levels, and each time we publish that a "VM thing" performs better than the "LPAR thing" the folks in IBM went to change code to reverse that, one way or the other. When you swap to VDISK, the difference today between FBA and DIAG is marginal at real life swap rates (even swap into DCSS is in the same range). When performance does not make difference, ease of configuration does. With a fragile setup you run a bigger risk of breaking it and losing more than the savings you tried to make. > And how much swapping would you need to be doing for any savings to be > worthwhile? Wouldn't it be simpler to just increase the VM size to an amount > that minimizes swapping? Or are there servers you *want* swapping a lot for > some reason and if so why? Sure, buying more storage to avoid swapping is make some people happy. As an IBM Support person replied to a customer: "If you are swapping or paging, you don't have enough memory. Then anything can happen and I can't help you with that. Buy more..." ;-) It depends on the variation in memory requirements and the utilization of the server. If you travel with the entire family only once a year, it makes little sense to drive alone to the office every day in that big truck - (oh, maybe that analogy is not so obvious over there ;-) Rob -- Rob van der Heij Velocity Software http://www.velocitysoftware.com/ -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
I find it very handy in dev/stage environments where by definition, there are *lots* of unknowns. Patrick Carroll | Enterprise Technical Architect L.L.Bean, Inc.(r) | Double L St. | Freeport ME 04033 http://www.llbean.com | pcarr...@llbean.com | 207.552.2426 CONFIDENTIALITY NOTICE: This e-mail and any attachments may contain confidential information that is legally privileged. The information is solely for the use of the intended recipient(s). Any disclosure, copying, distribution, or other use of this information is strictly prohibited. If you have received this e-mail in error, please notify the sender by return e-mail and delete this message. -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of Marcy Cortes Sent: Wednesday, July 29, 2009 7:33 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: Dasd_diag_mod question Question, what is the value of using diag for swapping to vdisk? Even if it is a more efficient driver, you're swapping to memory. How much does it save? And how much swapping would you need to be doing for any savings to be worthwhile? Wouldn't it be simpler to just increase the VM size to an amount that minimizes swapping? Or are there servers you *want* swapping a lot for some reason and if so why? Inquiring minds... Marcy "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of Mark Post Sent: Wednesday, July 29, 2009 12:23 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: [LINUX-390] Dasd_diag_mod question >>> On 7/29/2009 at 3:09 PM, "Mrohs, Ray" wrote: -snip- > Is this the expected behavior, or should mkinitrd/zipl have made it > all transparent? > I do see the DIAG DASDS during the mkinitrd process. No, I would have expected it to be transparent. Email me your new initrd off list and I'll take a look at it. I'm suspecting that for whatever reason, dasd_diag_mod isn't being included in it. If that's the case, adding it to /etc/sysconfig/kernels will fix it, but I'd like to see the initrd. Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
Question, what is the value of using diag for swapping to vdisk? Even if it is a more efficient driver, you're swapping to memory. How much does it save? And how much swapping would you need to be doing for any savings to be worthwhile? Wouldn't it be simpler to just increase the VM size to an amount that minimizes swapping? Or are there servers you *want* swapping a lot for some reason and if so why? Inquiring minds... Marcy "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of Mark Post Sent: Wednesday, July 29, 2009 12:23 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: [LINUX-390] Dasd_diag_mod question >>> On 7/29/2009 at 3:09 PM, "Mrohs, Ray" wrote: -snip- > Is this the expected behavior, or should mkinitrd/zipl have made it all > transparent? > I do see the DIAG DASDS during the mkinitrd process. No, I would have expected it to be transparent. Email me your new initrd off list and I'll take a look at it. I'm suspecting that for whatever reason, dasd_diag_mod isn't being included in it. If that's the case, adding it to /etc/sysconfig/kernels will fix it, but I'd like to see the initrd. Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
>>> On 7/29/2009 at 3:09 PM, "Mrohs, Ray" wrote: -snip- > Is this the expected behavior, or should mkinitrd/zipl have made it all > transparent? > I do see the DIAG DASDS during the mkinitrd process. No, I would have expected it to be transparent. Email me your new initrd off list and I'll take a look at it. I'm suspecting that for whatever reason, dasd_diag_mod isn't being included in it. If that's the case, adding it to /etc/sysconfig/kernels will fix it, but I'd like to see the initrd. Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
Mark, I just tried that and the disks showed up as DIAG. But when I reboot, they are not there: lnxm500:/tmp # swapon -a swapon: cannot stat /dev/dasdf1: No such file or directory swapon: cannot stat /dev/dasdg1: No such file or directory swapon: cannot stat /dev/dasdh1: No such file or directory When I re-run the script with your commands, they show up again: 0.0.0105(DIAG) at ( 94: 20) is dasdf : active at blocksize 512, 25 blocks, 122 MB 0.0.0106(DIAG) at ( 94: 24) is dasdg : active at blocksize 512, 50 blocks, 244 MB 0.0.0107(DIAG) at ( 94: 28) is dasdh : active at blocksize 512, 75 blocks, 366 MB lnxm500:/tmp # swapon -a lnxm500:/tmp # swapon -s FilenameTypeSizeUsed Priority /dev/dasdg1 partition 247912 0 -1 /dev/dasdf1 partition 123948 0 -2 /dev/dasdh1 partition 371872 0 -3 Is this the expected behavior, or should mkinitrd/zipl have made it all transparent? I do see the DIAG DASDS during the mkinitrd process. Ray -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of Mark Post Sent: Wednesday, July 29, 2009 12:34 PM To: LINUX-390@VM.MARIST.EDU Subject: Re: Dasd_diag_mod question >>> On 7/29/2009 at 10:04 AM, "Mrohs, Ray" wrote: > Hi All, > > We are running SLES10 SP2, and I am trying to switch our vdisk swap from > fba to diag. So far I: -snip- Ray, Try this: swapoff /dev/dasdh1 dasd_configure 0.0.0107 0 dasd_configure 0.0.0107 1 1 swapon /dev/dasdh1 swapoff /dev/dasdg1 dasd_configure 0.0.0106 0 dasd_configure 0.0.0106 1 1 swapon /dev/dasdg1 swapoff /dev/dasdf1 dasd_configure 0.0.0105 0 dasd_configure 0.0.0105 1 1 swapon /dev/dasdf1 mkinitrd zipl Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
>>> On 7/29/2009 at 10:04 AM, "Mrohs, Ray" wrote: > Hi All, > > We are running SLES10 SP2, and I am trying to switch our vdisk swap from > fba to diag. So far I: -snip- Ray, Try this: swapoff /dev/dasdh1 dasd_configure 0.0.0107 0 dasd_configure 0.0.0107 1 1 swapon /dev/dasdh1 swapoff /dev/dasdg1 dasd_configure 0.0.0106 0 dasd_configure 0.0.0106 1 1 swapon /dev/dasdg1 swapoff /dev/dasdf1 dasd_configure 0.0.0105 0 dasd_configure 0.0.0105 1 1 swapon /dev/dasdf1 mkinitrd zipl Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
>>> On 7/29/2009 at 11:15 AM, Ron Foster at Baldor-IS >>> wrote: > Ray, > > When you include dasd_diag_mod in the kernel configuration, did you put > the dasd drivers in the correct order? > Ours is: > INITRD_MODULES="reiserfs dm_mod dasd_diag_mod dasd_eckd_mod dasd_fba_mod" > If dasd_fba_mod is first, then the vdisk will always be detected at > bootup as fba. Ron, No, that's not necessary. In fact, the dasd_fba_mod module must be loaded for dasd_diag_mod to work at all. Mark Post -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
Ron, I only included this: INITRD_MODULES="jbd ext3 dasd_diag_mod" The other two appear by default through some other config. Dasd_diag_mod loads first according to the console log, but dasd_fba_mod loads just before it creates the swap disks. Maybe I'll try specifying all the drivers. I'm trying to minimize the number and extent of config changes, since I want the Linux images to stay as 'plain vanilla' as possible to reduce future headaches for myself or whoever ends up working on them. Log extract: Creating devices 09:20:24 Loading dasd_mod Loading dasd_diag_mod Loading dasd_eckd_mod dasd(eckd): 0.0.0103: 3390/0C(CU:3990/01) Cyl:10016 Head:15 Sec:224 dasd(eckd): 0.0.0103: (4kB blks): 7211520kB at 48kB/trk compatible disk layout dasdd:VOL1/ 0X0109: 09:20:24 dasdd1 dasdd2 dasd(eckd): 0.0.0100: 3390/0C(CU:3990/01) Cyl:6677 Head:15 Sec:224 dasd(eckd): 0.0.0100: (4kB blks): 4807440kB at 48kB/trk compatible disk layout dasda:VOL1/ 0X0108: dasda1 09:20:24 dasd(eckd): 0.0.0101: 3390/0C(CU:3990/01) Cyl:3338 Head:15 Sec:224 dasd(eckd): 0.0.0101: (4kB blks): 2403360kB at 48kB/trk compatible disk layout dasdb:VOL1/ 0X0101: dasdb1 dasd(eckd): 0.0.0104: 3390/0C(CU:3990/01) Cyl:20 Head:15 Sec:224 dasd(eckd): 0.0.0104: (4kB blks): 14400kB at 48kB/trk compatible disk layout dasde:VOL1/ 0X0104: dasde1 09:20:24 dasd(eckd): 0.0.0102: 3390/0C(CU:3990/01) Cyl:1669 Head:15 Sec:224 dasd(eckd): 0.0.0102: (4kB blks): 1201680kB at 48kB/trk compatible disk layout dasdc:VOL1/ 0X0102: dasdc1 Loading dasd_fba_mod 09:20:24 dasd(fba): 0.0.0105: 9336/10(CU:6310/80) 122MB at(512 B/blk) dasdf:CMS1/ LXSWAP(MDSK): dasdf1 dasd(fba): 0.0.0106: 9336/10(CU:6310/80) 244MB at(512 B/blk) dasdg:CMS1/ LXSWAP(MDSK): dasdg1 dasd(fba): 0.0.0107: 9336/10(CU:6310/80) 366MB at(512 B/blk) dasdh:CMS1/ LXSWAP(MDSK): dasdh1 I'll also try to reactivate the vdisk with the diag option, once I track down the commands for that. Ray -Original Message- From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of Ron Foster at Baldor-IS Sent: Wednesday, July 29, 2009 11:15 AM To: LINUX-390@VM.MARIST.EDU Subject: Re: Dasd_diag_mod question Ray, When you include dasd_diag_mod in the kernel configuration, did you put the dasd drivers in the correct order? Ours is: INITRD_MODULES="reiserfs dm_mod dasd_diag_mod dasd_eckd_mod dasd_fba_mod" If dasd_fba_mod is first, then the vdisk will always be detected at bootup as fba. Once upon a time, it was also necessary to include the diag information in zipl.conf. dasd=0100,0102-0105,106-107(diag) This was set up some time ago. Since we have gone to SLES10 SP2, I have not tried booting one of our vdisk systems without the diag parameter. Ron -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
A postscript to my earlier reply: Instead of trying to deactivate your FBA vdisk swap and reactivate them to use DIAG before running mkinitrd, you could modify the /boot/initrd file to change the /sbin/dasd_configure's to activate your vdisks to use DIAG Change from /sbin/dasd_configure 1 0 to /sbin/dasd_configure 1 1 mkdir temp cd temp gzip -d -S "" < /boot/initrd-2.6.16.60-0.29-default | cpio -i ## edit file /init to change the /sbin/dasd_configure statements. ## archive and recompress: find . |cpio -o -H newc |gzip -9c > /boot/initrd-2.6.16.60-0.29-default #remove the temp directory # zipl #But first have a fallback plan. > -Original Message- > From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of > Mrohs, Ray > Sent: Wednesday, July 29, 2009 10:05 AM > To: LINUX-390@VM.MARIST.EDU > Subject: Dasd_diag_mod question > > Hi All, > > We are running SLES10 SP2, and I am trying to switch our vdisk swap > from > fba to diag. So far I: > > 1) run SWAPGEN EXEC with the reuse option (vdisks are defined in the CP > directory) > 2) included dasd_diag_mod in the kernel configuration and ran mkinitrd > (verified with lsmod) > 3) set the yast DASD option to use diag for the vdisk devices (verified > in /etc/sysconfig/hardware/*) > 4) included the devices in fstab as swap > 5) reboot > > /etc/fstab: > /dev/dasdf1 none swap sw > 0 0 > /dev/dasdg1 none swap sw > 0 0 > /dev/dasdh1 none swap sw > 0 0 > > Swapon -s: > FilenameTypeSizeUsed > Priority > /dev/dasdf1 partition 123948 0 > -1 > /dev/dasdg1 partition 247912 0 > -2 > /dev/dasdh1 partition 371872 0 > -3 > > But the disks still show up like this: > 0.0.0105(FBA ) at ( 94: 20) is dasdf : active at blocksize 512, > 25 blocks, 122 MB > 0.0.0106(FBA ) at ( 94: 24) is dasdg : active at blocksize 512, > 50 blocks, 244 MB > 0.0.0107(FBA ) at ( 94: 28) is dasdh : active at blocksize 512, > 75 blocks, 366 MB > > How can I figure out what's missing? > Any help is appreciated. > > Ray Mrohs > US DOJ > > -- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to lists...@vm.marist.edu with the message: INFO LINUX-390 > or visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
Ray, When you include dasd_diag_mod in the kernel configuration, did you put the dasd drivers in the correct order? Ours is: INITRD_MODULES="reiserfs dm_mod dasd_diag_mod dasd_eckd_mod dasd_fba_mod" If dasd_fba_mod is first, then the vdisk will always be detected at bootup as fba. Once upon a time, it was also necessary to include the diag information in zipl.conf. dasd=0100,0102-0105,106-107(diag) This was set up some time ago. Since we have gone to SLES10 SP2, I have not tried booting one of our vdisk systems without the diag parameter. Ron Mrohs, Ray wrote: Hi All, We are running SLES10 SP2, and I am trying to switch our vdisk swap from fba to diag. So far I: 1) run SWAPGEN EXEC with the reuse option (vdisks are defined in the CP directory) 2) included dasd_diag_mod in the kernel configuration and ran mkinitrd (verified with lsmod) 3) set the yast DASD option to use diag for the vdisk devices (verified in /etc/sysconfig/hardware/*) 4) included the devices in fstab as swap 5) reboot /etc/fstab: /dev/dasdf1 none swap sw 0 0 /dev/dasdg1 none swap sw 0 0 /dev/dasdh1 none swap sw 0 0 Swapon -s: FilenameTypeSizeUsed Priority /dev/dasdf1 partition 123948 0 -1 /dev/dasdg1 partition 247912 0 -2 /dev/dasdh1 partition 371872 0 -3 But the disks still show up like this: 0.0.0105(FBA ) at ( 94: 20) is dasdf : active at blocksize 512, 25 blocks, 122 MB 0.0.0106(FBA ) at ( 94: 24) is dasdg : active at blocksize 512, 50 blocks, 244 MB 0.0.0107(FBA ) at ( 94: 28) is dasdh : active at blocksize 512, 75 blocks, 366 MB How can I figure out what's missing? Any help is appreciated. Ray Mrohs US DOJ -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Re: Dasd_diag_mod question
When you run mkinitrd, for each dasd it finds online it generates an initrd containing a /sbin/dasd_configure command to activate the dasd with the same discipline (ECKD, FBA, DIAG) its currently using (FBA in the case of your vdisk swap). If you could each vdisk swap device to use DIAG before you run mkinitrd, zipl, it'd work (I think). > -Original Message- > From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of > Mrohs, Ray > Sent: Wednesday, July 29, 2009 10:05 AM > To: LINUX-390@VM.MARIST.EDU > Subject: Dasd_diag_mod question > > Hi All, > > We are running SLES10 SP2, and I am trying to switch our vdisk swap > from > fba to diag. So far I: > > 1) run SWAPGEN EXEC with the reuse option (vdisks are defined in the CP > directory) > 2) included dasd_diag_mod in the kernel configuration and ran mkinitrd > (verified with lsmod) > 3) set the yast DASD option to use diag for the vdisk devices (verified > in /etc/sysconfig/hardware/*) > 4) included the devices in fstab as swap > 5) reboot > > /etc/fstab: > /dev/dasdf1 none swap sw > 0 0 > /dev/dasdg1 none swap sw > 0 0 > /dev/dasdh1 none swap sw > 0 0 > > Swapon -s: > FilenameTypeSizeUsed > Priority > /dev/dasdf1 partition 123948 0 > -1 > /dev/dasdg1 partition 247912 0 > -2 > /dev/dasdh1 partition 371872 0 > -3 > > But the disks still show up like this: > 0.0.0105(FBA ) at ( 94: 20) is dasdf : active at blocksize 512, > 25 blocks, 122 MB > 0.0.0106(FBA ) at ( 94: 24) is dasdg : active at blocksize 512, > 50 blocks, 244 MB > 0.0.0107(FBA ) at ( 94: 28) is dasdh : active at blocksize 512, > 75 blocks, 366 MB > > How can I figure out what's missing? > Any help is appreciated. > > Ray Mrohs > US DOJ > > -- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to lists...@vm.marist.edu with the message: INFO LINUX-390 > or visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system. -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
Dasd_diag_mod question
Hi All, We are running SLES10 SP2, and I am trying to switch our vdisk swap from fba to diag. So far I: 1) run SWAPGEN EXEC with the reuse option (vdisks are defined in the CP directory) 2) included dasd_diag_mod in the kernel configuration and ran mkinitrd (verified with lsmod) 3) set the yast DASD option to use diag for the vdisk devices (verified in /etc/sysconfig/hardware/*) 4) included the devices in fstab as swap 5) reboot /etc/fstab: /dev/dasdf1 none swap sw 0 0 /dev/dasdg1 none swap sw 0 0 /dev/dasdh1 none swap sw 0 0 Swapon -s: FilenameTypeSizeUsed Priority /dev/dasdf1 partition 123948 0 -1 /dev/dasdg1 partition 247912 0 -2 /dev/dasdh1 partition 371872 0 -3 But the disks still show up like this: 0.0.0105(FBA ) at ( 94: 20) is dasdf : active at blocksize 512, 25 blocks, 122 MB 0.0.0106(FBA ) at ( 94: 24) is dasdg : active at blocksize 512, 50 blocks, 244 MB 0.0.0107(FBA ) at ( 94: 28) is dasdh : active at blocksize 512, 75 blocks, 366 MB How can I figure out what's missing? Any help is appreciated. Ray Mrohs US DOJ -- For LINUX-390 subscribe / signoff / archive access instructions, send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390