Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
21.  Maintaining Solaris Volume Manager (Tasks) Working with Configuration Files How to Create Configuration Files  Previous   Contents   Next 
   
 

How to Initialize Solaris Volume Manager from a Configuration File


Caution - Use this procedure only if you have experienced a complete loss of your Solaris Volume Manager configuration, or if you have no configuration yet and you want to create a configuration from a saved configuration file.


If your system loses the information maintained in the state database (for example, because the system was rebooted after all state database replicas were deleted), and as long as no volumes were created since the state database was lost, you can use the md.cf or md.tab files to recover your Solaris Volume Manager configuration.


Note - The md.cf file does not maintain information on active hot spares. Thus, if hot spares were in use when the Solaris Volume Manager configuration was lost, those volumes that were using active hot spares will likely be corrupted.


For more information about these files, see md.cf(4) and md.tab(4).

  1. Create state database replicas.

    See "Creating State Database Replicas" for more information.

  2. Create, or update the /etc/lvm/md.tab file.

    • If you are attempting to recover the last known Solaris Volume Manager configuration, copy the md.cf file to the md.tab file.

    • If you are creating a new Solaris Volume Manager configuration based on a copy of the md.tab file that you preserved, put a copy of your preserved file at /etc/lvm/md.tab.

  3. Edit the "new" md.tab file and do the following:

    • If you are creating a new configuration or recovering a configuration after a crash, configure the mirrors as one-way mirrors. If a mirror's submirrors are not the same size, be sure to use the smallest submirror for this one-way mirror. Otherwise data could be lost.

    • If you are recovering an existing configuration and Solaris Volume Manager was cleanly stopped, leave the mirror configuration as multi-way mirrors

    • Specify RAID 5 volumes with the -k option, to prevent reinitialization of the device. See the metainit(1M) man page for more information.

  4. Check the syntax of the md.tab file entries without committing changes by using the following form of the metainit command:

    # metainit -n -a component-name
    • -n specifies not to actually create the devices. Use this to check to verify that the results will be as you expect

    • -a specifies to activate the devices.

    • component-name specifies the name of the component to initialize. IF no component is specified, all components will be created.

  5. If no problems were apparent from the previous step, re-create the volumes and hot spare pools from the md.tab file:

    # metainit -a component-name
    • -a specifies to activate the devices.

    • component-name specifies the name of the component to initialize. If no component is specified, all components will be created.

  6. As needed, make the one-way mirrors into multi-way mirrors by using the metattach command.

  7. Validate the data on the volumes.

Changing Solaris Volume Manager Defaults

The Solaris Volume Manager configuration has the following default values:

  • 128 volumes per disk set

  • 4 disk sets

  • State database replica maximum size of 8192 blocks

The values of total volumes and number of disk sets can be changed if necessary, and the tasks in this section tell you how.

How to Increase the Number of Default Volumes

This task describes how to increase the number of volumes from the default value of 128. If you need to configure more than the default, you can increase this value up to 8192.


Caution - If you lower this number at any point, any volume existing between the old number and the new number might not be available, potentially resulting in data loss. If you see a message such as "md: d200: not configurable, check /kernel/drv/md.conf" you must edit the md.conf file and increase the value, as explained in this task.


  1. Check the prerequisites ("Prerequisites for Troubleshooting the System").

  2. Edit the /kernel/drv/md.conf file.

  3. Change the value of the nmd field. Values up to 8192 are supported.

  4. Save your changes.

  5. Perform a reconfiguration reboot to build the volume names.

    # boot -r

Example--md.conf File

Here is a sample md.conf file that is configured for 256 volumes.

#
#ident "@(#)md.conf   1.7     94/04/04 SMI"
#
# Copyright (c) 1992, 1993, 1994 by Sun Microsystems, Inc.
#
#
#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=256 md_nsets=4;

How to Increase the Number of Default Disk Sets

This task shows you how to increase the number of disk sets from the default value of 4.


Caution - Do not decrease the number of default disk sets if you have already configured disk sets. Lowering this number could make existing disk sets unavailable or unusable.


  1. Check the prerequisites ("Prerequisites for Troubleshooting the System").

  2. Edit the /kernel/drv/md.conf file.

  3. Change the value of the md_nsets field. Values up to 32 are supported.

  4. Save your changes.

  5. Perform a reconfiguration reboot to build the volume names.

    # boot -r
 
 
 
  Previous   Contents   Next