6    Managing LSM Objects

This chapter describes how to manage LSM objects, including disks, disk groups, volumes, plexes, and subdisks using LSM commands. The tasks described in this chapter can also be accomplished by using:

For more information on an LSM command, see the reference page corresponding to its name. For example, for more information on the volassist command, enter:

# man volassist

6.1    Managing Disk Groups

As discussed in Chapter 5, the voldg command is used for creating new disk groups and adding or removing disks into that disk group. The voldg command is also used to perform other disk group operations such as obtaining a summary of free space within the disk group and importing and deporting disk groups.

See the voldg(8) reference page for more information on other disk group operations

6.1.1    Displaying Free Space Within A Disk Group

To display a summary of the free storage space within a disk group, enter the following command:

# voldg [-g disk_group] [-qa] free [disk_name]

For example, to display a summary of free storage space within the rootdg disk group, enter:

# voldg free

Output similar to the following is displayed:

GROUP        DISK         DEVICE       TAG          OFFSET    LENGTH    FLAGS  
rootdg       dsk2         dsk2         dsk2         204800    3901568   -  
rootdg       dsk3         dsk3         dsk3         0         4106368   -  
rootdg       dsk4         dsk4         dsk4         0         4106368   -  
rootdg       dsk5         dsk5         dsk5         0         4106368   -  
rootdg       dsk6         dsk6         dsk6         0         4106368   -  
rootdg       dsk7         dsk7         dsk7         0         4106368   -  
rootdg       dsk9         dsk9         dsk9         0         4106368   -  
rootdg       dsk11        dsk11        dsk11        0         4106368   -
 

6.1.2    Deporting and Importing Disk Groups

After a disk group is created as described in Chapter 5, the LSM software automatically imports it for use whenever the system is booted.

To disable access to a disk group, you deport the disk group. All the volumes within the disk group should be stopped before deporting the disk group.

Follow these steps to deport a disk group:

  1. Stop all volumes within the disk group by entering the following command:

    # volume [-g disk_group] stopall

    For example, to stop all the volumes in a disk group called dg1, enter:

    # volume -g dg1 stopall

  2. Deport the disk group by entering the following command:

    # volume deport disk_group

    For example, to deport a disk group called dg1, enter:

    # voldg deport dg1

To reenable access to a disk group, you import the disk group, then restart the volumes.

Follow these steps to import a disk group:

  1. Import the disk group by entering the following command:

    # volume import disk_group

    For example, to import a disk group called dg1, enter:

    # voldg import dg1

  2. Start all volumes within the disk group by entering the following command:

    # volume [-g disk_group] startall

    For example, to start all the volumes in a disk group called dg1, enter:

    # volume -g dg1 startall

6.2    Managing Disks Using the voldisk and voldg Commands

Chapter 5 discussed how to add disks to LSM and how to display them. This section covers other disk operations that you can perform using the voldisk and voldg commands including removing disks, configuring disks for hot sparing, renaming disks, evacuating and replacing LSM disks, and reconfiguring the private regions settings on a disk.

When manipulating disks with the LSM software, it is important to understand the difference between a disk access name and a disk media name.

The name of a disk assigned by the operating system is referred to as the disk access name. For example, the disk access name might be dsk0, dsk1, dsk2 and is the name used when first initializing a disk for use with the LSM software.

When the disk is added into an LSM disk group, the disk is assigned an LSM disk media name. You can use any name you want for the disk media name. Often the same disk access name is used for the disk media, but you can use any string or name such as my_data_disk. The LSM voldiskadd interactive utility uses a disk media naming convention of disknn where nn are numbers.

By mapping disk access names to LSM disk media names, the LSM disk group configuration is independent of the system's disk naming. Therefore, changes to disk access names, for example adding or removing hardware, do not affect the LSM software. Also, the mapping of disk access names to LSM disk media names provides flexibility when moving disks between systems where a disk will have a different disk access name on the system to which it is move.

The voldisk command is used to manipulate disks for use with the LSM software that are usually not configured into a disk group, so the system's disk access name is used with this command. You can use the voldg command to manipulate disks that are configured into an LSM disk group, so the disk media is used with this command. You can use the voldisk list command to display both a disk's access and media names.

Many of the operations described in this section can also be done by using the Storage Administrator and the voldiskadm menu interface. See Chapter 9 for information on using the Storage Administrator. See Appendix C for information on using the voldiskadm menu interface.

6.2.1    Adding A Disk

When you add a disk under LSM control, the disk is either initialized or encapsulated. If the disk is not set up, initialize it. If you are placing a disk with partitions that are in use under LSM control, encapsulate it. Encapsulation preserves any existing data on the disk in the form of volumes. Initialization destroys any existing data on the disk. Initialized disks are placed in the free disk pool and are available to add to disk group.

See Chapter 3 for more information on encapsulating a disk.

To initialize a disk, enter:

# voldisksetup -i diskname

For example, to initialize disks called dsk4 and dsk5 as LSM sliced disks, enter:

# voldisksetup -i dsk4

# voldisksetup -i dsk5

Specifying the disk name with no partition letter causes the voldisksetup -i command to initialize the disk as sliced.

6.2.2    Displaying Disks

To display a list of disks, enter:

# voldisk list

Output similar to the following is displayed:

DEVICE       TYPE      DISK         GROUP        STATUS  
dsk0         sliced    -            -            unknown  
dsk1         sliced    -            -            unknown  
dsk2         sliced    dsk2         rootdg       online  
dsk3         sliced    dsk3         rootdg       online  
dsk4         sliced    dsk4         rootdg       online  
dsk5         sliced    dsk5         rootdg       online  
dsk6         sliced    dsk6         rootdg       online  
dsk7         sliced    -            -            online  
dsk8         sliced    dsk8         dg1          online  
dsk9         sliced    dsk9         dg1          online  
dsk10        sliced    -            -            unknown  
dsk11        sliced    -            -            unknown

A value of online in the STATUS column indicates that a disk was initialized for use with the LSM software.

In the above example:

To display how much free disk space is available to create volumes, enter:

# voldg free

Output similar to the following is displayed:

GROUP        DISK         DEVICE       TAG          OFFSET    LENGTH    FLAGS  
rootdg       dsk2         dsk2         dsk2         2097217   2009151   -  
rootdg       dsk3         dsk3         dsk3         2097152   2009216   -  
rootdg       dsk4         dsk4         dsk4         0         4106368   -  
rootdg       dsk5         dsk5         dsk5         0         4106368   -  
rootdg       dsk6         dsk6         dsk6         0         4106368   -  
dg1          dsk8         dsk8         dsk8         0         4106368   -  
dg1          dsk9         dsk9         dsk9         0         4106368   -
 

The value in the LENGTH column displays the amount of free space on a disk.

The volassist help space command also displays detailed information about LSM disks. To use the volassist help space command to display detailed information about LSM disks, enter:

# volassist [-g disk_group] help space

For example, to display detailed disk space information in the dg1 disk group, enter:

# volassist -g dg1 help space

Output similar to the following is displayed:

Disk: dsk8 len=4106368 used=0 free=4106368 (100.00%)  
Attributes:   
  dm:dsk8 device:dsk8 da:dsk8  
Free regions:   
  16,4106368    
 
Disk: dsk9 len=4106368 used=0 free=4106368 (100.00%)  
Attributes:   
  dm:dsk9 device:dsk9 da:dsk9  
Free regions:   
  16,4106368    
 
Disk sets:   
da:dsk8 space=4106368 used=0 free=4106368 (100.00%)   
da:dsk9 space=4106368 used=0 free=4106368 (100.00%)   
device:dsk8 space=4106368 used=0 free=4106368 (100.00%)   
device:dsk9 space=4106368 used=0 free=4106368 (100.00%)   
dm:dsk8 space=4106368 used=0 free=4106368 (100.00%)   
dm:dsk9 space=4106368 used=0 free=4106368 (100.00%)

6.2.3    Renaming a Disk

Because disk access names are defined by the operating system and media names are defined by you, you can only rename disk media names for disks in a disk group.

To rename a disk, enter:

# voledit rename old_diskname new_diskname

Follow these steps to rename disk03 to disk01:

  1. List the current disk names. For example:

    # voldisk list

    DEVICE        TYPE      DISK         GROUP        STATUS
    dsk8          sliced    dsk8         rootdg       online
    dsk9          sliced    disk03       rootdg       online
    dsk9d         simple    -            -            online
    

  2. Rename the disk called disk03 to disk01. For example:

    # voledit rename disk03 disk01

  3. Confirm that the name change was successful. For example:

    # voldisk list

    DEVICE        TYPE      DISK        GROUP        STATUS
    dsk8          sliced    dsk8        rootdg       online
    dsk9          sliced    disk01      rootdg       online
    dsk9d         simple    -           -            online
    

6.2.4    Placing a Disk Off line

You can place a disk in an off line state to prevent LSM from accessing it. You must remove a disk from its disk group before you take it off line. An off line disk remains unavailable until you restore access to the disk by placing it on line.

You place a disk in an off line state to protect it from unintentional use, for example, if attempts to access it may have a negative effect on the system. You cannot take a disk that is in use off line.

To place a disk in an off line state, you must remove the disk from its disk group, and enter:

# voldisk offline disk_name

For example, follow these steps to take a disk off line:

  1. Remove the disk from its disk group. For example to remove a disk called disk01 from the rootdg disk group, enter:

    # voldg rmdisk disk01

  2. Place the disk in an off line state. To do so, you must use the disk access name because the disk no longer has an LSM disk media name after you remove it from the disk group. For example, to place a disk called dsk8, which has the disk name of disk01, in an off line state, enter:

    # voldisk offline dsk8

6.2.5    Placing a Disk On line

Placing a disk in an on line state restores access to a disk that is in an off line state. The disk is placed in the free disk pool and is accessible to LSM again. After bringing a disk back online, the disk must be added to a disk group before it can be used for volumes.

Only disks that are in an off line state can be placed in an on line state.

To place a disk in an on line state, enter:

# voldisk online disk_name

6.2.6    Evacuating a Disk

You can evacuate (or move) the contents of the volumes to other disks in the same disk group if there is sufficient free space. If no target disk is specified, LSM uses available disks with sufficient free space. Evacuating a disk is useful in the event of disk failure.

If the disk being evacuated contains part of a mirrored, striped, or RAID5 volume, do not move the contents of the disk to another disk containing a copy of the mirrored volume or part of the striped/RAID5 volume.

To evacuate a disk from LSM control, enter:

# volevac [-g diskgroup] disk_name new_disk_name

For example, to evacuate a disk called dsk8 to a disk called dsk9, enter:

# volevac dsk8 dsk9d

6.2.7    Removing an LSM Disk from a Disk Group

An LSM disk no longer in use can be removed from a disk group. Do not remove LSM disks that are in use (for example, contains subdisks for a volume), doing so can result in loss of data or of data redundancy.

After an LSM disk is removed from a disk group, it is still initialized for use with the LSM software. Therefore, after removing the disk from a disk group, it can be either immediately added to another disk group, removed from LSM, or left initialized for later use.

Follow these steps to remove a disk from an LSM disk group:

  1. Verify that the LSM disk is not in use by subdisks by entering the following command:

    # volassist help

    For example, to verify that a disk called dsk8 is not in use, enter:

    # volassist help space | grep dsk8

    Output similar to the following is displayed:

    Disk: dsk8 len=4106368 used=0 free=4106368 (100.00%)   
      dm:dsk8 device:dsk8 da:dsk8   
      da:dsk8 space=4106368 used=0 free=4106368 (100.00%)   
      device:dsk8 space=4106368 used=0 free=4106368 (100.00%)   
      dm:dsk8 space=4106368 used=0 free=4106368 (100.00%)
    

    A disk is not in use when 100% is displayed.

    If the LSM disk is in use, you can move or evacuate the data on that disk by using either the volevac command or the volassist mv command. See Section 6.2.6 for more information on evacuating a disk.

  2. Remove the LSM disk from a disk group by entering the following command:

    # voldg [-g disk_group] rmdisk diskmedia_name

    For example, to remove a disk called dsk8 from the rootdg disk group, enter

    # voldg rmdisk dsk8

  3. Display the results by entering the following command:

    # voldisk list

    Output similar to the following is displayed:

    DEVICE       TYPE      DISK         GROUP        STATUS  
    dsk0         sliced    -            -            unknown  
    dsk1         sliced    -            -            unknown  
    dsk2         sliced    dsk2         rootdg       online  
    dsk3         sliced    dsk3         rootdg       online  
    dsk4         sliced    dsk4         rootdg       online  
    dsk5         sliced    dsk5         rootdg       online  
    dsk6         sliced    dsk6         rootdg       online  
    dsk7         sliced    dsk7         rootdg       online  
    dsk8         sliced    -            -            online  
    dsk9         sliced    dsk9         rootdg       online  
    dsk10        sliced    dsk10        rootdg       online  
    dsk11        sliced    dsk11        rootdg       online
    

    Notice that in this output that the disk called dsk8 no longer has a disk media name or belongs in a disk group.

6.2.8    Replacing a Disk

You may need to replace a disk if the disk fails and needs to be removed and repaired. You can replace an existing disk with a new disk, move volumes to the new disk, and attempt to recover any redundant (mirrored or RAID5) volumes on the disk. You cannot recover non-redundant volumes. You should restore non-redundant volumes from backup. If the disk being replaced is a boot disk, you can set up the new disk as a boot disk.

If you replace a good disk, you need to remove the disk from its disk group and place it in the free disk pool before you replace the disk. See Section 6.2.7 for more information on removing a disk from a disk group. If you replace a disk that has failed and is disconnected, you do not need to remove the disk from the disk group.

To replace a disk, enter the voldiskadm command and choose Replace a failed or removed disk from the main menu. A list of disks is displayed from which you can choose a replacement disk. If you have disks that are initialized for use with the LSM software, but not added to a disk group, you can select one of those disks as a replacement. Do not choose the old disk drive as a replacement even though it may appear in the selection list. If there are no suitable initialized disks, you can add a new disk. SeeSection 6.2.1 for more information on adding a disk for use with the LSM software.

6.2.9    Recovering Volumes on a Disk

A recovery operation depends on the types of volumes on the disk and includes starting disabled volumes, resynchronizing mirrors in mirrored volumes, and resynchronizing parity in RAID5 volumes. After successful recovery, the volumes should be available for use.

Alert icons and the Alert Monitor window may provide information when a volume recovery is needed.

If recovery of a volume is not possible, restore the volume from backup.

To recover a volume, enter:

# volrecover [-g disk_group] [volume_name]

For example, to recover a volume called vol01, enter:

# volrecover vol01

6.3    Managing Disk Groups

The following sections describe how to use LSM commands to manage disk groups.

6.3.1    Displaying Disk Group Information

A disk group must exist to place a disk in it. To use disk groups, you must know the names of the groups and what disks belong to each group.

To display disk group information, enter:

# voldisk list

Output similar to the following is displayed:

DEVICE        TYPE      DISK         GROUP        STATUS
dsk5          simple    disk5        dg1          online
dsk8          sliced    dsk8         rootdg       online
dsk9          sliced    disk01       rootdg       online
dsk10         sliced    dsk2          -           online
 
 

Information displayed under the GROUP column shows the disk group in which the disk belongs. A blank GROUP entry, which is represented by a dash (-), means that the disk is not in a disk group.

In the above output, the disk called dsk5 is in the dg1 disk group, the disks called dsk8 and dsk9 are in the rootdg diskgroup, and the disk called dsk10 does not belong in a disk group.

To display detailed information about a disk group, enter:

# voldg list disk_group

For example, to display detailed information about the rootdg disk group, enter:

# voldg list rootdg

Output similar to the following is displayed:

Group:     rootdg
	dgid:      921709207.1025.rio.dec.com
	import-id: 0.1
	flags:    
	copies: nconfig=default nlog=default
	config: seqno=0.1618 permlen=726 free=698 templen=18 loglen=110
	config disk dsk0g copy 1 len=726 state=clean online
	config disk dsk1g copy 1 len=726 state=clean online
	config disk dsk2 copy 1 len=726 disabled
	config disk dsk3 copy 1 len=2993 disabled
	config disk dsk4 copy 1 len=726 state=clean online
	config disk dsk5 copy 1 len=726 state=clean online
	log disk dsk0g copy 1 len=110
	log disk dsk1g copy 1 len=110
	log disk dsk2 copy 1 len=110 disabled
	log disk dsk3 copy 1 len=453 disabled
	log disk dsk4 copy 1 len=110
	log disk dsk5 copy 1 len=110
 
 

This output is useful to determine:

In the above example, the rootdg disk group has 698 blocks free out of 726, and disks called dsk0, dsk1, dsk4, and dsk5 have a copy of the rootdg LSM configuration database.

6.3.2    Displaying Free Space in a Disk Group

Before you add volumes, make sure you have enough free disk space in a disk group to meet the storage needs of the volume.

To display free space in a disk group, enter:

# voldg -g disk_group_name free

If you do not specify a disk group, the voldg free command displays the free space in the default disk group, rootdg. For example, to display the free space in the rootdg disk group, enter:

# voldg free

Output similar to the following is displayed:

GROUP    DISK     DEVICE      TAG    OFFSET  LENGTH   FLAGS
rootdg   dsk8      dsk8      dsk8    726400  102672   -
rootdg   disk01    dsk9      dsk9    0       102128   -

The value displayed in the LENGTH column is the amount (in 512-byte sectors) of free space on a disk.

6.3.3    Adding a Disk To a Disk Group

You must place disks in to a disk group before LSM can use them. The default disk group (rootdg) is created during LSM installation and always exists on a system running LSM.

Follow these steps to add a disk to an existing disk group:

  1. Identify initialized disks that do not belong to a disk group. For example:

    # voldisk list

    Output similar to the following is displayed:

    DEVICE       TYPE      DISK         GROUP        STATUS  
    dsk0         sliced    -            -            unknown  
    dsk1         sliced    -            -            unknown  
    dsk2         sliced    dsk2         rootdg       online  
    dsk3         sliced    dsk3         rootdg       online  
    dsk4         sliced    dsk4         rootdg       online  
    dsk5         sliced    dsk5         rootdg       online  
    dsk6         sliced    dsk6         rootdg       online  
    dsk7         sliced    -            -            online  
    dsk8         sliced    dsk8         dg1          online  
    dsk9         sliced    dsk9         dg1          online  
    dsk10        sliced    -            -            online  
    dsk11        sliced    -            -            unknown  
    dsk12        sliced    -            -            unknown  
    dsk13        sliced    -            -            unknown
    

    Initialized disks that do not belong to a disk group display a STATUS of online and a blank GROUP entry, which is represented by a dash.

    In the above output disks called dsk7 and dsk10 are initialized and not part of a disk group because their status is online and the GROUP column is blank.

  2. Display disk groups. For example:

    # voldg list

    NAME         STATE    ID  
    rootdg       enabled  927328730.1026.wdt2  
    dg1          enabled  929455995.1168.wdt2
    

    The above output shows that the system has two disk groups: rootdg and dg1.

  3. Enter the voldg adddisk command to add an initialized disk to a disk group:

    # voldg adddisk [-g disk_group] diskname

    For example, to add the LSM sliced disk called dsk7 to the rootdg disk group, enter:

    # voldg adddisk dsk7

    To add the LSM sliced disk called dsk10 to a disk group called dg1, enter:

    # voldg -g dg1 adddisk dsk10

6.3.4    Creating a Disk Group

You must place disks in to a disk group before LSM can use them. The default disk group (rootdg) is created during LSM installation and always exists on a system running LSM. You can create additional disk groups to organize your disks into logical sets.

Each new disk group must contain at least one disk and its name must be unique. You can only use disks that are online and do not belong to a disk group to create a disk group.

To create a new disk group, enter:

# voldg init groupname disk_name

For example, to use the LSM sliced disk called dsk5 to create a new disk group called dg1, enter:

# voldg init dg1 dsk5

6.3.5    Deporting a Disk Group

You can deport a disk group to make its volumes temporarily inaccessible. Once deported, a disk group cannot be used until it is imported. A disk group cannot be deported if any volumes in that disk group are in use.

While a disk group is deported, you cannot remove and reuse any of its disks. To remove disks, you must import the disk group and then either destroy the disk group (to remove all of its disks) or remove selected disks from the disk group.

When a disk group is deported, the host ID stored on all disks in the disk group is cleared and the disk group is not reimported automatically when the system reboots. However, if you specify a host in New Host Expert Option, the specified host imports the disk group when the system reboots.

You cannot deport the rootdg disk group.

To deport a disk group, close and unmount all volumes in the disk group and enter:

# voldg deport disk_group

For example, to deport a disk group called dg1, enter:

# voldg deport dg1

6.3.6    Importing a Disk Group

You can import a disk group to make a deported (inaccessible) disk group and its volumes accessible again. To import a deported disk group, you must know the disk group's former name and this disk group name must have remained unused. In addition, at least one disk formerly assigned to the deported disk group must remain unused. If all disks associated with a deported disk group were reused because the disk group was deported, that disk group cannot be imported.

Import may fail for a number of reasons. It may fail if the host cannot find one or more disks in the disk group. If the import fails because a disk has failed, you can import the disk group by selecting the Force Import expert option. If the import fails for another reason, a forced import can cause serious problems.

When you import a disk group, the system stamps its host ID on all disks in the disk group. A disk group import fails if one of the disks is stamped with a host ID that does not match the others. This ensures that dual-ported disks cannot be managed (and possibly corrupted) by two systems at the same time. If you are sure that the disk group is not in use by another host, you can clear the host IDs and import the disk group by selecting the Clear Host ID expert option.

Follow these steps to import a disk group:

  1. Make the disks accessible by entering the following command:

    # voldisk define diskname

  2. Enable local access to the disk group by entering the following command:

    # voldg import disk_group

  3. Start the volumes in the disk group by entering the following command:

    # volrecover -g disk_group -sb

When a disk group is created or imported on a system, that system writes a lock on all disks in the disk group. If you move disks from a system that has crashed or failed to detect the group before the disk is moved, the locks stored on the disks will remain and must be cleared, and the system returns the following error message:

voldg:disk group groupname: import failed: Disk
         in use by another host

To clear locks on a specific set of devices, enter the following command:

# voldisk clearimport diskname

In some cases, you may want to import a disk group when some disks are not available. The import command fails if some disks for the disk group are not found among the disk drives attached to the system. If the import command fails, one of the following error messages is displayed:

voldg: Disk group groupname: import failed: Disk for
         disk group not found

voldg:Disk group groupname: import failed: Disk group has
           no valid configuration copies

6.3.7    Increasing Free Space in a Configuration Database

Typically, LSM maintains four separate physical disks with active configuration database copies for each disk group. When the disk group runs out of space in the configuration database, LSM displays the following message when creating an LSM record:

volmake: No more space in disk group configuration
 

If you run out of disk space, you can increase the size of the configuration database on each disk that is smaller than the current disk group configuration by reducing the number of configuration log copies. Reducing the number of configuration copies on disks, effectively increases the amount of space available for the remaining configurations. However, make sure that there are sufficient copies of the database available for redundancy.

Follow these steps to reduce the number of configuration copies:

  1. Display the amount of free space. For example:

    # voldg list rootdg

    Information similar to the following is displayed:

    Group:     rootdg
    dgid:      783105689.1025.lsm
    import-id: 0.1
    flags:
    config:    seqno=0.1112 permlen=173 free=166 templen=6 loglen=26
    config disk dsk13 copy 1 len=173 state=clean online
    config disk dsk13 copy 2 len=173 state=clean online
    config disk dsk11g copy 1 len=347 state=clean online
    config disk dsk10g copy 1 len=347 state=clean online
    log disk dsk11g copy 1 len=52
    log disk dsk13 copy 1 len=26
    log disk dsk13 copy 2 len=26
    log disk dsk10g copy 1 len=52
    

    The configuration database size and the log size of a disk group corresponds to the smallest configuration database size and log size of any disk in the disk group.

    In this display, the free=166 record indicates that there is enough space in the rootdg disk group to create 166 additional LSM configuration records.

    In addition, disk dsk13 has a configuration database size of 173 sectors, and disks dsk11g and dsk10g each have a configuration database size of 347 sectors. The configuration database size of the rootdg disk group is 173 sectors, which corresponds to the smallest configuration database.

  2. Create a backup copy of the configuration database.

  3. Reduce the number of configuration copies. For example, to reduce the number of configuration copies on dsk13 from 2 to 1, enter:

    # voldisk moddb dsk13 nconfig=1

6.4    Managing Volumes

The following sections describe how to use LSM commands to manage LSM volumes. See Chapter 5 for information on creating a volumes.

6.4.1    Displaying Volume Information

To display the volume, plex, and subdisk record information for all volumes, enter:

# volprint -ht

LSM displays output similar to the following using the abbreviations in Table 6-1.

Table 6-1:  volprint Abbreviations

Abbreviation Meaning
dg Disk Group
dm Disk
pl Plex
sd Subdisk
v Volume

Disk group: rootdg
 
DG NAME         NCONFIG      NLOG     MINORS   GROUP-ID
DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE
V  NAME         USETYPE      KSTATE   STATE    LENGTH   READPOL   PREFPLEX
PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
 
dg rootdg       default      default  0        921709207.1025.rio.dec.com
 
dm disk01       dsk3         sliced   4096     4106368  -
dm rz8a         dsk0a        nopriv   0        262144   -
dm rz8b         dsk0b        nopriv   0        261120   -
dm rz8d         dsk0d        nopriv   0        2618597  -
dm rz8e         dsk0e        nopriv   0        2618597  -
dm rz8g         dsk0g        simple   1024     0        -
dm rz10a        dsk1a        nopriv   0        262144   -
dm rz10b        dsk1b        nopriv   0        261120   -
dm rz10d        dsk1d        nopriv   0        2618597  -
dm rz10e        dsk1e        nopriv   0        2618597  -
dm rz10g        dsk1g        simple   1024     0        -
dm rz12         dsk2         sliced   1024     4109440  -
dm rz17         dsk4         sliced   1024     4109440  -
dm rz19         dsk5         sliced   1024     4109440  -
 
v  rootvol      root         ENABLED  ACTIVE   262144   ROUND     -
pl rootvol-02   rootvol      ENABLED  ACTIVE   262144   CONCAT    -        RW
sd rz10a-01p    rootvol-02   rz10a    0        16       0         dsk1a    ENA
sd rz10a-01     rootvol-02   rz10a    16       262128   16        dsk1a    ENA
pl rootvol-01   rootvol      ENABLED  ACTIVE   262144   CONCAT    -        RW
sd rz8a-01p     rootvol-01   rz8a     0        16       0         dsk0a    ENA
sd rz8a-01      rootvol-01   rz8a     16       262128   16        dsk0a    ENA
 
v  swapvol      swap         ENABLED  ACTIVE   261120   ROUND     -
pl swapvol-02   swapvol      ENABLED  ACTIVE   261120   CONCAT    -        RW
sd rz10b-01     swapvol-02   rz10b    0        261120   0         dsk1b    ENA
pl swapvol-01   swapvol      ENABLED  ACTIVE   261120   CONCAT    -        RW
sd rz8b-01      swapvol-01   rz8b     0        261120   0         dsk0b    ENA
 
v  vol-rz8d     fsgen        ENABLED  ACTIVE   2618597  SELECT    -
pl vol-rz8d-02  vol-rz8d     ENABLED  ACTIVE   2618597  CONCAT    -        RW
sd rz10d-01     vol-rz8d-02  rz10d    0        2618597  0         dsk1d    ENA
pl vol-rz8d-01  vol-rz8d     ENABLED  ACTIVE   2618597  CONCAT    -        RW
sd rz8d-01      vol-rz8d-01  rz8d     0        2618597  0         dsk0d    ENA
 
v  vol-rz8e     fsgen        ENABLED  ACTIVE   2618597  SELECT    -
pl vol-rz8e-02  vol-rz8e     ENABLED  ACTIVE   2618597  CONCAT    -        RW
sd rz10e-01     vol-rz8e-02  rz10e    0        2618597  0         dsk1e    ENA
pl vol-rz8e-01  vol-rz8e     ENABLED  ACTIVE   2618597  CONCAT    -        RW
sd rz8e-01      vol-rz8e-01  rz8e     0        2618597  0         dsk0e    ENA
 
Disk group: dg1
 
DG NAME         NCONFIG      NLOG     MINORS   GROUP-ID
DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE
V  NAME         USETYPE      KSTATE   STATE    LENGTH   READPOL   PREFPLEX
PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
 
dg dg1          default      default  6000     922382892.1625.rio.dec.com
 
dm dg101        dsk9         sliced   4096     4106368  -
 
v  v1           fsgen        ENABLED  ACTIVE   2097152  SELECT    -
pl v1-01        v1           ENABLED  ACTIVE   2097152  CONCAT    -        RW
sd dg101-01     v1-01        dg101    0        2097152  0         dsk9     ENA
 
 

To display information on a particular volume, enter:

# volprint -t volume_name

For example, to display the information about a volume called volspec, enter:

# volprint -t volspec

Output similar to the following is displayed;

Disk group: rootdg
 
V  NAME     USETYPE  KSTATE   STATE   LENGTH   READPOL  PREFPLEX
 
v  volspec  fsgen    ENABLED  ACTIVE  2097152  SELECT   -

To display the plexes for this volume, enter:

# volprint -e 'assoc="volspec"'

To list information on all volumes, enter:

# volprint -vt

To show detailed information for all volumes, enter:

# volprint -vl

6.4.2    Changing Volume Attributes

You can use the following commands to change volume attributes, such as ownership, permissions, and the values in the comment and command fields:

To volume attributes, enter:

# volume set field=value ...volume_name

For example, to change the owner of vol01 to susan, the group to staff, and the permissions to read/write for owner, group, and other, enter:


# voledit set user=susan group=staff mode=0666 vol01

Table 6-2 describes the attributes that you can set for each command.

Table 6-2:  Setting Volume Attributes

Command Attribute Description
voledit comment The comment field
  tutil0, tutil1, tutil2 Temporary and permanent utility fields (for internal use only).
  putil0, putil1, putil2  
  fstype String indicating file system type
  writeback Boolean (on/off) specifying read error correction mode
  user Owner of volume
  group Group of volume
  mode Permission mode for volume
volume len Numeric length of volume
  log type (region/undef) specifier of dirty region logging mode for volume
  loglen Length of the dirty region logging log
  start opts Options to be executed with the volume start operation

6.4.3    Setting the Volume Read Policy

LSM offers the choice of three read policies:

The volume rdpol command sets the read policy for a volume. Use one of the following commands to set a read policy:

# volume rdpol round volume_name

or

# volume rdpol prefer volume_name preferred_plex_name

For example, to set the read policy for volume vol01 to a round-robin read, enter:

# volume rdpol round vol01

To set the policy for the same volume to read preferentially from the plex vol01-02, enter:

# volume rdpol prefer vol01 vol01-02

6.4.4    Recovering a Volume

You can recover a volume. The recovery operations depend on the type of volume and include starting disabled volumes, resynchronizing mirrors in mirrored volumes, and resynchronizing parity in RAID5 volumes. After successful recovery, the volume should be available for use.

Alert icons and the Alert Monitor window may provide information when a volume recovery is needed.

In some cases, recovery may not be possible. If the volume recovery fails, you can attempt to restore the volume from backup.

To recover all volumes, enter:

# volrecover [-g disk_group] startall

6.4.5    Stopping a Volume

LSM automatically starts and stops a volume whenever the system is booted or shut down. When a volume will no longer be needed, you should stop the volume before deleting it. You cannot stop a volume if it is in use or it has a mounted file system.

To stop a volume, enter:

# volume stop [-g group_name] volume_name ...

For example, to stop a volume called vol1 in the dg1 disk group, enter:

# volume stop -g dg1 vol1

To stop all volumes in the ENABLED state, enter:

# volume stopall

6.4.6    Starting a Volume

LSM automatically starts and stops a volume whenever the system is booted or shut down, so it is not normally necessary to have to explicitly start a volume. You may need to manually start a volume after it is first created by using the volmake command, or if it was explicitly stopped as described in Section 6.4.5. Because you cannot use RAID5 volumes in a TruClustered environment, they can not be started in clusters.

To start a volume, enter

# volume start [-g group_name] volume_name ...

For example, to start a volume called vol1 in the dg1 disk group, enter:

# volume start -g dg1 vol1

Starting a volume changes the volume state from DISABLED or DETACHED to ENABLED. If you cannot start a volume, it remains in its current state.

6.4.7    Renaming a Volume

You can rename a volume. The new volume name must be unique within the disk group. If the volume has a file system, renaming the volume automatically updates the /etc/fstab file and allows you to specify a new mount point for the file system. You cannot rename volumes that are part of an AdvFS domain.

To rename a volume, enter:

# voledit rename old_volume_name new_volume_name

For example, to rename a volume called v1 to vol01, enter:

# voledit rename v1 vol01

6.4.8    Removing a Volume

You can remove a volume. Removing a volume destroys all of the data in that volume. Only remove a volume if you are sure that you do not need the data in the volume (or the data is backed up elsewhere). When a volume is removed, the space it occupied is returned to the free space pool.

Removing a volume that has a file system on it will only work if the file system is UFS.

To remove a volume, enter:

Follow these steps to remove a volume:

  1. Close the volume, or if it contains a file system, unmount it.

    For example, if the volume is used in an AdvFS multi-volume domain, enter the following command to deconfigure the LSM volume from AdvFS and close it:

    # rmvol /dev/vol/advfs_vol

    If the volume contained a UFS file system that is no longer needed, enter the following command to unmount it and close the LSM volume:

    # umount /dev/rvol/v_ufs

  2. Stop all LSM activity to the volume by entering the following command:

    # volume stop volume_name

    For example, to stop a volume called v_ufs, enter:

    # volume stop v_ufs

  3. Remove the volume along with all associated plexes and subdisks by entering the following command:

    # voledit -r rm volume_name

    For example, to remove the volume called volspan, enter:

    # voledit -r rm volspan

6.5    Managing Plexes

The following sections describe how to use LSM commands to manage plexes.

6.5.1    Displaying Plex Information

A plex contains a copy of a volume's data. A volume is mirrored when there are two or more plexes attached to a volume. Listing plexes helps you identify free plexes that you can use to create volumes.

To display free plexes, enter:

# volprint -pt

To display detailed information about all plexes, enter:

# volprint -lp

To display detailed information about a specific plex, enter:

# volprint -l plex_name

6.5.2    Detaching a Plex

When you create a volume and place it on line (ENABLED), LSM provides commands that allow you to temporarily detach a plex from the volume. This is useful, when the hardware on which a plex resides needs repair or when a volume is left unstartable and you must manually start a source plex for the volume.

A detached plex maintains the association to its volume; however, the plex cannot be used for I/O. While the plex is detached, its state is set to STALE. If a volume start command runs on the volume (for example, after a system reboot), the plex is reattached and made ACTIVE.

To detach a plex in a mirrored volume, enter:

# volplex det plex_name ...

For example, to detach a plex called vol01-02, enter:

# volplex det vol01-02

6.5.3    Attaching a Plex

When the disk is repaired or replaced and is ready for use, you must attach a plex to put it on line (ACTIVE).

If the volume is in use (ENABLED), enter:

# volplex att volume_name plex_name ...

For example, to attach a plex called vol01-02 on a volume called vol01, enter:

# volplex att vol01 vol01-02

If the volume is not in use (not ENABLED), enter:

# volmend on plex_name

For example, for a plex called vol01-02, enter:

# volmend on vol01-02

In this case, the state of vol01-02 is set to STALE, so that the next time the volume starts, the data on the plex is revived from the other plex, and incorporated into the volume with its state set to ACTIVE.

If it becomes necessary to manually change the state of a plex, see the volmake(8) and volmend(8) reference pages for more information.

6.5.4    Moving Plexes

You can move the date on a plex onto a new plex. For a move operation to be successful, you must ensure:

To move data from one plex to another, enter:

# volplex mv original_plex new_plex_name

6.5.5    Copying Plexes

You can copy a plex to another plex. The copied plex contains a complete copy of the volume data. To copy the contents of a volume to a specified plex, you must ensure that the volume to be copied is not enabled and that the plex is not associated with any other volume.

To copy a plex, enter:

# volplex cp vol_name new_plex_name

The new_plex is not associated with the specified volume vol_name.

6.5.6    Backup Using a Plex

This section shows how to backup data by manipulating plexes manually. See Section 7.4 for information on how to automatically backed up data by using the volassist command.

You can backup of a volume if the volume is mirrored by taking one of the volume's plexes off line for a period of time. This eliminates the need for extra disk space for the purpose of backup only. However, it also eliminates redundancy of the volume during the backup.

Follow these steps to perform a backup of a mirrored volume on an active system:

  1. Stop I/O activity and flush any buffers to improve the consistency of the backup. For example, Compaq recommends briefly unmounting the UFS volume in order to create a complete and consistent backup.

  2. Disassociate one of the volume's plexes (vol-01, for this example):

    # volplex dis vol-01

    This command should only take a few seconds to execute. It leaves the vol-01 plex available as an image of the volume frozen at the time of the disassociation.

  3. Resume I/O activity. For example, if the volume contained UFS, remount it.

  4. Create a temporary volume:

    # volmake -Ufsgen vol vtmp plex=vol-01

    # volume start vtmp

  5. Check the temporary volume, if necessary:

    # fsck -p /dev/rvol/vtmp

  6. Create a backup using the temporary volume:

    # dump 0 /dev/rvol/vtmp

  7. Reattach the plex to the volume to mirror the volume:

    # volplex dis vol-01

    # volplex att volume-name vol-01

6.5.7    Removing Plexes

You can remove a plex when it is no loger need, for example:

Note

To save the data on a plex that you plan to remove, you need to know the original configuration of that plex. Several parameters from that configuration, such as stripe width and subdisk ordering, are critical to the construction of a new plex which would contain the same data. Before you remove a plex, record its configuration.

To remove a disk you must disassociate the plex from the volume and remove the plex and any associated subdisks.

To disassociate a plex from a volume and remove it, enter:

# volplex -o rm dis plex_name

For example, to disassociate a plex called vol01-02 and remove all associated subdisks, enter:

Note

Without the -o rm, the volplex command disassociates the plex and subdisks, but does not remove them. To remove the disassociated plex and subdisks, enter:

# voledit -r rm plex_name

The voledit -r command removes multiple objects. Use this command with caution.

6.6    Managing Subdisks

The following sections describe how to use LSM commands to manage subdisks.

6.6.1    Displaying Subdisks

To display general information for all subdisks, enter:

# volprint -st

Output similar to the following is displayed:

Disk group: rootdg
 
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
 
sd dsk0a-01     vol-dsk0a-01 dsk0a-AdvFS 0     262144   0         dsk0a    ENA
sd dsk0b-01     vol-dsk0b-01 dsk0b-swap 0      262144   0         dsk0b    ENA
sd dsk0g-01     vol-dsk0g-01 dsk0g-AdvFS 0     1526572  0         dsk0g    ENA
sd dsk1g-01     vol-dsk1g-01 dsk1g-AdvFS 0     1429762  0         dsk1g    ENA
sd lsm03-01     vol01-01     lsm03    0        409600   0         dsk3     ENA
sd root01-01    rootvol-01   root01   0        262144   0         dsk1a    ENA
sd swap01-01    swapvol-01   swap01   0        258048   0         dsk1b    ENA
 

To display detailed information about a subdisk, enter:

# volprint -l subdisk_name

For example, to obtain all database information on a subdisk called disk02-01, enter:

# volprint -l vol-dsk1g-01

Output similar to the following is displayed:

# Disk group: rootdg
 
Plex:     vol-dsk1g-01
info:     len=1429762
type:     layout=CONCAT
state:    state=ACTIVE kernel=ENABLED io=read-write
assoc:    vol=vol-dsk1g sd=dsk1g-01
flags:    busy complete

6.6.2    Joining Subdisks

You can join two or more subdisks together to form a single, larger subdisk. Subdisks can only be joined together if they belong to the same volume and occupy adjacent regions of the same disk and mirror. The joined subdisk can retain the name of one of the subdisks being joined.

For a striped volume, the subdisks must be in the same column.

To join a subdisk, enter:

# volsd join subdisk1 subdisk2 new_subdisk

6.6.3    Splitting Subdisks

You can divide a subdisk into two or more subdisks. Once split, the smaller subdisks can be moved elsewhere or joined later. This is useful for reorganizing volumes or for improving performance. The original subdisk must contain a sufficient number of sectors for the specified split to work.

The name of the first subdisk remains the same as the selected subdisk. The new, smaller subdisks occupy the same regions of the disk that the original subdisk occupied.

A log subdisk cannot be split.

To split a subdisk, enter:

# volsd -s size split sd newsd newsd2

For example, to split a subdisk called disk02-01 to a subdisk called disk02-01 and disk02-02

# volsd dis disk02-01 disk02-01 disk02-02

If the existing subdisk is associated with a plex before the split command, both of the resulting subdisks are associated with the same plex.

6.6.4    Changing Subdisk Information

To change subdisk information, enter:

# voledit set field=value ... subdisk_name ...

For example, to change the comment field of a subdisk called disk02-01, enter:

# voledit set comment="New comment" disk02-01

Use the voledit command to change the following subdisk fields:

Table 6-3 describes these subdisk fields.

Table 6-3:  The putil and util Fields

Field Description
putil0 Reserved for use by the LSM utilities and is retained after a reboot.
putil1 Reserved for use by high-level utilities, such as the Visual Administrator interface (dxlsm) and the LSM Support Operations interface (voldiskadm). This field is retained after a reboot.
putil2 Reserved for use by the system administrator or site-specific applications. This field is retained after a reboot.
tutil0 Reserved for use by the LSM utilities and is cleared after a reboot.
tutil1 Reserved for use by high-level utilities, such as dxlsm and voldiskadm. This field is cleared after a reboot.
tutil2 Reserved for use by the system administrator or site-specific applications. This field is cleared after a reboot.

Note

Entering data in the putil0 field prevents you from using the subdisk as part of a plex, if it is not already being so used.

6.6.5    Moving Subdisks

You can move portions of a volume to a different disk to improve performance. The disk space occupied by the original subdisk is returned to the free space pool.

Do not move a subdisk in a mirrored, striped, or RAID5 volume to a disk that already contains a copy or part of that volume.

If this task fails and leaves some unused subdisks (that is, subdisks that are not associated with a volume) on the system, you can use the Remove Subdisk task to free the space occupied by the unused subdisks.

You must ensure that the following conditions are met before you move a subdisk:

To move a subdisk, enter:

# volsd mv old_subdisk_name new_subdisk_name

6.6.6    Removing a Subdisk

You can remove a subdisk that is not associated with a volume. This returns the disk space occupied by unused subdisks to the free space pool.

To remove a subdisk you must disassociate the subdisk from a plex, then remove it. To disassociate and remove a subdisk, enter:

# volsd -orm dis subdisk_name

For example, to disassociate and remove a subdisk called disk02-01, enter:

# volsd -orm dis disk02-01