3流プログラマのメモ書き

元開発職→社内SE→派遣で営業支援の三流プログラマのIT技術メモ書き。 このメモが忘れっぽい自分とググってきた技術者の役に立ってくれれば幸いです。(jehupc.exblog.jpから移転中)

(SunRay)SunRayServer4.1フェールオーバー構成

すでに消えつつあるSunRayシンクライアントシステムですが、SunRayServer4.1フェールオーバー構成についてうろ覚えですが、メモしておきます。

# /opt/SUNWut/sbin/utconfig 

Continue ([y]/n)? y       ←スクリプトを続行するかどうか
Enter Sun Ray admin password:  ←管理者パスワード
Re-enter Sun Ray admin password: ←管理者パスワード
Configure Sun Ray Web Administration? ([y]/n)?  ←SunRayWeb管理の構成をするかどうか
Enter Apache Tomcat installation directory [/opt/apache-tomcat]:  ←tomcatへのパス
Enter HTTP port number [1660]:      ←WebサーバポートNo
Enable secure connections? ([y]/n)?   ←HTTPSを有効にするか
Enter HTTPS port number [1661]:     ←HTTPSのポート番号
Enter Tomcat process username [utwww]:  ←Tomcatプロセスのユーザ名
Enable remote server administration? (y/[n])? y  ←リモート管理を有効にするか(有効にしておいた)
Configure Sun Ray Kiosk Mode? (y/[n])? y  ←キオスクモードを構成するか(今回SRWCを使ってWindowsサーバへ接続するので必須)
Enter user prefix [utku]:    ←キオスクモード時のユーザの接頭辞
Enter group [utkiosk]:     ←キオスクモード時のグループ
Enter userID range start [150000]:  ←キオスクモード時のユーザIDの範囲の始まり
Enter number of users [25]: 220  ←キオスクモード時のユーザ数
Configure this server for a failover group? (y/[n])? y  ←フェイルオーバーグループを構成するか(今回をyにする)
Continue ([y]/n)? y  
Enter signature:         ←シグネチャを登録(任意の文字列。フェールオーバーサーバー間のキー?)
Re-enter signature:

構成が終わったらサーバを再起動します。

# sync;sync;sync;reboot

再起動後、プライマリサーバで以下を実施。(セカンダリサーバが複数ある場合は、スペースで区切って登録)

# /opt/SUNWut/sbin/utreplica -p セカンダリサーバのホスト名

Sun Ray Core Services 4.1
Administration Failover Configuration

Converting Administration Standalone Server to Administration Primary
### updating the SRDS config file
        ...done
Stopping Sun Ray Data Store daemon
Sun Ray Data Store daemon stopped
Starting Sun Ray Data Store daemon .
Tue Dec 30 09:36 : utdsd starting
Starting utpushd daemon

Restarting Sun Ray Core Services ...
stopping authentication manager
starting session manager
starting device manager
starting printer service
starting serial service
starting authentication manager

Configuration of Failover Administration has completed.
Please check the log file, /var/adm/log/utreplica.2014_12_30_09:36:54.log, for errors.

※utreplicaで指定するのはIPではなく、ホスト名になります。DNSに登録してない場合は、以下のようにhostsファイルに入れておくのが良いでしょう。(SunSV1=プライマリサーバ側のhostsファイル。SunSV2がセカンダリサーバ)

# cat /etc/hosts
10.1.1.28  SunSV1      loghost
10.22.1.3   SunSV1-e1000g1
10.1.1.78  SunSV2

次に各セカンダリサーバ側で、以下を実施。

# /opt/SUNWut/sbin/utreplica -s プライマリのホスト名

Sun Ray Core Services 4.1
Administration Failover Configuration

Converting Administration Standalone Server to Administration Secondary
Examination of the local datastore has detected existing
administration data.
Completion of this operation will overwrite that data.

Continue (y/[n])? y
Stopping Sun Ray Data Store daemon
Sun Ray Data Store daemon stopped
### updating the Datastore init file
        ...already configured with port 7012
### updating the SRDS config file
        ...done
### updating the system services file
        ...done
### updating the SunRay admin config file
        ...done
Starting Sun Ray Data Store daemon .
Tue Dec 30 09:38 : utdsd starting

Restarting Sun Ray Core Services ...
stopping authentication manager
starting session manager
starting device manager
starting printer service
starting serial service
starting authentication manager

Configuration of Failover Administration has completed.
Please check the log file, /var/adm/log/utreplica.2014_12_30_09:38:10.log, for errors.

フェイルオーバーの状態を確認するには、以下のコマンドを入力します。

# /opt/SUNWut/sbin/utreplica -l

Sun Ray Core Services 4.1
Administration Failover Configuration

(プライマリサーバ側だと以下のような結果)
SunSV1 is a primary server for:
SunSV2

(セカンダリサーバ側だと以下のような結果)
SunSV2 is a secondary server
The primary server is: SunSV1