Thursday, March 31, 2011

/dev/md/admin ---> Not found - Solaris 9

Friends !!!


Recently I have observed that if you have not respected SVM (Solaris Volume Manager), you may be in soup now or later.
SVM acts like a wrapper the way system see the disks and so accordingly modifications are made in the system wide configuration files. Obviously it is not easy for all to manipulate the files manually, also it is not recommended.
Sometimes the system is so messed up that it will not recognized the metadevice (SVM terminology) and thus you are unable to boot your system. However even if; in some cases you are able to bring the server up by your hard efforts; unable to execute SVM commands.
In Solaris there is file called path_to_inst resides in /etc directory and contains valuable information regarding the system wide devices. In rare times we required to empty this file; so that the system can build a fresh device tree and newly added / modified devices can be seen by the system.
When you system is in Solaris Native mode (Slice) mode this can be achieved easily by rebooting the system with boot -ar option at the OBP prompt.
However if you are running a wrapper like Veritas OR SVM it can be full of obstacles with you and system may keep on rebooting. This happens because your system requires metadevice to boot, however since path_to_inst file is missing / corrupted is unable to identify the device to boot with and hereafter problem starts.
So friends always have in mind if you have SVM configured, and required a fresh path_to_inst to be generated, first disable the SVM configuration so that the system can boot in Slice mode.
However if by any chance you are already in difficult times, after reboot you may observe that no SVM commands are responding and throwing error as /dev/md/admin --> no such file or directory.
To correct this you need to know if /kernel/drv/md.conf file exists. In most of the case it would not and so pseudo device for md is not created. 
Actually /dev/md/admin file is a link to /devices/pseudo/md@0:admin
So now it is time to get this file created. Most of the time you will have the advice to re-install SVM package and reboot the system. However what I did today is as below :
SVM package is completely installed on the system and after recreating path_to_inst I started getting error for every Volume Manager commands
<command> : /dev/md/admin: No such file or directory

I found that /kernel/drv/md.conf file is missing. I created that file (assuming your system is currently in slice mode)
1. Create the file /kernel/drv/md.conf file with the below contents       ( Owner / Group - root/sys, permission 644)
####################################################pragma ident   "@(#)md.conf    2.1     00/07/07 SMI"## Copyright (c) 1992-1999 by Sun Microsystems, Inc.# All rights reserved.#name="md" parent="pseudo" nmd=128 md_nsets=4;####################################################
Once done execute the command 
# update_drv -f md --> will rebuild the device trees and drivers for SVM.
Once the command completed you will find all the missing links liek /dev/md/admin, /devices/pseudo/md@0:admin and all required paths. I have done this on Solaris 9 but pretty sure will work on 8 also.
Now you can run all SVM Commands.

Hope you find this article useful.


3 comments:

What is The Abilene Paradox ?

Context : Corporate World. (excerpt from publicly available sources) On a birthday, a family decided to go out for dinner. Husb...