C H A P T E R  2

Initial Configuration Procedures

After you install the Sun StorageTek Availability Suite software and before you use it for the first time, you must configure certain files for the Point-in-Time Copy software and the Remote Mirror software. This chapter describes the required initial configuration procedures:

This chapter also describes the following topics for your information:


Overview of Initial Configuration Steps

TABLE 2-1 summarizes the required and optional initial configuration tasks.


TABLE 2-1 Initial Configuration Summary for the Availability Suite Software

Tasks

Instructions

  1. Configure the following files:
  2. /etc/hosts
  3. IP stack (IPv4 and IPv6)
  4. (Optional) /etc/services
  5. /etc/nsswitch.conf
  6. (Optional) /usr/kernel/drv/rdc.conf

Configuring System Files

  1. (Optional) Adjust the default number of volumes configured for use by the software.

Modifying Settings

  1. (Optional) Tune the asynchronous queue.

Sun StorageTek Availability Suite 4.0 Remote Mirror Software Administration Guide

  1. Choose the bitmap volumes.

Using Bitmap Volumes

  1. (Optional) Set up an optional Remote Mirror volume configuration file.

Using a Volume Set File



Configuring System Files

This section describes how to edit and check the following system files so that the Sun StorageTek Remote Mirror software runs properly:


procedure icon  To Edit the /etc/hosts File

This ensures that the host names in the /etc/hosts file are read and known by machines running the Remote Mirror software.

single-step bulletAdd the names and IP addresses of all machines you plan to use with the Remote Mirror software to the /etc/hosts file.

Edit this file on each machine where you are installing and running the Remote Mirror software.

 

Configuring the IP Stack (IPv4 and IPv6)

If you use the Internet Protocol version 6 (IPv6) transport protocol for replication, configure the IPv4 and IPv6 stack concurrently on the host for the interface where the Remote Mirror software is used. The IPv6 protocol provides increased addressability. For the Solaris 10 OS, see the System Administration Guide: IP Services for more information about IPv6.

To use the IPv6 protocol, define the IPv4 and IPv6 interfaces with the same name. You must define the primary and secondary hosts such that the same transport protocol is used by both machines.


procedure icon  To Set Up an IPv6 Address

This example procedure shows how to set your network interface to use IPv6 addresses. Use this procedure to test your Remote Mirror hosts connection. The following procedure assumes this configuration information:


Network interface

hme1

Primary host interface name

sndrpri

Secondary host interface name

sndrsec


1. Use a text editor to create the /etc/hostname6.hme1 file on both the primary host and the secondary host. On the primary host, add the interface name sndrpri to the file. On the secondary host, add the interface name sndrsec to the file. Save and close the files.


primary-host# more /etc/hostname6.hme1
sndrpri
secondary-host# more /etc/hostname6.hme1
sndrsec

2. Shut down and restart both machines to activate IPv6.


# /etc/shutdown -y -i 6 -g 0

3. After both machines reboot, get the IPv6 inet address for the hme1 interface address.

4. In the following example, the address is fe80::a00:20ff:febd:c33f/128


# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 2
        inet 127.0.0.1 netmask ff000000 
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 192.9.200.125 netmask ffffff00 broadcast 192.9.200.255
        ether 8:0:20:ae:85:fa 
lo0: flags=2000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6> mtu 8252 index 2
        inet6 ::1/128 
hme0: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 3
        ether 8:0:20:ae:85:fa 
        inet6 fe80::a00:20ff:feae:85fa/10 
hme1: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 4
			ether 8:0:20:bd:c3:3f 
        inet6 fe80::a00:20ff:febd:c33f/128 

5. Edit the /etc/inet/ipnodes file and add the inet address from Step 4, assigning the primary host address to sndrpri and the secondary host address to sndrsec. Do not include the /128 portion of the address.



Note - Ensure that the /etc/inet/ipnodes file on each system running the Remote Mirror software contains the IPv6 inet address and names of each system.



6. Save and close the file and then check the file contents.

In the following example, sndrsec is the secondary host interface name.


primary-host# more /etc/inet/ipnodes
#
# Internet host table
#
::1             localhost
127.0.0.1       localhost
fe80::a00:20ff:febd:c33f 												sndrpri
fe80::a00:20ff:fee1:195e 												sndrsec

7. Edit the /etc/nsswitch.conf file to make sure that ipnodes: points to files.

Look for the following text in the file and make sure the ipnodes: line is uncommented.


# consult /etc "files" only if nis is down. 
hosts: files nis [NOTFOUND=return] files
ipnodes: files

8. Add the host names and IPv6 inet primary addresses of all machines you plan to use with the Remote Mirror software to the /etc/hosts file on each machine.

Edit this file on each machine where you are installing and running the Remote Mirror software.



Note - If you do not complete this step (described in To Edit the /etc/hosts File), the following error message is displayedwhen you enable the Remote Mirror software:
sndradm: Error: neither sndrpri nor sndrsec is local



9. Ensure that one system can ping another and that these systems are using the IPv6 protocol.

To ping from the primary host, enter the following:


# ping -s sndrsec
PING sndrsec: 56 data bytes
64 bytes from sndrsec (fe80::a00:20ff:fee1:195e): icmp_seq=0. time=0. ms
64 bytes from sndrsec (fe80::a00:20ff:fee1:195e): icmp_seq=1. time=0. ms
64 bytes from sndrsec (fe80::a00:20ff:fee1:195e): icmp_seq=2. time=0. ms

To ping from the secondary host, enter the following:


# ping -s sndrpri
PING sndrpri: 56 data bytes
64 bytes from sndrpri (fe80::a00:20ff:febd:c33f): icmp_seq=0. time=0. ms
64 bytes from sndrpri (fe80::a00:20ff:febd:c33f): icmp_seq=1. time=0. ms
64 bytes from sndrpri (fe80::a00:20ff:febd:c33f): icmp_seq=2. time=0. ms 

10. Use the netstat(1M) command to verify that the interface has the correct IPv6 address and IPv6 name.

Use this command on both the sndrpri and sndrsec hosts. For example:


# netstat -in
Name  Mtu  Net/Dest      Address        Ipkts  Ierrs Opkts  Oerrs Collis Queue
lo0   8232 127.0.0.0     127.0.0.1      3844   0     3844   0     0      0
hme0  1500 192.0.0.0 											192.9.200.225 22007  0     1054   0     0      0
 
Name  Mtu  Net/Dest      Address        Ipkts  Ierrs Opkts  Oerrs Collis Queue
lo0   8252 ::1 										::1                         3844   0     3844   0     0
hme1  1500 fe80::a00:20ff:febd:c33f    fe80::a00:20ff:febd:c33f    43     0 65 0 0 

# netstat -i
Name  Mtu  Net/Dest      Address        Ipkts  Ierrs Opkts  Oerrs Collis Queue
lo0   8232 loopback      localhost      3844   0     3844   0     0      0
hme0  1500 arpanet 											rick1 						22038  0     1067   0     0      0
 
Name  Mtu  Net/Dest 									Address                     Ipkts  Ierrs Opkts  Oerrs Collis
lo0   8252 localhost localhost                   3844   0     3844   0     0
hme1  1500 sndrpri 									sndrpri                     43     0     65     0     0

 

procedure icon  To Edit the /etc/services File

Port 121 is the default port for use by the Remote Mirror rdc daemon.


# cat /etc/services
...
rdc 121/tcp # SNDR server daemon
...

If you change the port number, you must change it on all Remote Mirror hosts within this configuration set (that is, primary and secondary hosts, and all hosts in one-to-many, many-to-one, and multihop configurations).

1. Edit the /etc/services file on each machine running the Remote Mirror software.

2. Shutdown and restart all hosts to make that the new port number take effect.


procedure icon  To Edit the /etc/nsswitch.conf File

If the file includes the hosts: and services: entries, verify that files is placed before nis, nisplus, ldap, dns, or any other service that the machine is using. For example, for systems using the NIS naming service, the file contains the following lines:


hosts: files nis
services: files nis

single-step bulletIf the host and service entries are not correct, edit the file and save it.

If you are using the IPv6 protocol, see the changes for this file in Configuring the IP Stack (IPv4 and IPv6).


Modifying Settings

The following sections describe how to modify the Remote Mirror software settings.



Note - After editing the files in this section, shut down and restart your server using the shutdown command for changes to take effect. If you edit the rdc.conf file to use more than 64 volume sets, ensure that you have enough system resources such as a large swap space.



Setting the Bitmap Operation Mode

A bitmap maintained on disk can persist across a system crash, depending on the setting of rdc_bitmap_mode in /usr/kernel/drv/rdc.conf. The default setting is 1 (force bitmap writes for every write operation).

single-step bulletEdit the rdc.conf file and locate the following section. Edit the value for the bitmap mode, save the file, and close it.


#
# rdc_bitmap_mode
# - Sets the mode of the RDC bitmap operation, acceptable values are:
#   0 - autodetect bitmap mode depending on the state of SDBC (default).
#   1 - force bitmap writes for every write operation, so an update resync
#       can be performed after a crash or reboot.
#   2 - only write the bitmap on shutdown, so a full resync is
#       required after a crash, but an update resync is required after
#       a reboot.
#
rdc_bitmap_mode=1;

Increasing the Number of Volume Sets

The default number of configured volume sets is 64. To configure more than 64 volume sets, edit the rdc_max_sets field in the /usr/kernel/drv/rdc.conf file on each machine running the Remote Mirror software.

single-step bulletEdit the rdc.conf file and locate the following section. Edit the value for the volume sets, save the file, and close it.

For example, to use 128 sets, change the file as shown in the following section:


#
# rdc_max_sets
# - Configure the maximum number of RDC sets that can be enabled on
#   this host.  The actual maximum number of sets that can be enabled
#   will be the minimum of this value and nsc_max_devices (see
#   nsctl.conf) at the time the rdc kernel module is loaded.
#
rdc_max_sets=128;

Increasing the Storage Volume Device Limit

The Availability Suite software has a default limit of 4096 storage volumes. The default number of storage volume driver devices (that is, volumes) is set by the nsc_max_devices value in the nsctl.conf file.

The number of volumes is divided for use between the Remote Mirror and Point-in-Time Copy software. For example, if you use the point-in-time copy software only, you can have 1365 volume sets, each consisting of master, shadow, and bitmap volumes. If you use the Remote Mirror and Point-in-Time Copy software packages together, the number of volume sets is divided between the two packages.

Some installations might benefit from changing this limit. Sites with plenty of available memory can increase the limit if necessary to enable more storage volumes. Sites with limited available memory might benefit from lowering this limit, thus freeing up system resources.

single-step bulletEdit the nsctl.conf file and locate the nsc_max_devices field. Edit the value, save the file, and close it.


Initializing the Configuration Database and Starting Services Using dscfgadm

The startup and shutdown of the Availability Suite software is implemented through Service Management Facility (SMF) services, which may be administered using the dscfgadm utility.


# svcs |  grep nws_
online         Mar_14   svc:/system/nws_scm:default
online         Mar_14   svc:/system/nws_sv:default
online         Mar_14   svc:/system/nws_ii:default
online         Mar_14   svc:/system/nws_rdc:default
online         Mar_14   svc:/system/nws_rdcsyncd:default

The dscfgadm Utility

dscfgadm controls the Availability Suite configuration services by providing facilities to set the configuration location, and to enable and disable the Availability Suite services.


# dscfgadm [-x]

Usage

dscfgadm [-x ]

dscfgadm [-x ] -i

dscfgadm [-x ] -e [-r] [-p]

dscfgadm [-x ] -d [-r]

Options

-i displays information on the Availability Suite services

-e enables the Availability Suite SMF services (all, by default)

-d disables the Availability Suite SMF services (all, by default)

-r enables/disables the Remote Mirror software

-p enables the Point-in-Time Copy software

-x displays verbose debugging information

Initializing the Configuration Database and Starting Services

By default, Availability Suite services are not started, and no Availability Suite configuration database is present on the system. When dscfgadm is executed with no options (or with only -x), it runs in interactive mode. This mode allows you to initialize the local configuration database required by the Availability Suite software, and gives you the choice of starting the Availability Suite services at that time.

If you choose not to start the Availability Suite SMF services during the intialization of the database, you may start the SMF services later using the dscfgadm -e command.


 # dscfgadm -e



Note - The Availability Suite software is unusable until the Availability Suite services have been started.



Enabling or Disabling Services

To enable or disable services at a later time, use the -e and -d options with dscfgadm.


# dscfgadm -e

# dscfgadm -d

 

The default behavior acts upon all services, but the -r and -p options allow selectively disabling or enabling the Remote Mirror or Point-in-Time Copy services, respectively.



Note - Be sure to quiesce all application writes to the volumes in use by a service before disabling that service.





Note - Settings are persistent across system boots.




Using Bitmap Volumes

Both Point-in-Time Copy software and Remote Mirror software use raw volumes to store bitmaps. Bitmap files are not supported.

Suggested Location of Bitmap Volumes

Store bitmap raw volumes on a disk separate from the disk that contains its associated master and shadow volumes (for Point-in-Time Copy software) for replicated volumes (for Remote Mirror software). Configure RAID (such as mirrored partitions) for these bitmap volumes and ensure that the mirrored members are not stored on the same disk as the master and shadow volumes or replicated volumes.

When you use Point-in-Time Copy software in a clustered environment, the bitmap volume must be part of the same disk group or cluster resource group as the corresponding master or shadow volume.

Size Requirements for Bitmap Volumes

A bitmap volume's size is based on the size of the master volume and the type of volume set being created (independent, dependent, or compact dependent).

8 KBytes per 1 GBytes of master volume size (rounded-up to the nearest whole GByte), plus an additional 24 KByte for overhead.

For example, to shadow a 3 GByte master volume, the bitmap size must be (3 × 8 KBytes) + 24 KBytes, or 48 KBytes in size. A 50 GByte master volume requires a 424 KByte bitmap volume.

264 KByte per 1 GByte of master volume size (rounded up to the nearest whole GByte), plus an additional 24 KByte for overhead.

For example, to shadow a 3 GByte master volume, the bitmap size must be (3 × 264 KByte + 24 KByte, or 816 KByte in size. A 50 GByte master volume in a compact dependent shadow volume set requires a 13224 KBytes bitmap volume.

If you enable a shadow volume set with a bitmap that is too large, the shadow volume set is created even though space might be wasted. If you enable a shadow volume set with a bitmap that is too small, the enable command fails with an error message.

The Availability Suite software provides the dsbitmap utility to calculate the required size of a bitmap for a Point-in-Time Copy shadow volume set or a Remote Mirror volume set.

1. To obtain the size of a Point-in-Time Copy bitmap, use this command:


dsbitmap -p data-volume [bitmap-volume]

2. To obtain the size of a Remote Mirror bitmap, use this command:


dsbitmap -r data-volume [bitmap-volume]

Refer to the dsbitmap(1SCM) man page for more information on the dsbitmap utility.

 

 


Using a Volume Set File

When you enable the Remote Mirror software, you can specify an optional volume set file containing information about the volume set: volumes, primary and secondary hosts, bitmaps, operating mode, and so on. Use the sndradm -f volset-file option when you use a volume set file.

You can also enter information about each volume set from the command line, but it is convenient to put this information in a file when you have multiple volume sets. Another advantage is that you can operate on specific volume sets, excluding other sets from the operation. Unlike adding the volume sets to an I/O group, you can mix replication modes in a volume set file. The fields for the volume set file specified are:


phost pdev pbitmap shost sdev sbitmap ip {sync|async} [g io-groupname] [C tag] [q qdev]

TABLE 2-2 describes these fields. See the rdc.cf man page for more information about the volume set file format.

The following shows an example file entry:


atm10 /dev/vx/rdsk/oracle816/oratest /dev/vx/rdsk/oracle816/oratest_bm \atm20 /dev/vx/rdsk/oracle816/oratest /dev/vx/rdsk/oracle816/oratest_bm \ip sync g oragroup

 


TABLE 2-2 Fields for the Volume Set File

Field

Meaning

Description

phost

Primary host

Server on which the primary volume resides.

pdev

Primary device

Primary volume partition. Specify full path names only (for example, /dev/rdsk/c0t1d0s4).

pbitmap

Primary bitmap

Volume partition in which the bitmap of the primary partition is stored. Specify full path names only.

shost

Secondary host

Server on which the secondary volume resides.

sdev

Secondary device

Secondary volume partition. Specify full path names only.

sbitmap

Secondary bitmap

Volume partition in which the bitmap of the secondary partition is stored. Specify full path names only.

ip

Network transfer protocol

Specify ip.

sync | async

Operating mode

  • sync is the mode in which the I/O operation is confirmed as complete when the remote volume has been updated.
  • async is the mode in which the primary host I/O operation is confirmed as complete before updating the remote volume.

g io-groupname

I/O group name

I/O group name that can be specified using the g character. In the example, the name is oragroup.

C tag

Cluster tag

Tag that limits operations to only those Remote Mirror sets belonging to the cluster resource group.

q qdev

Disk queue volume

Volume to be used as a disk-based I/O queue for an asynchronous set or group. You must specify the full path name. For example: /dev/rdsk/clt2d0s6.


 


Backing Up Configuration Information

You must back up your Sun StorageTek, VERITAS Volume Manager, and Solaris Volume Manager configuration information on a regular basis. To make any volume set-related changes, use the /usr/sbin/iiadm command, described in the Sun StorageTek Availability Suite 4.0 Point-in-Time Copy Software Administration Guide, and consider the following:

You may wish to set up a cron(1M) job to periodically back up the configuration database automatically. In addition, back up the configuration information whenever you change your configuration, for example, adding and deleting volumes.


procedure icon  To Back Up Configuration Information

single-step bulletCopy the configuration database (/etc/dscfg_local) to a safe location.


# cp /etc/dscfg_local /var/backups/dscfg_db