The Oracle Disk Manager (ODM) SMF service fails to start in a Solaris 10 local zone

book

Article ID: 100003372

calendar_today

Updated On:

Description

Error Message

The vxodm service may fail to start in Solaris local zones due to the vxfsldlic service (on which vxodm is dependent) definition missing from the local zone. For example:

svc:/system/vxodm:default (VERITAS Oracle Disk Manager)
 State: offline since Wed Oct 06 11:00:10 2010
Reason: Dependency svc:/system/vxfs/vxfsldlic is absent.   <=== NOTE
   See: http://sun.com/msg/SMF-8000-E2
   See: mount_odm(1)
Impact: This service is not running.

Likewise, the vxodm service may fail to start due to the /dev/odm mount point (on which the ODM device is mounted) missing from the Solaris local zone:

# svcs -l svc:/system/vxodm:default
fmri         svc:/system/vxodm:default
name         VERITAS Oracle Disk Manager
enabled      true
state        maintenance   <=== NOTE
next_state   none
state_time   Thu Oct 07 07:30:37 2010
logfile      /var/svc/log/system-vxodm:default.log
restarter    svc:/system/svc/restarter:default
dependency   require_all/none svc:/system/vxfs/vxfsldlic (online)
dependency   optional_all/none svc:/system/gab (absent)
dependency   require_all/none svc:/system/filesystem/root (online)

On examining /var/svc/log/system-vxodm:default.log we then see repeated entries as follows:

[ Oct  7 07:30:36 Executing start method ("/lib/svc/method/odm start") ]
Starting ODM...
mount: Mount point /dev/odm does not exist.
[ Oct  7 07:30:36 Method "start" exited with status 1 ]
[ Oct  7 07:30:36 Executing start method ("/lib/svc/method/odm start") ]
Starting ODM...
mount: Mount point /dev/odm does not exist.

Cause

During installation of Solaris local zones, necessary packages and SMF services are copied from the global zone to the new local zone. Due to the packaging of the VRTSvxfs package (which owns the vxfsldlic SMF service) this is only intended to be installed in the global zone. As a result, the vxfsldlic service is not propogated to Solaris local zones. This prevents services which depend on vxfsldlic (such as vxodm) from starting in Solaris local zones.

Likewise, during installation, a default /dev directory is created for the Solaris local zone. This does not contain the odm directory used to mount the ODM device. As a result, the vxodm service cannot mount the ODM device during zone boot. Note that in the global zone, should /dev/odm not exist, this is explicitly created by the vxodm service. In local zones, however, access to /dev is strictly read only, hence this is no longer possible.

Resolution

To ensure that ODM/vxodm operates as expected in a Solaris local zone, the following steps should be followed. Note that in this example we use a Solaris local zone with name testzone and zonepath of /testzone. When these steps are applied to another machine, the zone name and zonepath need to be modified accordingly.

Make Veritas licenses installed in the global zone visible to the local zone:

This is performed by providing the contents of /etc/vx/licenses/lic to the local zone via a loopback mount. To do this the zone configuration must be modified via zonecfg to include the following definition:

# zonecfg -z testzone
zonecfg:testzone> add fs
zonecfg:testzone:fs> set dir=/etc/vx/licenses/lic
zonecfg:testzone:fs> set special=/etc/vx/licenses/lic
zonecfg:testzone:fs> set type=lofs
zonecfg:testzone:fs> end
zonecfg:testzone> commit

Note that the above can be performed before or after installation of the local zone. However, if performed after and the local zone is running, the zone must be rebooted for the change to take effect.

Create the /dev/odm mount point within the local zone:

The local zone should have a directory called 'odm' created in its /dev filesystem such that the ODM device is able to be mounted within the local zone. To do this the following command should be run from the global zone:

# mkdir -p /testzone/dev/odm

Note that once created this directory will persist zone reboots and detach/attach operations as long as the -F flag is used during attach. Note that if a full attach is performed (i.e. 'zoneadm -z zonename attach' without -F) the local zones /dev directory is purged and recreated. As a result, the /dev/odm mount point will no longer exist in the local zone and must be recreated with the above command. Note that if Veritas Cluster Server (VCS) only ever performs force attaches of zone hence the directory will persist fail over of the zone between nodes.

Enable the vxfsldlic SMF service within the local zone:

Initially, the vxfsldlic service definition should be copied from the global zone to the local zone by running the following commands in the global zone:

# mkdir /testzone/root/var/svc/manifest/system/vxfs
# cp /var/svc/manifest/system/vxfs/vxfsldlic.xml /testzone/root/var/svc/manifest/system/vxfs

If /lib is not being inherited from the global zone in the local zone (for example, if using a whole root zone), then the following command also needs to be run in the global zone:

# cp /lib/svc/method/vxfsldlic /testzone/root/lib/svc/method

Once complete the vxldlic service definition should be imported within the local zone by logging into the local zone and running the following commands:

# zlogin -z testzone (to log into the local zone from the global zone)

...

$ svccfg import /var/svc/manifest/system/vxfs/vxfsldlic.xml

Once complete, the vxfsldlic and vxodm service should be able to be manually enabled and start automatically each subsequent time the local zone is booted. The services can be manually started by running the following commands within the local zone:

$ svcadm enable vxfsldlic
$ svcadm enable vxodm

Once complete, vxodm should be started as expected:

$ svcs | grep vxodm
online          7:24:13 svc:/system/vxodm:default

Note that to determine whether /lib is being inherited by a given Solaris local zone, the zonecfg command can be used in the global zone:

# zonecfg -z testzone info
zonename: testzone
zonepath: /testzone
...

inherit-pkg-dir:
    dir: /lib
...

 

Applies To

Solaris 10 SPARC or x86 running Storage Foundation and using Solaris local zones

Issue/Introduction

Unable to start vxodm (Veritas Oracle Disk Manager) via the Solaris Management Facility (SMF) within Solaris local zones