久々のHP-UXネタで御座います。
ん?、今頃Serviceguardネタ? と思ったアナタ!
…そう、今頃です(ぇ

何で今頃Serviceguardをやろうと思ったかと言うと理由は2つ
・cDSF(Cluster DSF)を使ってみよう!
・Serivceugard簡易配置とは何ぞ?

≪Cluster DSF≫
クラスタシステムの場合はなるべく構成を合わせるのが普通だと思いますので、あんまり使うことは無いと思うcDSF… 知らない人が居ても不思議はないヤツです。
クラスタシステム間のデバイスファイルは、意図的に合わせない限りはすんなり同じデバイス名になってくれない事が多いのですが、それを自動的に統一された専用のデバイスファイルを作成してくれる機能でして…
実は、使用を推奨するとか書かれていたり…. 🙄
ちなみに、September 2010 FusionリリースのServiceguardから利用可能な機能になっています。

≪Serviceguard簡易配置≫
Serviceguardを構成するにあたって、お膳立てが必要だったり複数台のシステムに対して同じ共有ボリュームを作成する必要があったりしますが、そこらへんをサクっと解決してくれる機能らしいです。
基本的なServiceguard構成にしか適応できませんが、まぁこんな構成方法もあるよ… と。 😎

● 作業前の状態 ●
# cat /etc/hosts
# @(#)B.11.31_LRhosts $Revision: 1.9.214.1 $ $Date: 96/10/08 13:20:01 $
#
# The form for each entry is:
# <internet address>    <official hostname> <aliases>
#
# For example:
# 192.1.2.34    hpfcrm  loghost
#
# See the hosts(4) manual page for more information.
# Note: The entries cannot be preceded by a space.
#       The format described in this file is the correct format.
#       The original Berkeley manual page contains an error in
#       the format description.
#
127.0.0.1       localhost       loopback
172.20.150.203  clhost01
172.20.0.203    clhost01bk
192.168.0.1     clhost01hb
172.20.150.204  clhost02
172.20.0.204    clhost02bk
192.168.0.2     clhost02hb

# ioscan -fnNkC disk
Class     I  H/W Path  Driver S/W State   H/W Type     Description
===================================================================
disk      8  64000/0xfa00/0x0  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/disk/disk8      /dev/disk/disk8_p3   /dev/rdisk/disk8_p2
                      /dev/disk/disk8_p1   /dev/rdisk/disk8     /dev/rdisk/disk8_p3
                      /dev/disk/disk8_p2   /dev/rdisk/disk8_p1
disk    201  64000/0xfa00/0x1  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                       /dev/disk/disk100   /dev/rdisk/disk100
disk    202  64000/0xfa00/0x2  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/disk/disk202   /dev/rdisk/disk202
disk    203  64000/0xfa00/0x3  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/disk/disk203   /dev/rdisk/disk203
disk    204  64000/0xfa00/0x4  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/disk/disk204   /dev/rdisk/disk204
disk    205  64000/0xfa00/0x5  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/disk/disk205   /dev/rdisk/disk205
disk    206  64000/0xfa00/0x6  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/disk/disk206   /dev/rdisk/disk206
disk    207  64000/0xfa00/0x7  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/disk/disk207   /dev/rdisk/disk207

作業前の状態としては、Serviceguardを構成するノードの名前解決のみhostsに記載しています。
nsswitch.confは未作成、DNSは未使用の状態、デバイスファイル名は適当でクラスタ間ではLockLUN(/dev/disk/disk100)を除いては異なるデバイス名になっています。(※理由は後述)

大ざっぱですが、Serviceguard管理者ガイドに則ってやってみます。

● 環境変数を読み込むようにプロファイルに追記 ●
# vi /.profile
≪省略≫
. /etc/cmcluster.conf ⇐ 末尾に追記
● SSH公開/秘密鍵ペア設定 ●
# vi /etc/cmcluster/sshhosts
clhost01
clhost02
# csshsetup -r -f /etc/cmcluster/sshhosts
Unable to determine the local DNS domain
Unable to determine the local DNS domain
Unable to determine the local DNS domain
Please be patient....   Key generation may take a few minutes
If asked, enter password and/or add fingerprint for root@clhost02
The authenticity of host 'clhost02 (172.20.150.204)' can't be established.
ECDSA key fingerprint is fc:13:ba:24:75:09:21:ab:a2:59:e4:aa:ab:16:37:f7.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'clhost02,172.20.150.204' (ECDSA) to the list of known hosts.
Password:
Please be patient....   Key generation may take a few minutes
Testing...
Success: clhost01 -> clhost01
Success: clhost01 -> clhost02
Success: clhost02 -> clhost01
Success: clhost02 -> clhost02
# ll /.ssh/
total 64
-rw-r--r--   1 root       sys            790 Oct 21 16:12 authorized_keys2
-rw-------   1 root       sys           1679 Oct 21 16:12 id_rsa
-rw-r--r--   1 root       sys            395 Oct 21 16:12 id_rsa.pub
-rw-r--r--   1 root       sys            888 Oct 21 16:12 known_hosts

/etc/cmcluster/sshhostsファイルにクラスタを構成するノードの名前を書いたファイルを作成し、そのファイルを指定してcsshsetupコマンドを叩くと、ルート直下の.sshディレクトリ配下に自動的にキーファイルが作成されました。

● クラスタルートアクセス構成 ●
# cmpreparecl -n clhost01 -n clhost02
Running cmpreparecl on nodes clhost01 clhost02
Saving command output to /var/adm/cmcluster/sgeasy/easy_deployment.log
Running cmpreparecl on nodes clhost01 clhost02
Adding entries to clhost01:/etc/cmcluster/cmclnodelist so cmpreparecl works
Adding entries to clhost02:/etc/cmcluster/cmclnodelist so cmpreparecl works
Connecting to clhost02 via SSH as root.
Configuring cmclnodelist on clhost01.
“clhost02 root” added to /etc/cmcluster/sgeasy/backup/clhost01/new/cmclnodelist
Changing cmclnodelist permissions to 644 on node clhost01
Commenting out line
 ‘auth         stream tcp6 nowait bin  /usr/lbin/identd   identd ‘
 ininetd.conf on node clhost01.
Adding
 auth stream tcp6 wait bin /usr/lbin/identd identd -t120

 to inetd.conf on node clhost01.
Generating an updated inetd.conf for clhost01.
Updating /etc/hosts on clhost01 to contain all cluster node IP addresses.
Adding names
 clhost01 clhost01 to address 172.20.0.203
in /etc/hosts on clhost01.
Adding names
 clhost01 clhost01 to address 192.168.0.1
in /etc/hosts on clhost01.
Adding names
 clhost02 clhost02 to address 172.20.0.204
in /etc/hosts on clhost01.
Adding names
 clhost02 clhost02 to address 192.168.0.2
in /etc/hosts on clhost01.
Finalizing update of /etc/hosts on node clhost01.
Adding
 'host: files dns'
entry to /etc/nsswitch.conf on node clhost01.
Finalizing /etc/nsswitch.conf file on node clhost01
Configuring cmclnodelist on clhost02.
"clhost02 root" added to /etc/cmcluster/sgeasy/backup/clhost02/new/cmclnodelist
Changing cmclnodelist permissions to 644 on node clhost02
Commenting out line
 'auth         stream tcp6 nowait bin  /usr/lbin/identd   identd '
 ininetd.conf on node clhost02.
Adding
 auth stream tcp6 wait bin /usr/lbin/identd identd -t120
 to inetd.conf on node clhost02.
Generating an updated inetd.conf for clhost02.
Updating /etc/hosts on clhost02 to contain all cluster node IP addresses.
Adding names
 clhost01 clhost01 to address 172.20.0.203
in /etc/hosts on clhost02.
Adding names
 clhost01 clhost01 to address 192.168.0.1
in /etc/hosts on clhost02.
Adding names
 clhost02 clhost02 to address 172.20.0.204
in /etc/hosts on clhost02.
Adding names
 clhost02 clhost02 to address 192.168.0.2
in /etc/hosts on clhost02.
Finalizing update of /etc/hosts on node clhost02.
cmcp: Failed to get attributes for /etc/nsswitch.conf on clhost02
Adding
 'host: files dns'
entry to /etc/nsswitch.conf on node clhost02.
Finalizing /etc/nsswitch.conf file on node clhost02

クラスタを構成するノードを引数に指定してcmprepareclコマンドを叩きます… すると。 😉

# cat /etc/hosts
# @(#)B.11.31_LRhosts $Revision: 1.9.214.1 $ $Date: 96/10/08 13:20:01 $
#
# The form for each entry is:
# <internet address>    <official hostname> <aliases>
#
# For example:
# 192.1.2.34    hpfcrm  loghost
#
# See the hosts(4) manual page for more information.
# Note: The entries cannot be preceded by a space.
#       The format described in this file is the correct format.
#       The original Berkeley manual page contains an error in
#       the format description.
#
127.0.0.1       localhost       loopback
172.20.150.203  clhost01
172.20.0.203    clhost01bk clhost01 clhost01  # MODIFIED BY Serviceguard at 2014_10_21_16:15:51
192.168.0.1     clhost01hb clhost01 clhost01  # MODIFIED BY Serviceguard at 2014_10_21_16:15:51
172.20.150.204  clhost02
172.20.0.204    clhost02bk clhost02 clhost02  # MODIFIED BY Serviceguard at 2014_10_21_16:15:51
192.168.0.2     clhost02hb clhost02 clhost02  # MODIFIED BY Serviceguard at 2014_10_21_16:15:51
# Added by Serviceguard on 2014_10_21_16:15:51
# cat /etc/nsswitch.conf
hosts: files dns # Added by Serviceguard on 2014_10_21_16:15:51
# grep identd /etc/inetd.conf
# auth         stream tcp6 nowait bin  /usr/lbin/identd   identd
auth stream tcp6 wait bin /usr/lbin/identd identd -t120
# cat /etc/cmcluster/cmclnodelist
clhost01 root #Added automatically by Serviceguard on 2014_10_21_16:15:51
clhost02 root #Added automatically by Serviceguard on 2014_10_21_16:15:51

緑色になっている部分が、コマンドによって自動的に追加された部分です。hostsファイルに時ホスト名のエイリアスが追加されていますね。同じホスト名が連続しているのは、この環境ではDNSを構成していなかったためだと思われます。(本来なら、真ん中のホスト名はFQDN付きになる)
存在しなかったnsswitch.confとcmclnodelistは作成され、inetd.confファイルはが変更されました。

nsswitch.conf の書き方はコレが推奨される書き方では無かったと思いますので、この後で変更が必要かと思います。
あと気になるのは、inetd.confですよね。-t120オプションが追加されています。セッションを120秒で自動的に閉じる様にするセキュリティオプションになります。
これも一応は使用が推奨されているオプションになっています…

● ネットワーク情報の取得 ●
# cmquerycl -N $SGCONF/mynetwork -n clhost01 -n clhost02
Warning: Unable to determine local domain name for clhost01
Node Names:    clhost01
               clhost02
Bridged networks (full probing performed):
1       lan0           (clhost01)
        lan0           (clhost02)
2       lan1           (clhost01)
        lan1           (clhost02)
3       lan2           (clhost01)
        lan2           (clhost02)
4       lan3           (clhost01)
        lan4           (clhost01)
        lan3           (clhost02)
        lan4           (clhost02)
IP subnets:
IPv4:
172.20.128.0       lan0      (clhost01)
                   lan0      (clhost02)
192.168.0.0        lan1      (clhost01)
                   lan1      (clhost02)
172.20.0.0         lan2      (clhost01)
                   lan2      (clhost02)
IPv6:
Route Connectivity (full probing performed):
IPv4:
1   172.20.128.0
2   192.168.0.0
3   172.20.0.0

$SGCONF/mynetworkファイルに現状のネットワーク構成が吐き出されます。ネットワークの構成が実際と異なる場合には、このファイルを修正してあげるみたいです。

● Cluster DSF (cDSF) の作成 ●
# cmsetdsfgroup -n clhost01 -n clhost02
Cluster device file group configuration set to 'clhost01 clhost02'.

Cluster DSFの作成は意外と簡単で、cmsetdsfgroupコマンドの引数にクラスタ構成ノード名を付けるだけです。

# ll /dev/cdisk/
total 0
brw-r-----   1 bin        sys          1 0x000001 Oct 20 15:14 disk1
brw-r-----   1 bin        sys          1 0x000002 Oct 20 15:14 disk2
brw-r-----   1 bin        sys          1 0x000003 Oct 20 15:14 disk3
brw-r-----   1 bin        sys          1 0x000004 Oct 20 15:14 disk4
brw-r-----   1 bin        sys          1 0x000005 Oct 20 15:14 disk5
brw-r-----   1 bin        sys          1 0x000006 Oct 20 15:14 disk6
brw-r-----   1 bin        sys          1 0x000007 Oct 20 15:14 disk7
# ll /dev/rcdisk/
total 0
crw-r-----   1 bin        sys         13 0x000001 Oct 20 15:14 disk1
crw-r-----   1 bin        sys         13 0x000002 Oct 20 15:14 disk2
crw-r-----   1 bin        sys         13 0x000003 Oct 20 15:14 disk3
crw-r-----   1 bin        sys         13 0x000004 Oct 20 15:14 disk4
crw-r-----   1 bin        sys         13 0x000005 Oct 20 15:14 disk5
crw-r-----   1 bin        sys         13 0x000006 Oct 20 15:14 disk6
crw-r-----   1 bin        sys         13 0x000007 Oct 20 15:14 disk7
# ioscan -fnNkC disk
Class     I  H/W Path  Driver S/W State   H/W Type     Description
===================================================================
disk      8  64000/0xfa00/0x0  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/disk/disk8      /dev/disk/disk8_p3   /dev/rdisk/disk8_p2
                      /dev/disk/disk8_p1   /dev/rdisk/disk8     /dev/rdisk/disk8_p3
                      /dev/disk/disk8_p2   /dev/rdisk/disk8_p1
disk    201  64000/0xfa00/0x1  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/cdisk/disk1    /dev/disk/disk100   /dev/rcdisk/disk1   /dev/rdisk/disk100
disk    202  64000/0xfa00/0x2  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/cdisk/disk2    /dev/disk/disk202   /dev/rcdisk/disk2   /dev/rdisk/disk202
disk    203  64000/0xfa00/0x3  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/cdisk/disk3    /dev/disk/disk203   /dev/rcdisk/disk3   /dev/rdisk/disk203
disk    204  64000/0xfa00/0x4  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/cdisk/disk4    /dev/disk/disk204   /dev/rcdisk/disk4   /dev/rdisk/disk204
disk    205  64000/0xfa00/0x5  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/cdisk/disk5    /dev/disk/disk205   /dev/rcdisk/disk5   /dev/rdisk/disk205
disk    206  64000/0xfa00/0x6  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/cdisk/disk6    /dev/disk/disk206   /dev/rcdisk/disk6   /dev/rdisk/disk206
disk    207  64000/0xfa00/0x7  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/cdisk/disk7    /dev/disk/disk207   /dev/rcdisk/disk7   /dev/rdisk/disk207
# cmsetdsfgroup -q
clhost01
clhost02

ioscanの結果を見ると一目瞭然ですが、クラスタシステム間で一意の/dev/cdisk/diskXという緑色部分のデバイス名が作成されていることが分かります。
なお、現在どのノード間とcDSFを構成しているのかは、cmsetdsfgroup -q というコマンドで確認できます。

● クラスタの作成 ●
cmdeploycl -c test_cluster -n clhost01 -n clhost02 -N $SGCONF/mynetwork -b -L vglock:/dev/cdisk/disk1 (vglockを作成する場合)
cmdeploycl -c test_cluster -n clhost01 -n clhost02 -N $SGCONF/mynetwork -L /dev/disk/disk100     (locklunを使用する場合)

クラスタの作成には、cmdeplyclというコマンドを使用します。これを使用するとクラスタを構成するのに必要なvglockなどを自動的に作成してくれる優れものです。

# cmdeploycl -c test_cluster -n clhost01 -n clhost02 -N $SGCONF/mynetwork -L /dev/disk/disk100
Running cmdeploycl on nodes clhost01 clhost02
Saving subcommand output to /var/adm/cmcluster/sgeasy/easy_deployment.log
Running cmdeploycl on nodes clhost01 clhost02
Calling cmpreparecl (/usr/sbin/cmpreparecl -n clhost01 -n clhost02  )
cmpreparecl may take a while to complete ...
Command cmpreparecl succeeded
Calling cmapplyconf (/usr/sbin/cmapplyconf -v -N /mynetwork)
cmapplyconf may take a while to complete ...
Command cmapplyconf succeeded
Calling cmquerycl (/usr/sbin/cmquerycl -v -w full -n clhost01 -L /dev/disk/disk100 -n clhost02 -L /dev/disk/disk100  -C /etc/cmcluster/sgeasy/cluster.ascii.generated)
cmquerycl may take a while to complete ...
Command cmquerycl succeeded
Calling cmapplyconf (/usr/sbin/cmapplyconf -v -C /etc/cmcluster/sgeasy/cluster.ascii )
cmapplyconf may take a while to complete ...
Command cmapplyconf succeeded
Calling cmruncl (/usr/sbin/cmruncl -v -w none )
cmruncl may take a while to complete ...
Command cmruncl succeeded
CLUSTER        STATUS
test_cluster   up
  NODE           STATUS       STATE
  clhost01       up           running
    Cluster_Lock_LUN:
    DEVICE                STATUS
    /dev/disk/disk100     up
    Network_Parameters:
    INTERFACE    STATUS                     PATH                NAME
    PRIMARY      up                         0/0/1/0             lan0
    PRIMARY      up                         0/0/2/0             lan1
    PRIMARY      up                         0/0/4/0             lan2
  NODE           STATUS       STATE
  clhost02       up           running
    Cluster_Lock_LUN:
    DEVICE                STATUS
    /dev/disk/disk100     up
    Network_Parameters:
    INTERFACE    STATUS                     PATH                NAME
    PRIMARY      up                         0/0/1/0             lan0
    PRIMARY      up                         0/0/2/0             lan1
    PRIMARY      up                         0/0/4/0             lan2
Cluster configuration saved to /etc/cmcluster/sgeasy/cluster.ascii

LockLUNを作成する際に、cDSFを指定してみたのですがうまくいきませんでした。多分バグかなぁ… 😥
/etc/cmcluster/sgeasy/cluster.ascii ファイルに構成が書き出されるので、これを適当な領域にコピーして必要な個所を修正し、バイナリの再作成をするのがいいかと思います。

● 共有ボリュームグループの作成 ●
# cmpreparestg -l vg10 -p /dev/cdisk/disk2
Running cmpreparestg on nodes
Saving command output to /var/adm/cmcluster/sgeasy/easy_deployment.log
Running cmpreparestg on nodes
Checking cluster on clhost01: /usr/sbin/cmviewcl -f line -s config
Using node clhost01
Using node clhost02
checking serviceguard version on clhost01: /usr/sbin/cmversion 2> /dev/null
checking serviceguard version on clhost02: /usr/sbin/cmversion 2> /dev/null
Checking /etc/lvmtab on clhost01: /usr/bin/ls /etc/lvmtab
Validating vg10 existence on clhost01: /usr/bin/strings /etc/lvmtab
Checking /etc/lvmtab_p on clhost01: /usr/bin/ls /etc/lvmtab_p
Validating vg10 existence on clhost01: /usr/bin/strings /etc/lvmtab_p
Checking /etc/lvmtab on clhost02: /usr/bin/ls /etc/lvmtab
Validating vg10 existence on clhost02: /usr/bin/strings /etc/lvmtab
Checking /etc/lvmtab_p on clhost02: /usr/bin/ls /etc/lvmtab_p
Validating vg10 existence on clhost02: /usr/bin/strings /etc/lvmtab_p
Preparing disk for LVM volume group vg10 on clhost01: /usr/sbin/pvcreate /dev/rcdisk/disk2
Creating LVM volume group on clhost01: /usr/sbin/vgcreate  /dev/vg10 /dev/cdisk/disk2
Deactivating LVM volume group on clhost01: /usr/sbin/vgchange -a n /dev/vg10
Exporting vg definition on clhost01: /usr/sbin/vgexport -s -v -p -m /var/tmp/vg10.map.7834 /dev/vg10
Checking /etc/lvmtab on clhost02: /usr/bin/ls /etc/lvmtab
Validating vg10 existence on clhost02: /usr/bin/strings /etc/lvmtab
Checking /etc/lvmtab_p on clhost02: /usr/bin/ls /etc/lvmtab_p
Validating vg10 existence on clhost02: /usr/bin/strings /etc/lvmtab_p
Copying map file on clhost01: /usr/sbin/cmcp /var/tmp/vg10.map.7834 clhost02:/var/tmp/vg10.map.7834
Importing vg on clhost02: /usr/sbin/vgimport -m /var/tmp/vg10.map.7834 /dev/vg10 /dev/cdisk/disk2
Removing mapfile on clhost02: /usr/bin/rm /var/tmp/vg10.map.7834
Removing mapfile on clhost01: /usr/bin/rm -r /var/tmp/vg10.map.7834

空の共有VGの(/dev/vg10)を作るのであれば、コレだけでOK。

# cmpreparestg -l vg11 -p /dev/cdisk/disk3 -p /dev/cdisk/disk4
Running cmpreparestg on nodes
Saving command output to /var/adm/cmcluster/sgeasy/easy_deployment.log
Running cmpreparestg on nodes
Checking cluster on clhost01: /usr/sbin/cmviewcl -f line -s config
Using node clhost01
Using node clhost02
checking serviceguard version on clhost01: /usr/sbin/cmversion 2> /dev/null
checking serviceguard version on clhost02: /usr/sbin/cmversion 2> /dev/null
Checking /etc/lvmtab on clhost01: /usr/bin/ls /etc/lvmtab
Validating vg11 existence on clhost01: /usr/bin/strings /etc/lvmtab
Checking /etc/lvmtab_p on clhost01: /usr/bin/ls /etc/lvmtab_p
Validating /vg11 existence on clhost01: /usr/bin/strings /etc/lvmtab_p
Checking /etc/lvmtab on clhost02: /usr/bin/ls /etc/lvmtab
Validating vg11 existence on clhost02: /usr/bin/strings /etc/lvmtab
Checking /etc/lvmtab_p on clhost02: /usr/bin/ls /etc/lvmtab_p
Validating vg11 existence on clhost02: /usr/bin/strings /etc/lvmtab_p
Preparing disk for LVM volume group vg11 on clhost01: /usr/sbin/pvcreate /dev/rcdisk/disk3
Preparing disk for LVM volume group vg11 on clhost01: /usr/sbin/pvcreate /dev/rcdisk/disk4
Creating LVM volume group on clhost01: /usr/sbin/vgcreate  /dev/vg11 /dev/cdisk/disk3 /dev/cdisk/disk4
Deactivating LVM volume group on clhost01: /usr/sbin/vgchange -a n /dev/vg11
Exporting vg definition on clhost01: /usr/sbin/vgexport -s -v -p -m /var/tmp/vg11.map.7889 /dev/vg11
Checking /etc/lvmtab on clhost02: /usr/bin/ls /etc/lvmtab
Validating vg11 existence on clhost02: /usr/bin/strings /etc/lvmtab
Checking /etc/lvmtab_p on clhost02: /usr/bin/ls /etc/lvmtab_p
Validating vg11 existence on clhost02: /usr/bin/strings /etc/lvmtab_p
Copying map file on clhost01: /usr/sbin/cmcp /var/tmp/vg11.map.7889 clhost02:/var/tmp/vg11.map.7889
Importing vg on clhost02: /usr/sbin/vgimport -m /var/tmp/vg11.map.7889 /dev/vg11 /dev/cdisk/disk3 /dev/cdisk/disk4
Removing mapfile on clhost02: /usr/bin/rm /var/tmp/vg11.map.7889
Removing mapfile on clhost01: /usr/bin/rm -r /var/tmp/vg11.map.7889

複数のディスクを使用したVG(/dev/vg11)の場合はこんな感じです。

# cmpreparestg -l vg12 -p /dev/cdisk/disk5 -p /dev/cdisk/disk6 -o vg_opts="-V 2.0 -s 64 -S 100g"
Running cmpreparestg on nodes
Saving command output to /var/adm/cmcluster/sgeasy/easy_deployment.log
Running cmpreparestg on nodes
Checking cluster on clhost01: /usr/sbin/cmviewcl -f line -s config
Using node clhost01
Using node clhost02
checking serviceguard version on clhost01: /usr/sbin/cmversion 2> /dev/null
checking serviceguard version on clhost02: /usr/sbin/cmversion 2> /dev/null
Checking /etc/lvmtab on clhost01: /usr/bin/ls /etc/lvmtab
Validating vg12 existence on clhost01: /usr/bin/strings /etc/lvmtab
Checking /etc/lvmtab_p on clhost01: /usr/bin/ls /etc/lvmtab_p
Validating vg12 existence on clhost01: /usr/bin/strings /etc/lvmtab_p
Checking /etc/lvmtab on clhost02: /usr/bin/ls /etc/lvmtab
Validating vg12 existence on clhost02: /usr/bin/strings /etc/lvmtab
Checking /etc/lvmtab_p on clhost02: /usr/bin/ls /etc/lvmtab_p
Validating vg12 existence on clhost02: /usr/bin/strings /etc/lvmtab_p
Preparing disk for LVM volume group /vg12 on clhost01: /usr/sbin/pvcreate /dev/rcdisk/disk5
Preparing disk for LVM volume group /vg12 on clhost01: /usr/sbin/pvcreate /dev/rcdisk/disk6
Creating LVM volume group on clhost01: /usr/sbin/vgcreate -V 2.0 -s 64 -S 100g /dev/vg12 /dev/cdisk/disk5 /dev/cdisk/disk6
Deactivating LVM volume group on clhost01: /usr/sbin/vgchange -a n /dev/vg12
Exporting vg definition on clhost01: /usr/sbin/vgexport -s -v -p -m /var/tmp/vg12.map.8056 /dev/vg12
Checking /etc/lvmtab on clhost02: /usr/bin/ls /etc/lvmtab
Validating vg12 existence on clhost02: /usr/bin/strings /etc/lvmtab
Checking /etc/lvmtab_p on clhost02: /usr/bin/ls /etc/lvmtab_p
Validating vg12 existence on clhost02: /usr/bin/strings /etc/lvmtab_p
Copying map file on clhost01: /usr/sbin/cmcp /var/tmp/vg12.map.8056 clhost02:/var/tmp/vg12.map.8056
Importing vg on clhost02: /usr/sbin/vgimport -m /var/tmp/vg12.map.8056 /dev/vg12 /dev/cdisk/disk5 /dev/cdisk/disk6
Removing mapfile on clhost02: /usr/bin/rm /var/tmp/vg12.map.8056
Removing mapfile on clhost01: /usr/bin/rm -r /var/tmp/vg12.map.8056

ボリュームグループのオプションを指定する事もできます。
上の例では、LVM2.0、PEサイズ64MB、MaxVG 100GBにて作成しています。

● 共有ボリューム上に論理ボリュームの作成 ●
# cmpreparestg -l vg10 -L lvol1 -o lv_opts="-L 512" -o fs_opts="-F vxfs -o largefiles -b 8192" -m /share_vg10
Running cmpreparestg on nodes
Saving command output to /var/adm/cmcluster/sgeasy/easy_deployment.log
Running cmpreparestg on nodes
Checking cluster on clhost01: /usr/sbin/cmviewcl -f line -s config
Using node clhost01
Using node clhost02
checking serviceguard version on clhost01: /usr/sbin/cmversion 2> /dev/null
checking serviceguard version on clhost02: /usr/sbin/cmversion 2> /dev/null
Checking /etc/lvmtab on clhost01: /usr/bin/ls /etc/lvmtab
Validating vg10 existence on clhost01: /usr/bin/strings /etc/lvmtab
Checking /etc/lvmtab on clhost01: /usr/bin/ls /etc/lvmtab
Validating vg10 existence on clhost01: /usr/bin/strings /etc/lvmtab
Validating vg10 activation on clhost01: /usr/sbin/vgdisplay -F vg10
Validating vg10 activation on clhost02: /usr/sbin/vgdisplay -F vg10
Activating LVM volume group on clhost01: /usr/sbin/vgchange -a y vg10
vgdisplay on clhost01: /usr/sbin/vgdisplay -v -F vg10
Creating logical volume on clhost01: /usr/sbin/lvcreate -L 512 -n lvol1 vg10
vgdisplay on clhost01: /usr/sbin/vgdisplay -v -F vg10
Created logical volume(s): lvol1
Creating file system on clhost01: /usr/sbin/newfs -F vxfs -o largefiles -b 8192 /dev/vg10/rlvol1
Making file system directory on clhost01: /usr/bin/mkdir -p /share_vg10
Making file system directory on clhost02: /usr/bin/mkdir -p /share_vg10
Checking parent file system directory on clhost01: /usr/bin/df /share_vg10
Checking parent file system directory on clhost02: /usr/bin/df /share_vg10
Deactivating LVM volume group on clhost01: /usr/sbin/vgchange -a n vg10
Cmquerystg /dev/vg10 on clhost01 on clhost01: /usr/sbin/cmquerystg -f line -l -p /dev/vg10 -n clhost01
Exporting vg definition on clhost01: /usr/sbin/vgexport -s -v -p -m /var/tmp/vg10.map.8157 /dev/vg10
Checking /etc/lvmtab on clhost02: /usr/bin/ls /etc/lvmtab
Validating vg10 existence on clhost02: /usr/bin/strings /etc/lvmtab
Exporting vg on clhost02: /usr/sbin/vgexport -v /dev/vg10
Checking /etc/lvmtab on clhost02: /usr/bin/ls /etc/lvmtab
Validating vg10 existence on clhost02: /usr/bin/strings /etc/lvmtab
Checking /etc/lvmtab_p on clhost02: /usr/bin/ls /etc/lvmtab_p
Validating vg10 existence on clhost02: /usr/bin/strings /etc/lvmtab_p
Copying map file on clhost01: /usr/sbin/cmcp /var/tmp/vg10.map.8157 clhost02:/var/tmp/vg10.map.8157
Importing vg on clhost02: /usr/sbin/vgimport -m /var/tmp/vg10.map.8157 /dev/vg10 /dev/cdisk/disk2
Removing mapfile on clhost02: /usr/bin/rm /var/tmp/vg10.map.8157
Removing mapfile on clhost01: /usr/bin/rm -r /var/tmp/vg10.map.8157

このコマンドを利用すると、全てのクラスタ構成ノードに対し同じ情報が即座に反映されます。
しかも、Lvolの作成だけでなく、ファイルシステムの作成やマウントポイントの作成も自動で完了します。
あとは、いつも通りの手順にてパッケージを作成すれば完了! 😛