A system running the Solaris 10 operating system fails to reboot with a message on the console showing the device /dev/vx/config is already open and then the system returns to the Open Boot Prom.

book

Article ID: 100018077

calendar_today

Updated On:

Description

Error Message

vxvm:vxconfigd: V-5-1-7840 cannot open /dev/vx/config: Device is already open
syncing file systems... done
Program terminated
ok boot

Resolution

The actual startup messages on the console may appeardifferently from system to system, however, the Volume Manager message"vxvm:vxconfigd: V-5-1-7840 cannot open /dev/vx/config: Device is already open"will always appear for this condition that exists.

Below is an excerptfrom console messages from a system booting that shows the error listedtwice:
 
SunOS Release 5.10 VersionGeneric 64-bit
Copyright 1983-2005 SunMicrosystems, Inc.  All rights reserved.
Use is subject to licenseterms.
Hostname:pixie.veritas.com
NOTICE: VxVM vxdmp V-5-0-34added disk array DISKS, datype = Disk
 
NIS+ domain name isveritas.com
Sep 29 22:39:51 vxvm:vxconfigd:V-5-1-569 Disk group testdg, Disk c4t69d0s2:
Cannot auto-importgroup:
Sep 29 22:39:51vxvm:vxconfigd:         Diskgroup version not supported inrelease
Sep 29 15:40:22 vxvm:vxconfigd:V-5-1-7840 cannot open /dev/vx/config: Device
is already open<<<== NOTE_1
Sep 29 22:40:36 vxvm:vxconfigd:V-5-1-569 Disk group testdg, Disk c4t69d0s2:
Cannot auto-importgroup:
Sep 29 22:40:36vxvm:vxconfigd:         Diskgroup version not supportedin
release <<<===NOTE_2
 
From the above message, NOTE_1 shows that the VolumeManager configuration daemon vxconfigd is being started secondtime while a version is already running on the machine. From NOTE_2, thismessage confirms that the command "# vxdctl enable" is beingexecuted a second time on the machine. This condition has been seen afterupgrading from an earlier version and a fresh installation and encapsulating theboot disk, and after a boot disk has already been encapsulated and a patch(Point Patch or Rolling Patch) was applied to the system that does not requirethe boot disk to be unencapsulated.

To confirm the Volume Managerconfiguration daemon and the command "# vxdctl enable" is beingexecuted a second time, look at the services that have been started by theStorage Management Facility, SMF, in Solaris 10:
 
# svcs | grepvxvm
legacy_run    15:40:22 lrc:/etc/rcS.d/S25vxvm-sysboot
legacy_run    15:40:23 lrc:/etc/rcS.d/S35vxvm-startup1
legacy_run    15:40:44 lrc:/etc/rcS.d/S85vxvm-startup2
legacy_run    15:40:45 lrc:/etc/rcS.d/S86vxvm-reconfig
legacy_run    15:41:09 lrc:/etc/rc2.d/S95vxvm-recover
online        15:39:19 svc:/system/vxvm/vxvm-sysboot:default
online        15:39:21 svc:/system/vxvm/vxvm-startup1:default
online        15:40:01 svc:/system/vxvm/vxvm-startup2:default
online        15:40:02 svc:/system/vxvm/vxvm-reconfig:default
online        15:41:12 svc:/system/vxvm/vxvm-recover:default

In the above output, notice that there arelegacy_run services that begin with "lrc". These are the legacystartup scripts in the /etc/rcS.d directory. The online servicesthat begin with "svc", are the services designed for Volume Manager to bestarted by SMF. This confirms that the startup scripts are being executed twotimes which is causing the error messages during the boot process of theoperating system. To execute the "# svcs" command on the system, the rootdisk needs to be unencapsulated and the system needs to be in at least thesingle-user milestone.

Note: Verifying the legacy services arestarting twice can be time consuming and encompasses multiple system reboots. Atime saving method can be used to determine if the legacy startup scripts existin the /etc/rcS.d directory. Both procedures will achieve the sameresult. Method 1 is less time consuming and does not verify the execution oflegacy and regular startup scripts. Method 2 verifies the execution of thelegacy and regular startup scripts.

Method 1
To resolve thisissue, verify the legacy startup scripts exist in the /etc/rcS.ddirectory and remove them:
 
  • Bootthe server to cdrom or the network in single-user mode / milestone from the OpenBoot Prom, OBP:
bootcdrom -s
or
boot net -s
  • Fsckyour root file system. If fsck comes back cleanly, mount slice 0 to /a. If fsckcannot repair the root file system, there are a number of possibilities for thecause. This procedure does not attempt to explain file system corruption or howto repair it. fsck must come back cleanly to continue and mountroot:
# fsck -y/dev/rdsk/c#t#d#s0
# mount /dev/dsk/c#t#d#s0/a
Change directories to the/etc/rcS.d directory on the root disk that is mounted to /a and check thedirectory contents for any Volume Manager startup scripts:
# cd/a/etc/rcS.d
# ls S*vxvm*
S25vxvm-sysboot
S35vxvm-startup1
S85vxvm-startup2
S86vxvm-reconfig
S95vxvm-recover
NOTE: All of the abovescripts may not exist and it only takes one to cause this issue
  • Renameany startup scripts above, or any not listed above but have "vxvm" in thename, to have a lower case "s" to prevent the script from executingduring the bootprocess:
# mvS25vxvm-sysboot s25vxvm-sysboot
# mv S35vxvm-startup1s35vxvm-startup
etcetera...
  • Unmountthe root file system and reboot the system. The message should no longer occur.If the boot disk was encapsulated previously, the system should boot back tomulti-user-server milestone with the root disk still encapsulated. If the rootdisk was in the process of being encapsulated, the root disk will complete theencapsulation process and the system will come back up into multi-user-servermilestone:
# cd/
# umount /a
# reboot

Method 2
To determine if the services containboth the legacy and SMF, the boot disk will need to be temporarilyunencapsulated so the system can boot to the single-user milestone to run the"# svcs" command, follow the below instructions:
 
  • Bootthe server to cdrom or the network in single-user mode / milestone from the OpenBoot Prom, OBP:
bootcdrom -s
or
boot net -s
  • Oncebooted to the cdrom, set your terminal type so the vi editor utility will workcorrectly. If TERM=sun doesn't work, often times TERM=vt100will:
# TERM=sun ;export TERM
  • Fsckyour root file system. If fsck comes back cleanly, mount slice 0 to /a. If fsckcannot repair the root file system, there are a number of possibilities for thecause. This procedure does not attempt to explain file system corruption or howto repair it. fsck must come back cleanly to continue and mountroot:
# fsck -y/dev/rdsk/c#t#d#s0
# mount /dev/dsk/c#t#d#s0/a
  • Makea backup of /a/etc/system and then editit:
# cp/a/etc/system /a/etc/system.orig
# vi/a/etc/system
  • Commentout the following lines using double asterisks**:
**rootdev:/pseudo/vxio@0:0
**setvxio:vol_rootdev_is_volume=1
  • Makea backup of /a/etc/vfstab and then editit:
cp /a/etc/vfstab/a/etc/vfstab.orig
vi/a/etc/vfstab
  • Editthe vfstab file back to it's original state, pointing /, swap, /usr, and /var tohard partitions on the disk like /dev/dsk and /dev/rdsk rather than /dev/vx/entries. Temporarily comment out all other /dev/vx volumes from the/a/etc/vfstab file using the # character. This includes file systems like /optand /export, if they exist.
  • Nowmake sure Volume Manager does not start on the next boot. The presence ofinstall-db tells Volume Manager not to start at boot. This is important becauseIF the root disk contains mirrors, and the system boots up, the mirrors will getresynchronized, corrupting the changes justmade:
# touch/a/etc/vx/reconfig.d/state.d/install-db
  • Removethe flag that tells Volume Manager that the root disk isencapsulated:
# rm/a/etc/vx/reconfig.d/state.d/root-done
  • Rebootthe system for changes to takeeffect:
#reboot
NOTE: After the reboot,the system will come up in an unencapsulated state with /, /usr, /var, and swapmounted. At this point, a Basic/Functional unencapsulation of the root disk hasbeen performed. This is a not a state that the system should be left inpermanently. This state will only be used for troubleshooting and systemmaintenance.
  • Oncelogged into single-user milestone, verify what Volume Manager services have beenstarted by SMF. If there are any services that show up as "legacy_run" asshown towards the beginning of this document, legacy startup scripts exist inthe /etc/rcS.d directory and need to beremoved.
# svcs |grep vxvm
# cd /etc/rcS.d
# ls S*vxvm*
S25vxvm-sysboot
S35vxvm-startup1
S85vxvm-startup2
S86vxvm-reconfig
S95vxvm-recover
NOTE: All of the abovescripts may not exist and it only takes one to cause this issue
  • Renameany startup scripts above, or any not listed above but have "vxvm" in thename, to have a lower case "s" to prevent the script from executingduring the bootprocess:
# mvS25vxvm-sysboot s25vxvm-sysboot
# mv S35vxvm-startup1s35vxvm-startup
etcetera...
  • Rebootthe system:
#reboot
  • Themessage should no longer occur and the temporary unencapsulation of the rootdisk can be reversed and the system should come back up normally intomulti-user-servermilestone:
# touch/etc/vx/reconfig.d/state.d/root-done
# rm/etc/vx/reconfig.d/state.d/install-db
# cp /a/etc/vfstab.orig/a/etc/vfstab
# cp /a/etc/system.orig/a/etc/system
# reboot
 

 

Issue/Introduction

A system running the Solaris 10 operating system fails to reboot with a message on the console showing the device /dev/vx/config is already open and then the system returns to the Open Boot Prom.