Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
B.   Installing and Configuring Solstice DiskSuite/Solaris Volume Manager Software Installing and Configuring Solstice DiskSuite/Solaris Volume Manager Software How to Set the Number of Metadevice or Volume Names and Disksets  Previous   Contents   Next 
   
 

ProcedureHow to Create State Database Replicas


Note - If you used SunPlex Manager to install Solstice DiskSuite software, do not perform this procedure. Instead, go to Mirroring the Root Disk.


Perform this procedure on each node in the cluster.

  1. Become superuser on the cluster node.

  2. Create state database replicas on one or more local disks for each cluster node by using the metadb command.
    # metadb -af slice-1 slice-2 slice-3


    Tip - To provide protection of state data, which is necessary to run Solstice DiskSuite/Solaris Volume Manager software, create at least three replicas for each node. Also, you can place replicas on more than one disk to provide protection if one of the disks fails.


    See the metadb(1M) man page and your Solstice DiskSuite/Solaris Volume Manager documentation for details.

  3. Verify the replicas.
    # metadb

    The metadb command displays the list of replicas.

  4. Do you intend to mirror file systems on the root disk?

Example--Creating State Database Replicas

The following example shows three Solstice DiskSuite state database replicas. Each replica is created on a different disk. For Solaris Volume Manager, the replica size would be larger.
# metadb -af c0t0d0s7 c0t1d0s7 c1t0d0s7
# metadb
flags            first blk      block count
    a       u       16            1034         /dev/dsk/c0t0d0s7
    a       u       16          1034         /dev/dsk/c0t1d0s7
    a       u       16          1034         /dev/dsk/c1t0d0s7

Mirroring the Root Disk

Mirroring the root disk prevents the cluster node itself from shutting down because of a system disk failure. Four types of file systems can reside on the root disk. Each file-system type is mirrored by using a different method.

Use the following procedures to mirror each type of file system.


Note - Some of the steps in these mirroring procedures can cause an error message similar to the following, which is harmless and can be ignored.
metainit: dg-schost-1: d1s0: not a metadevice



Caution! Caution - For local disk mirroring, do not use /dev/global as the path when you specify the disk name. If you specify this path for anything other than cluster file systems, the system cannot boot.


ProcedureHow to Mirror the Root (/) File System

Use this procedure to mirror the root (/) file system.

  1. Become superuser on the node.

  2. Use the metainit(1M) command to put the root slice in a single-slice (one-way) concatenation.

    Specify the physical disk name of the root-disk slice (cNtXdYsZ).
    # metainit -f submirror1 1 1 root-disk-slice

  3. Create a second concatenation.
    # metainit submirror2 1 1 submirror-disk-slice

  4. Create a one-way mirror with one submirror.
    # metainit mirror -m submirror1


    Note - The metadevice or volume name for the mirror must be unique throughout the cluster.


  5. Run the metaroot(1M) command.

    This command edits the /etc/vfstab and /etc/system files so the system can be booted with the root (/) file system on a metadevice or volume.
    # metaroot mirror

  6. Run the lockfs(1M) command.

    This command flushes all transactions out of the log and writes the transactions to the master file system on all mounted UFS file systems.
    # lockfs -fa

  7. Move any resource groups or device groups from the node.
    # scswitch -S -h from-node
    -S

    Moves all resource groups and device groups

    -h from-node

    Specifies the name of the node from which to move resource or device groups

  8. Reboot the node.

    This command remounts the newly mirrored root (/) file system.
    # shutdown -g0 -y -i6

  9. Use the metattach(1M) command to attach the second submirror to the mirror.
    # metattach mirror submirror2

  10. Is the disk that is used to mirror the root disk physically connected to more than one node (multiported)?

    • If no, proceed to Step 11.

    • If yes, perform the following steps to enable the localonly property of the raw-disk device group for the disk used to mirror the root disk. You must enable the localonly property to prevent unintentional fencing of a node from its boot device if the boot device is connected to multiple nodes.

    1. If necessary, use the scdidadm(1M) -L command to display the full device-ID path name of the raw-disk device group.

      In the following example, the raw-disk device-group name dsk/d2 is part of the third column of output, which is the full device-ID path name.
      # scdidadm -L
      ...
      1         phys-schost-3:/dev/rdsk/c1t1d0     /dev/did/rdsk/d2

    2. View the node list of the raw-disk device group.

      Output looks similar to the following:
      # scconf -pvv | grep dsk/d2
      Device group name:						dsk/d2
      ...
        (dsk/d2) Device group node list:		phys-schost-1, phys-schost-3
      ...

    3. Does the node list contain more than one node name?

    4. Remove all nodes from the node list for the raw-disk device group except the node whose root disk you mirrored.

      Only the node whose root disk you mirrored should remain in the node list.
      # scconf -r -D name=dsk/dN,nodelist=node
      -D name=dsk/dN

      Specifies the cluster-unique name of the raw-disk device group

      nodelist=node

      Specifies the name of the node or nodes to remove from the node list

    5. Use the scconf(1M) command to enable the localonly property.

      When the localonly property is enabled, the raw-disk device group is used exclusively by the node in its node list. This usage prevents unintentional fencing of the node from its boot device if the boot device is connected to multiple nodes.
      # scconf -c -D name=rawdisk-groupname,localonly=true
      -D name=rawdisk-groupname

      Specifies the name of the raw-disk device group

      For more information about the localonly property, see the scconf_dg_rawdisk(1M) man page.

  11. Record the alternate boot path for possible future use.

    If the primary boot device fails, you can then boot from this alternate boot device. See "Troubleshooting the System" in Solstice DiskSuite 4.2.1 User's Guide or "Mirroring root (/) Special Considerations" in Solaris Volume Manager Administration Guide for more information about alternate boot devices.
    # ls -l /dev/rdsk/root-disk-slice

  12. Repeat Step 1 through Step 11 on each remaining node of the cluster.

    Ensure that each metadevice or volume name for a mirror is unique throughout the cluster.

  13. Do you intend to mirror the global namespace, /global/.devices/node@nodeid?

  14. Do you intend to mirror file systems than cannot be unmounted?

  15. Do you intend to mirror user-defined file systems?

 
 
 
  Previous   Contents   Next