Discovery Module

Purpose

Target Discovery module (also referred as TD in text below) collects information about system which is selected as target for the installation. At time of being, following information is obtained:

  • disk configuration (device name, vendor, size, ...)
  • fdisk partition configuration (partition device name, start and size, ID, active flag) - only for x86 platform
  • VTOC configuration (slice device name, start and size, flag, tag)
  • information about existing Solaris instances installed on UFS filesystem (slice containing root filesystem, Solaris version)

Dependencies

  • libdiskmgt library - this library is consumed for most of the discovery tasks (disk, partition, slice discovery)
  • libnvpair(3LIB) library - Target Discovery obtains information from libdiskmgt in format of lists of name-value pairs and uses the same model for providing collected information to the caller. libnvpair(3LIB) library is consumed for manipulating data structures stored as lists of name-value pairs.

Debugging tips

Using standard commands

When problem is encountered in Target Discovery module (e.g. when target disk is not found), initially it is good starting point to verify, if Solaris itself can recognize that target correctly. Standard Solaris commands can be used for this.

Disks

Interactive format(1M) command or non-interactive iostat(1M), cfgadm(1M), prtconf(1M) commands might be used for obtaining information about disks Solaris can recognize on target system.

# iostat -En
# cfgadm -avl
# prtconf -Dv

Partitions

Solaris fdisk(1M) command invoked in non-interactive mode gives information about fdisk partition configuration:

# fdisk -W - c0t0d0p0

However, since it can't recognize logical volumes defined within extended partition, it is also good to take a look using other non-Solaris tools, for instance Linux fdisk command.

# fdisk -l /dev/sda

Slices

Either interactive tool format(1M) or non-interactive prtvtoc(1M) could be used for this.

# prtvtoc /dev/rdsk/c1t1d0s2

Test drivers

After it is verified that system can recognize target correctly and that the problem is probably in Target Discovery module, it is time to take advantage of Target Discovery test drivers which were developed to test and debug Target Discovery module (libtd library).
There are two test drivers available - test_td and tdmgtst. test_td provides formatted output, but can't display information about existing Solaris instances.
Both test drivers are available in two modifications - static and dynamic. Static versions have all installer libraries statically linked (libtd, liblogsvc), so it is not necessary to have those libraries present on inspected system.
Test drivers are built as part of full build of slim_source installer gate and are bundled in SUNWinstall-test package. This package can be obtained from IPS repository. Since it is part of 'redistributable' cluster, it is not installed on system by default, but can be obtained using standard pkg(1M) command.

# pkg install SUNWinstall-test

As Target Discovery consumes libdiskmgt library for most of the tasks, it is better to let libdiskmgt work in debugging mode - then additional information is provided about what libdiskmgt is internally doing. Debug messages are posted to standard error output.

# export DM_LIBDISKMGT_DEBUG=2

Target Discovery module can be also run in debugging mode. It is accomplished by setting LS_DEST and LS_DBG_LVL environment variables.

# export LS_DBG_LVL=4
# export LS_DEST=2

Now Target Discovery will work in the verbose debug mode and all messages will be captured in /tmp/install_log file. They were intentionally redirected to that file (by setting LS_DEST variable), so that they don't collide with libdiskmgt debug messages.
Once the environment is set, we can invoke test driver itself to inspect behavior of Target Discovery module.

Disks

# /opt/install-test/bin/test_td -dv 2>/tmp/libdiskmgt_debug_out

Partitions

# /opt/install-test/bin/test_td -v -p all 2>/tmp/libdiskmgt_debug_out

Slices

# /opt/install-test/bin/test_td -v -s all 2>/tmp/libdiskmgt_debug_out

Solaris instances

# /opt/install-test/bin/tdmgtst -d
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact