-----Ursprüngliche Nachricht----- >On Thu, Sep 16, 2010 at 10:07:49AM +0200, Holger Teutsch wrote: >> Hi, >> find attached a patch for the db2 resource agent >> - holger >> >> High: Replace call to db2_local_ps with db2nps (Thanx to Evgeny Nifontov) >> >> db2nodes.cfg typically contains a cluster service address and >> db2_local_ps never works >> in this case. > >Is there any documentation or source to support this? Looking at >the source, db2_local_ps should recover the right node number >from db2nodes.cfg in case that file exists, then invoke db2nps >with that node number. If it doesn't work, then it is a bug in >db2_local_ps. > >Cheers, > >Dejan
Dejan, the background is: db2nodes.cfg maps "partition numbers" to "node names" Normally this is the physical hostname. Most db2 utilities (e.g. db2start etc) map the node number to the "node name". If "node name" == "uname -n" call locally, else invoke the command on the remote host via rsh or something you set via db2set DB2RSHCMD=xxx . On a cluster the file ~/sqllib/db2nodes.cfg is on a shared FS. If this file contains a physical hostname this will definitely be wrong after a resource migration. Therefore per best practice (IBM Redbooks etc.) you put the DNS name of the cluster service into db2nodes.cfg. You then have to take care that the instance owner has rsh access to itself via the service address. Else you can map DB2RSHCMD to a script like --- #!/bin/sh # # Emulate inter partition call for ACC by simply do it locally # Install with # # db2set DB2RSHCMD=$INSTHOME/db2_acc_rsh # # HT Dec 2007 # Is called rsh like as # c36db.hg.fresenius.de -n -l db2c36 ARGS # remove 4 first args shift shift shift shift eval "$@" ---- Other methods for working with db2nodes.cfg are - make links to node local files (problems with permissions) - edit db2nodes.cfg with the resource agent prior to an (something a IBM povide lib does/tries) You see we are veterans with 100+ db2 databases. 8-) or 8-( I agree that the logic of db2_local_ps is to simple to deal with this setup. On the other hand I'm not confident that IBM will implement a comprehensive way to detect "locality" for a general multi partition setup. This would require checking IP interfaces etc... I checked that db2nps works on DB2 8.2, 9.5 and 9.7. Any concerns let me know. Regards Holger ___________________________________________________________ Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief! Jetzt De-Mail-Adresse reservieren: https://produkte.web.de/go/demail02 _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/