Debugging the Resource Type Implementation
The DSDL has built-in features to help you debug your data service.
The DSDL utility scds_syslog_debug() provides a basic framework for adding debugging statements to the resource type implementation. The debugging level (a number between 1-9) can be dynamically set per resource type implementation per cluster node. A file named /var/cluster/rgm/rt/rtname/loglevel, which contains only an integer between 1 and 9, is read by all resource type callback methods. The DSDL routine scds_initialize() reads this file and sets the debug level internally to the specified level. The default debug level 0, specifies that the data service log no debugging messages.
The scds_syslog_debug() function uses the facility returned by the scha_cluster_getlogfacility() function at a priority of LOG_DEBUG. You can configure these debug messages in /etc/syslog.conf.
You can turn some debugging messages into informational messages for regular operation of the resource type (perhaps at LOG_INFO priority) using the scds_syslog utility. If you look at the sample DSDL application in Chapter 8, Sample DSDL Resource Type Implementation you will notice that it makes liberal use of scds_syslog_debug and scds_syslog functions.
Enabling Highly Available Local File Systems
You can use the HAStoragePlus resource type to make a local file system highly available within a Sun Cluster environment. The local file system partitions must be located on global disk groups. Affinity switchovers must be enabled and the Sun Cluster environment must be configured for failover. This set up enables the user to make any file system on multi-host disks accessible from any host directly connected to those multi-host disks. Using a highly available local file system is strongly recommended for some I/O intensive data services. "Enabling Highly Available Local File Systems" in Sun Cluster 3.1 Data Service Planning and Administration Guide contains information about configuring the HAStoragePlus resource type.



