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 Mirror the Root (/) File System  Previous   Contents   Next 
   
 

Example--Mirroring the Root (/) File System

The following example shows the creation of mirror d0 on the node phys-schost-1, which consists of submirror d10 on partition c0t0d0s0 and submirror d20 on partition c2t2d0s0. Disk c2t2d0 is a multiported disk, so the localonly property is enabled.
(Create the mirror)
# metainit -f d10 1 1 c0t0d0s0
d11: Concat/Stripe is setup
# metainit d20 1 1 c2t2d0s0
d12: Concat/Stripe is setup
# metainit d0 -m d10
d10: Mirror is setup
# metaroot d0
# lockfs -fa
 
(Move resource groups and device groups from phys-schost-1)
# scswitch -S -h phys-schost-1
 
(Reboot the node)
# shutdown -g0 -y -i6
 
(Attach the second submirror)
# metattach d0 d20
d0: Submirror d20 is attached
 
(Display the device-group node list)
# scconf -pvv | grep dsk/d2
Device group name:						dsk/d2
...
  (dsk/d2) Device group node list:		phys-schost-1, phys-schost-3
...
 
(Remove phys-schost-3 from the node list)
# scconf -r -D name=dsk/d2,nodelist=phys-schost-3
 
(Enable the localonly property)
# scconf -c -D name=dsk/d2,localonly=true
 
(Record the alternate boot path)
# ls -l /dev/rdsk/c2t2d0s0
lrwxrwxrwx  1 root     root          57 Apr 25 20:11 /dev/rdsk/c2t2d0s0 
-> ../../devices/node@1/pci@1f,0/pci@1/scsi@3,1/disk@2,0:a,raw

ProcedureHow to Mirror the Global Namespace

Use this procedure to mirror the global namespace, /global/.devices/node@nodeid.

  1. Become superuser on a node of the cluster.

  2. Put the global namespace slice in a single-slice (one-way) concatenation.

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

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

  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. Attach the second submirror to the mirror.

    This attachment starts a synchronization of the submirrors.
    # metattach mirror submirror2

  6. Edit the /etc/vfstab file entry for the /global/.devices/node@nodeid file system.

    Replace the names in the device to mount and device to fsck columns with the mirror name.
    # 
    vi /etc/vfstab
    #device        device        mount    FS     fsck    mount    mount
    #to mount      to fsck       point    type   pass    at boot  options
    #
    /dev/md/dsk/mirror /dev/md/rdsk/mirror /global/.devices/node@nodeid ufs 2 no global

  7. Repeat Step 1 through Step 6 on each remaining node of the cluster.

  8. Wait for the synchronization of the mirrors, started in Step 5, to complete.

    Use the metastat(1M) command to view mirror status and to verify that mirror synchronization if complete.
    # metastat mirror

  9. Is the disk that is used to mirror the global namespace physically connected to more than one node (multiported)?

    • If no, proceed to Step 10.

    • If yes, perform the following steps to enable the localonly property of the raw-disk device group for the disk used to mirror the global namespace. 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) 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 disk is mirrored.

      Only the node whose disk is 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.

  10. Do you intend to mirror file systems other than root (/) that cannot be unmounted?

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

 
 
 
  Previous   Contents   Next