IBM Books

Managing Shared Disks


Command and SMIT interfaces for Virtual Shared Disks

Entering node information in the SDR for one node

You can use SMIT or the vsdnode command to enter virtual shared disk node information into the SDR.

To enter virtual shared disk node information using SMIT:

SELECT
VSD Node Information

> The VSD Node Information dialog appears.

See the book PSSP: Command and Technical Reference for the command syntax.

Entering global volume group information in the SDR for one node

Global volume group information is stored in the System Data Repository (SDR) VSD_Global_Volume_Group object. For each volume group on which virtual shared disks will be defined, the following data is required:

  1. Local volume group name

    The LVM volume group's name on the serving node. The length of the name must be less than or equal to 15 characters.

  2. Primary server node for the volume group

    The node number of the server node. The primary server node may be identified in four ways. See the vsdvg command reference page for specific information.

    If you do not have the IBM Recoverable Virtual Shared Disk software installed, all server nodes are primary nodes.

  3. Secondary server node for the volume group

    The secondary server node is only intended for use with the IBM Recoverable Virtual Shared Disk software.

    The node number of the serving node. The secondary server node may be identified in four ways. See the vsdvg command reference page for specific information.

  4. Global volume group name (must be unique across a system partition)

    The global volume group name is the globally unique name for this virtual shared disk volume group. The global volume group name is usually identical to the volume group name. The length of the name must be less than or equal to 31 characters. IBM suggests that the global volume group names be unique across the physical SP system. It must be unique within a system partition.

To enter virtual shared disk global volume group information using SMIT:

SELECT
VSD Global Volume Group Information

> The VSD Global Volume Group Database Information dialog appears.

You can also enter virtual shared disk volume group information using the vsdvg command:

vsdvg [-g global_group_name ] local_group_name
primary_server_node [secondary_server_node]

Entering Virtual Shared Disk information in the SDR for one node

A virtual shared disk is defined by creating a VSD_Table object in the SDR. For each virtual shared disk, the following data is required:

  1. virtual shared disk name (this name must be unique across the system partition)

    The globally unique name of the virtual shared disk. The name must be less than or equal to 31 characters. IBM suggests that the name be unique across the physical SP system.

    If you choose a vsd_name that is already the name of another device, the cfgvsd command will reject the name to insure that the special device files created for the name do not overlay and destroy files of the same name representing another device type (such as a logical volume).

  2. Logical volume name

    The name of the logical volume on the serving node. The length of the name must be less than or equal to 15 characters.

  3. Global volume group name

    The globally unique name of the volume group on which the virtual shared disk resides. This field is used to access the VSD_Global_Volume_Group to determine the node and the volume group that contains the underlying logical volume. The length of the name must be less than or equal to 31 characters.

  4. Cache or nocache option

    Use the cache option only if your application does I/O in 4K blocks aligned on 4K disk boundaries, and issues a read immediately following a write.

    Nocache is the default for new virtual shared disks created with the defvsd command.

  5. Minor number

    This number is automatically allocated.

To enter virtual shared disk information using SMIT:

SELECT
Define a Virtual Shared Disk

> The Define A Virtual Shared Disk dialog appears.

You can also enter virtual shared disk information using the defvsd command:

defvsd logical_volume_name global_group_name  vsd_name [nocache
| cache ]

An Example of defining a Virtual Shared Disk on one node at a time

Figure 18 is a simple example of a virtual shared disk. There are three virtual shared disks, one on each node. We have two physical hard disks per node and we defined a logical volume on one disk per node.

Figure 18. An Example of a Virtual Shared Disk Configuration

View figure.

Here's how we did it. First, we decided that three virtual shared disks were needed, one on each node on a separate volume group. We created a table of the information for our configuration.

Table 7. Virtual Shared Disk Information

Node Number hdisks Volume Groups Logical Volumes vsd Name
1 hdisk0      
  hdisk1 vg1n1 lv1vg1n1 vsd1vg1n1
2 hdisk0      
  hdisk2 vg1n2 lv1vg1n2 vsd1vg1n2
3 hdisk0      
  hdisk5 vg1n3 lv1vg1n3 vsdvg1n3

Create volume groups and logical volumes on one node

You must create the volume groups and logical volumes before defining the virtual shared disk information. We created the volume groups (vg1n1, vg1n2, vg1n3) on each node for each virtual shared disk using SMIT:

smit mkvg

and entered the volume group information requested. We took the defaults. See AIX System Management Guide: Operating Systems and Devices, for more information.

Next we created the logical volume groups (lv1vg1n1, lv1vg1n2, lv1vg1n3) on each node using SMIT:

smit mklv

and entered the global volume group information. See AIX System Management Guide: Operating Systems and Devices, for more information on tuning logical volumes.

Next we used SMIT to check the volume group and logical volume information we created:

smit lsvg

smit lslv

Define Virtual Shared Disks

Now we start to define our virtual shared disks. We entered the virtual shared disk node information using SMIT. This information was entered separately for node 1, 2, and 3. See Designating nodes as IBM Virtual Shared Disk nodes for more information.

smit vsd_data

and selected the VSD Node Information option.

In the table italics show the information we entered. A constant width font shows the default data. We took most of the defaults except where noted.


Table 8. Virtual Shared Disk Node Information

Node Number Adapter Initial Cache Max Cache Request Blocks pbufs Min Buddy Buffer Max Buddy Buffer # Buddy Buffers
1 css0 64 256 256 48 4096 24576 4
2 css0 64 256 256 48 4096 24576 4
3 css0 64 256 256 48 4096 24576 4

Next we used SMIT to enter the virtual shared disk global volume group information for vg1n1, vg1n2 and vg1n3. See Entering global volume group information in the SDR for one node for more information.

smit vsd_data

and selected the VSD Global Volume Information option.

Table 9. Virtual Shared Disk Volume Group Information

Global Group Name Local VG Name Primary Server Secondary Server
vg1n1 vg1n1 1 -
vg1n2 vg1n2 2 -
vg1n3 vg1n3 3 -

We did not enter information about secondary servers because that is only for users of the IBM Recoverable Virtual Shared Disk software.

Next we entered the virtual shared disk definition information for vsd1vg1n1, vsd1vg1n2 and vsd1vg1n3. See Entering Virtual Shared Disk information in the SDR for one node for more information.

Again we used the SMIT command:

smit vsd_data

and selected the Define a Virtual Shared Disk option.


Table 10. Virtual Shared Disk Definition Information

LV Name Global Group Name Option
lv1vg1n1 vg1n1 vsd1vg1n1 nocache
lv1vg1n2 vg1n2 vsd1vg1n2 nocache
lv1vg1n3 vg1n3 vsd1vg1n3 nocache

Now we have defined our virtual shared disk in the SDR.

Displaying Virtual Shared Disk information stored in the SDR

Once you have defined virtual shared disk information in the SDR, you can display this information.

To list virtual shared disk definition information using SMIT (from the SP Configuration Database Management menu):

SELECT
List Database Information

> The List Database Information menu appears.

SELECT
List VSD Database Information

> The List VSD Database Information menu appears.

Or you can use the fastpath invocation for this menu:

smit list_vsd

At this point, you can select options for listing node, global volume group, and defined virtual shared disk information.

You can also list virtual shared disk information using the vsdsklst command with the appropriate flags to indicate what kind of information you want to display. The following example shows the format of the information returned by vsdsklst for one node from the vsdsklst -dv -a command.

k7n12.ppd.pok.ibm.com
Node Number:12; Node Name:k7n12.ppd.pok.ibm.com
    Volume group:rootvg; Partition Size:4; Total:537; Free:315
        Physical Disk:hdisk0; Total:537; Free:315
    Volume group:vsdvg; Partition Size:4; Total:537; Free:533
        Physical Disk:hdisk1; Total:537; Free:533
        VSD Name:1HsD8n12{lv1HsD8n12}; Size:2
        VSD Name:1HsD20n12{lv1HsD20n12}; Size:2

Listing node information

To view virtual shared disk information using SMIT:

SELECT
List VSD Node Information

> A listing of VSD node information appears.

You can also display virtual shared disk node information using the vsdatalst command:

vsdatalst -n

Listing global volume group information

To view virtual shared disk global volume group information using SMIT:

SELECT
List VSD Global Volume Group Information

> A listing of VSD global volume group information appears.

You can also display virtual shared disk node information using the vsdatalst command:

vsdatalst -g

Listing defined Virtual Shared Disks

To view defined virtual shared disk information using SMIT:

SELECT
List Defined Virtual Shared Disks

> A listing of defined virtual shared disks appears.

You can also display defined virtual shared disk information using the vsdatalst command:

vsdatalst -v

Deleting Virtual Shared Disk information from the SDR

You can delete the virtual shared disk information you have stored in the SDR. Once you have defined virtual shared disk information in the SDR, you may want to delete or change (delete and add) information. To delete virtual shared disk definition information using SMIT (from the SP Configuration Database Management menu):

SELECT
Delete Database Information

> The Delete Database Information menu appears.

SELECT
Delete VSD Database Information

> The Delete VSD Database Information menu appears.

The fastpath invocation for this menu is:

smit delete_vsd

At this point, you can select options for deleting node and global volume group information and for undefining a virtual shared disk.

You can also use the removevsd or undefvsd commands to remove a virtual shared disk, a list of virtual shared disks, or all the virtual shared disks in a system or system partition. See the command reference pages for removevsd and undefvsd for more information.

Managing Virtual Shared Disks

Once virtual shared disks have been defined in the SDR, they can be configured to the system and managed to various states by using SMIT menus or commands.

Running any of the following commands affects the virtual shared disk states only on the node on which the command is run:

The SMIT panels use dsh to run the command on any number of nodes you select. The SMIT menus may be invoked from the control workstation. See Figure 19 for an overview of virtual shared disk states and associated commands.

In order for an application to be able to read or write vsd.nnn, vsd.nnn must be in the active state on both the client and server. Both cfgvsd and startvsd must be run on vsd.nnn. Once vsd.nnn is in the active state, the application may open /dev/rvsd.nnn, providing the permissions on the file permit access. For example, to allow an application on node 1 to access /dev/rvsd1vg1n1, cfgvsd and startvsd must have been run on node 1 for vsd1vg1n1. To allow access to vsd1vg1n1 from node 2, cfgvsd and startvsd must also be run on node 2. You may use cfgvsdhsd on all nodes instead of cfgvsd on each node.

Figure 19 summarizes virtual shared disk states, how I/O requests are treated in each state, and the commands (sometimes called methods) used to change states. New users should study Figure 19 to understand virtual shared disk operation.

If you use the IBM Recoverable Virtual Shared Disk software, do not issue any commands that change the state of the virtual shared disks (cfgvsd, startvsd, stopvsd, or ucfgvsd.) The IBM Recoverable Virtual Shared Disk software issues these commands for you.

Figure 19. Virtual Shared Disk States and Associated Commands

View figure.

To manage virtual shared disks using SMIT:

TYPE
smit

> The System Management menu appears

SELECT
SP System Management

> The SP System Management menu appears.

SELECT
SP Cluster Management

> The SP Cluster Management menu appears.

SELECT
VSD Management

> The VSD Management menu appears.

The fastpath invocation for this menu is:

smit vsd_mgmt
Note:
If you are not using the IBM Recoverable Virtual Shared Disk software and you want to bring up virtual shared disks automatically at boot time, all cfgvsd and startvsd (or preparevsd and resumevsd) commands can be run at boot time on all virtual shared disk nodes. Put these commands in a script that is invoked by either /etc/init.rc or /etc/inittab. This approach allows all virtual shared disk configuration to occur in parallel across the system partition as each machine boots up. You must ensure that each global volume group is varied on (using the varyonvg command) on the server node before running startvsd or resumevsd on the server node. If you subsequently install the IBM Recoverable Virtual Shared Disk software, make sure to undo these steps.

Configuring a Virtual Shared Disk

Configuring puts a defined virtual shared disk in the stopped state, but does not make it available. The virtual shared disk configuration method (cfgvsd) issues /usr/lpp/csd/bin/readSDR to extract information from the SDR and puts it into the flat files VSD_Global_Volume_Group, VSD_Table, VSD_ipaddr and Node in the /usr/lpp/csd/vsdfiles directory. Other virtual shared disk commands access these files.

Note:
Do not alter these files. Each cfgvsd command invocation recreates the files from the SDR information and any changes you make to the files will be lost. To make changes, update the SDR information.

Use cfgvsd with dsh to configure virtual shared disks on more than one node at a time.

To configure a virtual shared disk using SMIT (from the VSD Management menu):

SELECT
Configure a VSD

> The VSD and node selection lists appear.

You can also configure a virtual shared disk using the cfgvsd command.

To configure all virtual shared disks defined in the SDR to the node you are on, enter:
cfgvsd -a
To configure specific virtual shared disks defined in the SDR, enter:
cfgvsd vsd_name ...

Starting a Virtual Shared Disk

Starting a virtual shared disk puts a stopped one in the active (and available) state. (This is equivalent to preparing and resuming a virtual shared disk.) Note that for a virtual shared disk to be usable, it must be in the active state on both the server and client nodes.

To start a virtual shared disk using SMIT (from the VSD Management menu):

SELECT
Start a VSD

> The VSD and node selection lists appear.

You can also start a virtual shared disk using the startvsd command.

To start all virtual shared disks defined in the SDR to the node you are on, enter:

startvsd -a
To start specific virtual shared disks defined in the SDR, enter:
startvsd vsd_name ...

Preparing a Virtual Shared Disk

Preparing a virtual shared disk puts a stopped one in the suspended state. In the suspend state, open and close requests are honored. Read and write requests are held until the virtual shared disk is brought to the active state.

To prepare a virtual shared disk using SMIT (from the VSD Management menu):

SELECT
Prepare a VSD

> The VSD and node selection lists appear.

You can also prepare a virtual shared disk using the preparevsd command.

To prepare all virtual shared disks in the SDR, enter:

preparevsd -a
To prepare specific virtual shared disks defined in the SDR, enter:
preparevsd vsd_name ...

Resuming a Virtual Shared Disk

Resuming a virtual shared disk puts a suspended one in the active state. The virtual shared disk remains available and read and write requests that were held are resumed.

To resume a virtual shared disk using SMIT (from the VSD Management menu):

SELECT
Resume a VSD

> The VSD and node selection lists appear.

You can also resume a virtual shared disk using the resumevsd command.

To resume all virtual shared disks defined in the SDR, enter:

resumevsd -a
To resume a specific virtual shared disk defined in the SDR, enter:
resumevsd vsd_name ...

Suspending a Virtual Shared Disk

Suspending a virtual shared disk puts an active one in the suspended state. The virtual shared disk remains available and read and write requests that were active are suspended and held. All read and write requests subsequent to those that were active are also held.

To suspend a virtual shared disk using SMIT (from the VSD Management menu):

SELECT
Suspend a VSD

> The VSD and node selection lists appear.

You can also suspend a virtual shared disk using the suspendvsd command.

To suspend all virtual shared disks defined in the SDR, enter:

suspendvsd -a
To suspend specific virtual shared disks defined in the SDR, enter:
suspendvsd vsd_name ...

Stopping a Virtual Shared Disk

Stopping a virtual shared disk puts a suspended one in the stopped state. The virtual shared disk becomes unavailable. All applications that have outstanding requests to a stopped virtual shared disk terminate in error.

To stop a virtual shared disk using SMIT (from the VSD Management menu):

SELECT
Stop a VSD

> The VSD and node selection lists appear.

You can also stop a virtual shared disk using the stopvsd command.

To stop all virtual shared disks defined in the SDR, enter:

stopvsd -a
To stop specific virtual shared disks defined in the SDR, enter:
stopvsd vsd_name ...

Unconfiguring a Virtual Shared Disk

Unconfiguring a stopped virtual shared disk makes it inaccessible. It does not, however, undefine or change the definition information for the virtual shared disk in the SDR.

To unconfigure a virtual shared disk using SMIT (from the VSD Management menu):

SELECT
Unconfigure a VSD

> The VSD and node selection lists appear.

You can also unconfigure a virtual shared disk using the ucfgvsd command.

To unconfigure all virtual shared disks defined in the SDR, enter:
ucfgvsd
-a
To unconfigure specific virtual shared disks in the SDR, enter:
ucfgvsd vsd_name ...

Displaying managed Virtual Shared Disk characteristics

Configuration information for a virtual shared disk includes:

To display managed virtual shared disk characteristics for all virtual shared disks using SMIT (from the VSD Management menu):

SELECT
Show All Managed VSD Characteristics

> The VSD and node selection lists appear.

You can also display managed virtual shared disk characteristics using the lsvsd command. To display configuration information for specific virtual shared disks in your system, enter:

lsvsd -l vsd_name ...

Displaying managed Virtual Shared Disk statistics

Usage information includes:

To display managed virtual shared disk usage statistics for all virtual shared disks using SMIT (from the VSD Management menu):

SELECT
Show All Managed VSD Statistics

> The VSD and node selection lists appear.

You can also display managed virtual shared disk usage statistics using the lsvsd command. To display usage information for virtual shared disks in your system, enter:

lsvsd -s vsd_name ...
Note:
The number of blocks read and written is cumulative. To reset this count before you measure it, issue ctlvsd -V command .

Displaying Virtual Shared Disk device driver statistics

You might want to display usage information about the virtual shared disk device driver. Usage information includes:

To display usage information about the virtual shared disk device driver using SMIT (from the VSD Management menu):

SELECT
Show VSD Device Driver Statistics

> A node selection list appears.

You can also display virtual shared disk device driver usage statistics using the statvsd command:

statvsd

See the book PSSP: Command and Technical Reference for a description of these statistics.

Setting and displaying Virtual Shared Disk device driver operational parameters

You may wish to display and, in some cases, set virtual shared disk device driver operational parameters. Operational parameters include:

To display and set virtual shared disk device driver operational parameters using SMIT (from the VSD Management menu):

SELECT
Set/Show VSD Device Driver Operational Parameters

>Show VSD Device Driver Operational Parameters

>Reset Sequence Numbers

>Increase Cache Size

>Set Level of VSD Parallelism

>Reset VSD Device Driver Counters

>Reset a VSD's Statistics

>Reset All VSDs' Statistics

You can also display and set virtual shared disk device driver operational parameters using the ctlvsd command.

Testing to verify a Virtual Shared Disk (the Verification Test Suite)

Warning: The vsdvts command writes data to the virtual shared disk. Do not use the command after you have put real data on a virtual shared disk. Refer to the vsdvts command reference page.

To test that you have successfully installed the IBM Virtual Shared Disk software and that you can successfully define and make a virtual shared disk active, and then read and write to it, follow these steps:

  1. Make sure the switch or other network adapter is up and running.
  2. Create a logical volume. One physical partition will be enough space for it.
  3. Define the logical volume as a virtual shared disk in the SDR. Then, in the following commands, substitute the name of the virtual shared disk you defined for vsd.name. Commands are in /usr/lpp/csd/bin.
  4. Configure the virtual shared disk to your system. Enter:
    cfgvsd vsd_name
    
  5. Make the virtual shared disk available. Enter:
    preparevsd vsd_name
    
  6. Make the virtual shared disk active. Enter:
    resumevsd vsd_name
    
  7. Display configuration information about the virtual shared disk. Enter:
    lsvsd -l vsd_name
    

    The display should show that vsd.LV is in the active state.

  8. Confirm that the virtual shared disk Verification Test is successful. Enter:
    vsdvts vsd_name
    

    The command should complete within 15 seconds and you should get the message:

    VSD verification test successful!
    

You can use the vsdvts command to verify all of your virtual shared disks. Use it to verify both local and remote virtual shared disks. Run the cfgvsd and startvsd commands on all client and server nodes. Use the SMIT panels to verify that the panels work.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]