2    Setting Up the LSM Software

This chapter describes how to setup up the LSM software, which includes:

2.1    Installing or Upgrading the LSM Software

The way you install the LSM software depends on if you are:

Note

The LSM Versions 5.0 software and higher have an on-disk LSM internal metadata format that is not compatible with the previous versions of the LSM software. That is, LSM Version 5.0 or higher cannot use the metadata format from previous LSM versions, nor can a previous LSM version use the metadata format from LSM Version 5.0 or higher.

If the LSM software detects an older metadata format within a disk's private region during a disk group import, LSM automatically converts the old format to the new format. Once converted to the new format, you can no longer use a disk group with previous versions of LSM.

2.1.1    Performing a Full Installation on an System With LSM

If the system is running the LSM software, follow these steps before performing a full installation:

  1. Check for a previous version of the LSM software by entering the following command:

    # voldisk list rz2 | grep version

    Output similar to the following is displayed:

    version: 1.1

  2. Optionally, prevent non-rootdg disk groups from automatically being converted to the new LSM internal metadata format during the full installation process.

    For example, to prevent disk groups called dg1 and dg2 from being converted and used with the new version of the LSM software, enter:

    # voldg deport dg1 dg2

  3. Determine the previous hostid configured with the LSM software by entering the following command:

    # /sbin/voldctl list

    Output similar to the following is displayed:

    
    Volboot file  	   	
    version: 3/1  	   	
    seqno:   0.2  	   	
    hostid:  rio.dec.com  	   	
    entries:    	   	
    disk rz2 type=sliced    	   	
    disk rz3 type=sliced    	   	
    disk rz8 type=sliced    	   	
    disk rz9 type=sliced
    

    In this output the hostid is rio.dec.com

  4. Save the current LSM configuration by entering the following command:

    # volsave

    Output similar to the following is displayed:

    
    LSM configuration being saved to /usr/var/lsm/db/LSM.date.rio
    LSM Configuration saved successfully to /usr/var/lsm/db/LSM.date.rio
    

  5. Confirm that the LSM configuration was saved by entering the following command:

    # ls /usr/var/lsm/db/LSM.date.rio

    Output similar to the following is displayed:

    
    header        rootdg.d      volboot       voldisk.list
    

  6. Save the LSM configuration to tape or other removable media.

The LSM software is reinitialized if during the full installation you selected to install the system's root, usr, var, and swap partitions directly onto LSM volumes .

If the system's root, usr, var, and swap partitions are not installed directly onto LSM volumes during the full installation, select and configure the LSM subsets during the operating system installation process. See the Installation Guide for more information on installing the operating system software.

After installing the operating system, follow these steps to reinitialize the LSM software to use previous disk group configurations:

  1. Either:

    1. Restore the /etc/vol/volboot file by entering the following command:

      # cp /backup/usr/var/lsm/db/LSM.date.hostname/ \
      volboot /etc/vol/volboot
      

    2. Or, create a new /etc/vol/volboot file using the hostid obtained in the previous Step 3. For example, to create a new /etc/vol/volboot file for a system with a hostid of rio, enter:

      # voldctl init rio.dec.com

  2. Reinitialize the LSM special device files and start the LSM daemons and volumes by entering the following command:

    # volsetup

    Warning

    Do not use the force option with the volsetup command. Doing so destroys the previous LSM configuration for the rootdg disk group.

2.1.2    Performing an Upgrade Installation on a System with LSM

If the LSM software was initialized on a system before an upgrade installation, be sure to select the LSM subsets during the upgrade installation process. If one of the file systems was configured on an LSM volume, you must start the LSM software and its volumes before proceeding with the upgrade installation after booting the system to single-user mode.

See the Installation Guide for more information on installing the LSM software.

2.2    Initializing the LSM Software For the First Time

You must initialize the LSM software if during a full installation you did not install the system's file systems into LSM volumes, or if you did not perform an upgrade installation on a system that was previously running the LSM software.

Use one of the following methods to initialize the LSM software for the first time:

Initializing the LSM software:

2.2.1    Before You Initialize the LSM Software

Before you initialize the LSM software, you should:

2.2.2    Initializing the LSM Software Using The volsetup Command

The volsetup command automatically initializes the LSM software by:

You enter the volsetup command only once. To add more disks, you can use the voldiskadd command, as described in Section 6.2.1.

Initialize the LSM software by entering the following command:

# volsetup disk_name

If you omit the name of a disk, the volsetup command prompts you for it.

For example, to initialize the LSM software using a disk called dsk4 to create the rootdg disk group, enter:

# volsetup dsk4

Note

When you initialize the LSM software, do not specify the boot disk with the volsetup command. After you initialize the LSM software, you can encapsulate the boot disk to add partitions on the boot disk to the rootdg disk group. See Chapter 4 for more information on encapsulating the boot disk.

If the volsetup command displays an error message or if the initialization fails, you may need to modify the disk label and reinitialize the disk. See the volsetup(8) reference page for more information.

2.2.3    Initializing the LSM Software Using Commands

Using the volsetup command to initialize the LSM software for the first time is the most common and easiest way to set up the LSM software as described in Section 2.2.2. However, if you require more control over how the LSM software is set up, you can use a series of commands instead of the volsetup command.

Follow these steps to use a series of LSM commands to initialize the LSM software:

  1. Adds entries to the /etc/inittab file that automatically start LSM when the system boots by entering the following command:

    # volinstall

    If the volinstall command fails, then:

  2. Start the vold daemon in the disabled mode by entering the following command:

    # vold -m disable

  3. Create and initialize the /etc/vol/volboot file by entering the following command:

    # voldctl init

  4. Create the rootdg disk group by entering the following command:

    # voldg init rootdg

    Warning

    Enter the voldg init command only once to create a disk group. If you use the voldg init command a second time, you will destroy configuration information.

  5. Verify that the rootdg disk group was created by entering the following command:

    # volprint

    Output similar to the following is displayed:

    Disk group: rootdg
     
    TY NAME    ASSOC      KSTATE  LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
     
    dg rootdg  rootdg     -       -         -        -        -       -
    dm dsk4    dsk4       -       1854536   -        -        -       -
     
     
     
    

  6. Verify that the disk label for disks to be used with the LSM software have a fstype status of unused by entering the following command:

    # disklabel disk_name

    For example, to display the disk label for a disk called dsk10, enter:

    # disklabel dsk10

    Output similar to the following is displayed:

    # /dev/rdisk/dsk10c:
    type: SCSI  
    disk: RZ1BB-CS  
    label:   
    flags: dynamic_geometry  
    bytes/sector: 512  
    sectors/track: 86  tracks/cylinder: 16  
    sectors/cylinder: 1376  
    cylinders: 3045  
    sectors/unit: 4110480  
    rpm: 7228  
    interleave: 1  
    trackskew: 40  
    cylinderskew: 80  
    headswitch: 0           # milliseconds  
    track-to-track seek: 0  # milliseconds  
    drivedata: 0     
     
    8 partitions:  
    #        size   offset   fstype [fsize bsize cpg] # NOTE: values not exact    
      a:   131072        0   unused      0     0      # (Cyl.    0 - 95*)    
      b:   262144   131072   unused      0     0      # (Cyl.   95*- 285*)    
      c:  4110480        0   unused      0     0      # (Cyl.    0 - 2987*)    
      d:        0        0   unused      0     0      # (Cyl.    0 - -1)    
      e:        0        0   unused      0     0      # (Cyl.    0 - -1)    
      f:        0        0   unused      0     0      # (Cyl.    0 - -1)    
      g:  1858632   393216   unused      0     0      # (Cyl.  285*- 1636*)
      h:  1858632  2251848   unused      0     0      # (Cyl. 1636*- 2987*)
    

    If the disk is no longer in use, but the fstype field for any partition is anything other than unused, you must initialize the disk label. For example, to initialize the disk label for a disk called dsk2, enter:

    # disklabel -wr dsk2

    If you receive an error message that the disk does not start at block zero, enter the following commands:

    # disklabel -z disk_name

    # disklabel -wr disk_name

  7. Repartition and initialize the LSM private region on the disk by entering the following command:

    # voldisksetup -i disk_name

    For example, to repartition and initialize the LSM private region on a disk called dsk9, enter:

    # voldisksetup -i dsk9

    Display the results by entering the following command:

    # disklabel dsk9 | grep LSM

    Output similar to the following is displayed:

    g:    4106384          0   LSMpubl          # (Cyl.    0 - 2984*)    
    h:       4096    4106384   LSMpriv          # (Cyl. 2984*- 2987*)
    

    LSM automatically maintains the number of active configuration databases and the location of the databases for a disk group. LSM dynamically evaluates and, if needed, activates or deactivates a configuration database within a disk's private region when a disk is added, removed, or fails. Therefore, it is not necessary to explicitly specify the location and number of configurations on a disk.

    See the voldisksetup(4) and voldisk(4) reference pages for more information on disk initialization options.

  8. Add a disk to the rootdg disk group by entering the following command:

    # voldg adddisk disk_name

    For example, to add a disk called dsk9 to the rootdg disk group, enter:

    # voldg adddisk dsk9

  9. Enable the vold daemon by entering the following command:

    # voldctl enable

  10. Set the number of LSM I/O daemons, which is either two or the number of central processing units (CPUs) on the system, whichever is greater. For example, on a single CPU system, enter:

    # voliod set 2

    On a four CPU system, enter:

    # voliod set 4

    You only need to set the LSM I/O daemons the first time you initialize the LSM software. The correct number of I/O daemons is correctly set when the system boots.

2.2.4    Verifying that the LSM Software was Initialized

Follow these steps to verify that the LSM software is initialized:

  1. Verify that the disk was added to the rootdg disk group by entering the following command:

    # volprint

    Output similar to the following is displayed:

    Disk group: rootdg
     
    TY NAME    ASSOC      KSTATE  LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
     
    dg rootdg  rootdg     -       -         -        -        -       -
    dm dsk4    dsk4       -       1854536   -        -        -       -
     
     
     
    

  2. Verify that the vold daemon is enabled by entering the following command:

    # voldctl mode

    Output similar to the following is displayed:

    mode: enabled

  3. Verify that two or more voliod daemons are running by entering the following command:

    # voliod

    Output similar to the following is displayed:

    2 volume I/O daemons are running

  4. Verify that the/etc/inittab file was modified to include LSM entries by entering the following command:

    # grep LSM /etc/inittab

    Output similar to the following is displayed:

    lsmr:s:sysinit:/sbin/lsmbstartup -b /dev/console 2>&1 ##LSM
    lsm:23:wait:/sbin/lsmbstartup -n /dev/console 2>&1 ##LSM
    vol:23:wait:/sbin/vol-reconfig -n /dev/console 2>&1 ##LSM
    

  5. Verify that the /etc/vol/volboot file was created by entering the following command:

    # /sbin/voldctl list

    Output similar to the following is displayed:

    Volboot file
    version: 3/1
    seqno:   0.4
    hostid:  test.abc.xyz.com
    entries:
     
     
    

2.3    Using the LSM Software

After the LSM software is set up, you can:

Note

LSM does not support encapsulation of data on ULTRIX Disk Shadowing (UDS) volumes or ULTRIX Striping Driver stripe volumes.