Alternate Pathing 2.0 User's Guide
この本のみを検索
PDF 文書ファイルをダウンロードする

Overview of AP Operations

2

This section provides a summary overview of the major AP operations. You must log onto your Sun server as superuser to execute these commands. The rest of this chapter further describes the operations shown here. After you read through the chapter, you may wish to use this section as a quick reference guide.

Working with the AP Database

· To Create a Copy of the AP Database

* Execute apdb(1M) with its -c and -f options to specify the raw disk slice where you wish to create the database copy:

  # apdb -c /dev/rdsk/c0t1d0s4 -f  

The -f (force) option is necessary to create the first AP database copy. You must dedicate an entire disk partition, one that has at least 300KB, to each database copy.
For more information see Chapter 3, "Managing the AP Database".

· To View Database Properties

* Execute apconfig(1M) with its -D option as follows, where D stands for database:

  # apconfig -D  
  
  path: /dev/rdsk/c0t1d0s4  
  major: 32  
  minor: 12  
  timestamp: Thu Jul 27 16:24:27 1995  
  checksum: 687681819  
  corrupt: No  
  inaccessible: No  

For more information see Chapter 3, "Managing the AP Database".

· To View Uncommitted Disk Entries

* Execute apconfig(1M) with its -S and -u options as follows, where S stands for SCSI and u stands for uncommitted:

  # apconfig -S -u  
  
  c1      pln0  P A  
  c2      pln1  
          metadiskname(s):  
                  mc1t5d0  U  
                  mc1t4d0  U  
                  mc1t3d0  U  
                  mc1t2d0  U  
                  mc1t1d0  U  
                  mc1t0d0  U  

For more information see Chapter 4, "Using Meta-Disks and Disk Pathgroups".

· To View Committed Disk Entries

* Execute apconfig(1M) with its -S option, as follows, where S stands for SCSI:

  # apconfig -S  
  
  c1      pln0  P A  
  c2      pln1  
          metadiskname(s):  
                  mc1t5d0  R  
                  mc1t4d0  
                  mc1t3d0  
                  mc1t2d0  
                  mc1t1d0  
                  mc1t0d0  

For more information see Chapter 4, "Using Meta-Disks and Disk Pathgroups".

· To View Uncommitted Network Entries

* Execute apconfig(1M) with its -N and -u options, as follows, where N stands for network, and u stands for uncommitted:

  # apconfig -N -u  
  
  metanetwork:    mle0  U  
  physical devices:  
                  le2  
                  le0  P A  

· To View Committed Network Entries

* Execute apconfig(1M) with its -N option, as follows:

  # apconfig -N  
  
  metanetwork:    mle3  
  physical devices:  
                  le4  
                  le3  P A  

· To Delete a Copy of the AP Database

* Execute apdb(1M) with its -d and -f options, as follows, to specify the raw disk slice of the copy that you wish to delete:

  # apdb -d /dev/rdsk/c0t1d0s4 -f  

The -f (force) option is necessary to delete the second-to-last copy and the last copy.
For more information, see Chapter 3, "Managing the AP Database".

Working with Disk Pathgroups

· To Create a Disk Pathgroup

  1. Execute apdisk(1M) with its -c and -a options to create an uncommitted disk pathgroup.

    -p specifies the primary path, -a specifies the alternate path:


  # apdisk -c -p pln0 -a pln1  

  1. Execute apconfig(1M) with its -S and -u options to view the uncommitted disk entries in the database.

  1. Execute apdb(1M) with its -C option to commit the uncommitted database entries:


  # apdb -C  

Before continuing, you may wish to verify the results by using apconfig -S to view the committed disk entries in the database.
  1. Execute drvconfig(1M) to rebuild the entities in the devices directory for ap_dmd(7):


  # drvconfig -i ap_dmd  

  1. Execute the following ap_dmd(7) command to view the AP devices, to verify the results:


  # ls /devices/pseudo/ap_dmd*  

  1. Execute apconfig(1M) with its -R option to create symbolic links from the devices directory to the meta-disk slices:


  # apconfig -R  

  1. Execute the following command to view the symbolic links, to verify the results:


  # ls -l /dev/ap/dsk  

  1. Modify every reference that uses a physical device node (i.e., a path that begins with /dev/dsk or /dev/rdsk) to use the corresponding meta-disk device node (i.e., a path that begins with /dev/ap/dsk or /dev/ap/rdsk).

    If a partition is currently mounted under a physical path name, it should be unmounted and remounted under the meta-disk path name.

For more information, refer to "Creating Disk Pathgroups and Meta-Disks" on page 4-2.

· To Place Boot Disk Under AP Control

  1. Create a disk pathgroup for the boot disk, as described in the previous subsection.

  2. Run the apboot(1M) with the meta-disk name of the boot disk, for example:


  # apboot mc2t0d0  

For more information, see Chapter 5, "Using AP Boot Devices".

· To Remove a Boot Disk From AP Control

* Execute apboot(1M), specifing the physical device name of an alternate of the boot meta-disk currently specified in /etc/vfstab:

  # apboot c2t0d0  

For more information, see Chapter 5, "Using AP Boot Devices".

· To Switch from One Disk Pathgroup To Another

  1. Use the apconfig(1M) command with -P and -a:


  # apconfig -P pln0 -a pln1  

-P specifies the primary adapter of the pathgroup for which you wish to change the active alternate. -a specifies the alternate that you wish to make active.
  1. You may wish to verify the results by running apconfig(1M) with its -S option to view the committed meta-disks in the database. Note that you do not have to commit a switch operation.

For more information, see "Switching Disk Pathgroups" on page 4-6.

· To Delete a Disk Pathgroup

  1. Execute apdisk(1M) with its -d option to specify the primary path:


  # apdisk -d pln0  

  1. Execute apconfig(1M) with -S option to view the committed SCSI disk entries in the database, to verify the operation.

    If the pathgroup was previously committed, it is still committed and fully functional at this point.

  2. Execute the following apdb(1M) command to commit the database entries, thereby completing the deletion:


  # apdb -C  

For more information, see "Deleting Disk Pathgroups" on page 4-8.

Working with Network Pathgroups

· To Create Network Pathgroup

  1. Execute apnet(1M) to create a meta-network name. Use the -c option to specify the primary network and the -p option to specify the alternate network:


  # apnet -c -p le0 -a le2  

  1. Execute apconfig(1M) with its -N and -u options to view the uncommitted network entries in the database, to verify the operation.

  2. Execute apdb(1M) to commit the network pathgroup in the database:


  # apdb -C  

  1. Execute apconfig(1M) with its -N option to view the committed network entries in the database, to verify the results.

  2. Before you can use a meta-network, you must remove all direct usage of the physical devices that make up the pathgroup.

    a. You may have to unplumb the physical interface. b. Use ifconfig(1M) to bring up the meta-network in the usual manner, but use the meta-network name instead of the physical network name.

    c. Remove or rename the /etc/hostname.xxx for all interfaces that have been made AP alternates, since direct usage of the physical paths must not occur.

For more information, see "Creating Network Pathgroups and Meta-Networks" on page 6-2.

· To Switch a Network Pathgroup (Ethernet or FIDDI)

  1. Execute apconfig(1M) with its -P and -a options to switch from one alternate path to another within an Ethernet or FDDI network pathgroup:


  # apconfig -P mle0 -a le2  

-P specifies the name of the meta-network. -a specifies the alternate path that you wish to make active.
  1. Execute apconfig(1M) with its -P option to view the committed meta-networks in the database, to verify the results.

    Note that you do not have to commit a switch operation.

For more information, see "Switch Ethernet or FDDI Pathgroup" on page 6-5.

· To Delete a Network Pathgroup

  1. Execute apnet(1M) with its -d option to specify the meta-network name:


  # apnet -d mle0  

  1. Execute apconfig(1M) with its -N option to view the committed network entries in the database, to verify the operation.

    If the pathgroup was previously committed, it is still committed and fully functional at this point.

  2. Execute apdb(1M)with its -C option to commit the database entries, thereby completing the deletion:


  # apdb -C