What is ODM and odmstat? Why can't odmstat be executed in Solaris non-global (local) zones?
book
Article ID: 100021065
calendar_today
Updated On:
Resolution
What is ODM?
Oracle has developed a disk and file management API called odmlib, which is marketed under the feature Oracle Disk Manager (ODM). ODM is fundamentally a file management and I/O interface that allows DBA's to manage larger and more complex databases, while maintaining the total cost of ownership.
ODM enables one to achieve raw device performance using file system interfaces; stream lines Oracle I/O call routines, leading to lower overall system overhead; and consolidates system redundant resources, which minimizes memory footprints.
Oracle Disk Manager (ODM)is packaged as part of Oracle since Oracle9i; however, it needs a third party vendor's ODM driver to fully implement Oracle's interface. For example, Veritas's VRTSodm package provides such an ODM driver. Once the ODM driver is installed, you will see a /dev/odm device mounted. After the driver installation, Oracle will require a corresponding vendor's shared library to be put in place:
==> To enable ODM (Details in Storage Foundation for Oracle Administrator Guide)
Example for Oracle 9i on Solaris 10
1.Shutdown the database
2. mv $ORACLE_HOME/lib/libodm9.so$ORACLE_HOME/lib/libodm9.so.org
3. ln -s /opt/VRTSodm/lib/sparcv9/libodm.so$ORACLE_HOME/lib/libodm9
for 32bit systems ln -s /usr/lib/libodm.so$ORACLE_HOME/lib/libodm9.so
4. Startup the database
==> To disable ODM (Details in Storage Foundation for Oracle Administrator Guide)
Example for Oracle 9i on Solaris 10
1. Shutdown the database
2. rm $ORACLE_HOME/lib/libodm9.so (this just removes the link)
3. mv $ORACLE_HOME/lib/libodm9.so.org $ORACLE_HOME/lib/libodm9.so
4. Startup the database
Once the database instance is enabled using Veritas ODM, the following message is displayed in the Oracle alert log at instance startup:
Oracle instance running with ODM: Veritas 5.0.00.00 ODM Library, Version 1.1
What is odmstat?
The odmstat command is theVeritas ODM statistics utility providing details on I/O throughput and efficiency to files accessed via the ODM API as shown below:
#/opt/VRTS/bin/odmstat -i 5 -c 5 data*.dbf
OPERATIONS FILE BLOCKS AVGTIME(ms)
FILE NAME READ WRITE READ WRITE READ WRITE
Thu 21 May 200903:30:41 PM GMT
data01.dbf 1 1 16 16 0.0 10.0
data02.dbf 1 1 16 16 0.0 10.0
data03.dbf 21 35 336 560 3.3 12.6
Why can't odmstat be executed in Solaris non-global (local)zones?
The use of the ODM API is fully supported in Solaris 10 localzones; however, as packaged, the odmstat utility can only be used in the global zone for the reason described below.
Firstly let's look at the odmstat binary in the global zone:
# ls -l /opt/VRTS/bin/odmstat
lrwxrwxrwx 1 root root 7 Jan 15 11:07 /opt/VRTS/bin/odmstat-> qiostat
# ls -l /opt/VRTS/bin/qiostat
lrwxrwxrwx 1root root 34 Jan 12 19:57/opt/VRTS/bin/qiostat -> ../../../opt/VRTSvxfs/sbin/qiostat
# ls -l /opt/VRTSvxfs/sbin/qiostat
-rwxr-xr-x 1bin bin 125924 Jun 1 2006/opt/VRTSvxfs/sbin/qiostat
# pkgchk -lp/opt/VRTS/bin/odmstat
Pathname: /opt/VRTS/bin/odmstat
Type: symboliclink
Source of link: qiostat
Referenced by the followingpackages:
VRTSodm
Current status:installed
# pkgchk -lp /opt/VRTSvxfs/sbin/qiostat
Pathname:/opt/VRTSvxfs/sbin/qiostat
Type: regular file
Expected mode:0755
Expected owner: bin
Expected group: bin
Expected file size(bytes): 125924
Expected sum(1) of contents: 57197
Expected lastmodification: Jun 01 09:32:44 PM 2006
Referenced by the followingpackages:
VRTSvxfs
Current status:installed
So /opt/VRTS/bin/odmstat is a part of the VRTSodm package and is actually a symbolic link to the file /opt/VRTS/bin/qiostat, which in turn is a link to the actual binary file /opt/VRTSvxfs/sbin/qiostat which belongs to the VRTSvxfs package.
Let's compare the above with any non-global (local)zones:
bash-3.00# zoneadm list -v
IDNAME STATUS PATH
0global running /
1testzone running /testzone
bash-3.00# zlogin testzone
[Connected to zone 'testzone' pts/13]
Last login: Tue May 1923:41:40 on pts/9
Sun Microsystems Inc. SunOS5.10 Generic January 2005
# ls -l/opt/VRTS/bin/odmstat
lrwxrwxrwx 1 root root 7 May 18 03:06 /opt/VRTS/bin/odmstat-> qiostat
# ls -l /opt/VRTS/bin/qiostat
/opt/VRTS/bin/qiostat: Nosuch file or directory
# ls -l/opt/VRTSvxfs/sbin/qiostat
/opt/VRTSvxfs/sbin/qiostat: No such file ordirectory
# pkgchk -lp /opt/VRTS/bin/odmstat
Pathname:/opt/VRTS/bin/odmstat
Type: symbolic link
Source of link:qiostat
Referenced by the followingpackages:
VRTSodm
Current status:installed
# pkginfo -l VRTSodm
PKGINST: VRTSodm
NAME: VERITASODM
CATEGORY: system,utilities
ARCH: sparc
VERSION: 5.0.00.00,REV=A55
BASEDIR: /
VENDOR: VERITASSoftware
DESC: CommercialODM
PSTAMP: VERITAS-ODM-5.0.3.0-2008-08-12-MP3=121710-05
INSTDATE: May18 2009 11:23
HOTLINE: (800) 342-0652
EMAIL: support@veritas.com
STATUS: completelyinstalled
FILES: 94 installedpathnames
19sharedpathnames
47directories
8executables
1986blocks used (approx)
# pkginfo -l VRTSvxfs
PKGINST: VRTSvxfs
NAME: Veritas FileSystem
CATEGORY: system,utilities
ARCH: sparc
VERSION: 5.0,REV=5.0A55_sol
BASEDIR: /
VENDOR: VeritasCorporation
DESC: Commercial FileSystem
PSTAMP: VERITAS-5.0FS-2006-06-01
INSTDATE: May18 2009 11:23
HOTLINE: (800) 342-0652
EMAIL: support@veritas.com
STATUS: completelyinstalled
# pkgchk VRTSvxfs
Warning: Package isinstalled but empty
Note that /opt/VRTS/bin/odmstat is part of the VRTSodm package which is fully installed in the local zone. However the/opt/VRTS/bin/odmstat is a symbolic link to /opt/VRTS/bin/qiostat which is part of the VRTSvxfs package. VRTSvxfs is installed as a hollow package in a local zone, therefore 'qiostat' is not installed in the local zone, meaning that 'odmstat' will not work in the local zone by default.
The following abstract describes exactly what a 'hollow package' is:
-------------------------------------------------------------------------
SUNW_PKG_HOLLOW=true means that the contents of the patch is applied to the global zone only, so therefore a patch that contains a package with this set can only be applied from the global zone. The actual patch information is propagated to all non-globalzones so that even though the patch contents are not installed in non-globalzones, the patch itself is visible to patchadd -p or showrev -p in allnon-global zones (as well as the global zone). This is mainly for patch packages that patch files that only affect the global zone, i.e. files/binaries that are used to physically boot the system, or actual kernel related files/binaries. They are not used in non-global zones, but in order to satisfy patch dependencies the patch will show as being installed in the non-global zone as well. By default SUNW_PKG_ALLZONES must be true if SUNW_PKG_HOLLOW is also true. So a SUNW_PKG_HOLLOW patch can only be applied from the global to the global and all non-global zones as well. A patchadd in the non-global zone will fail.
-------------------------------------------------------------------------
If there is a requirement to use odmstat in a Solaris 10 local zone, it is possible to do so by following one of two procedures:
1) Copy the 'qiostat' binary from the global zone to the non-global (local) zone
The"/opt/VRTS/bin/qiostat" is a binary file which runs fine in a local zone. The local zone does not necessarily have to be running to copy the 'qiostat' binary file.
2) Inherit the /opt directory while configuring the localzone
zonecfg:testzone> addinherit-pkg-dir
zonecfg:testzone:inherit-pkg-dir> set dir=/opt
zonecfg:testzone:inherit-pkg-dir> end
The preceding commands will cause the local zone to inherit a read only copy of all files from /opt in the global zone, meaning the qiostat command will now be available in the local zone after zone installation.
Issue/Introduction
What is ODM and odmstat? Why can't odmstat be executed in Solaris non-global (local) zones?
Was this article helpful?
thumb_up
Yes
thumb_down
No