当在Sun Cluster环境下实施和配置高可用性的Netbackup时,需要注意以下几点:
- Cluster中所有节点,其充当的角色必须一致,如全部为master server,而不能将一台master server failover 到meida server上.
- 在软件安装期间,需使用逻辑主机(即浮动IP)指定Netbackup服务器名,而不能使用节点本身的主机名.
- 用于存储Netbackup的catalog及Media Manager的卷库信息必须存放在共享的文件系统中(global).
- HA for Netbackup的agent有两种:一是由Sun公司提供的,另外一种是由Veritas公司提供的,同时只能使用一种.
以下的NBU的安装和配置例子基于以下的环境:
- 两台Sun V890服务器,后端共享存储为SE9980V,Solaris 9 + Sun Cluster 3.1 U3 + Netbackup 5.1
- 使用Veritas提供的HA Agent.
- Cluster节点通过SAN交换机连接到后端的虚拟带库(EMC CX700),所以两台服务器即充当Master Server,同时又充当Media Server.
[ NBU软件包安装及Agent配置 ]
Netbackup软件包的安装过程同单机安装过程基本类似,其主要区别在Netbackup Server名字的选择上,主要安装过程如下:
step1. 定义好逻辑主机,并将逻辑主机绑定在节点1的对外服务的网卡上.
root@szxsc02-ts # cat /etc/hosts
127.0.0.1 localhost
10.72.133.156 szxsc02-ts loghost szxsc02-ts.huawei.com
10.72.133.157 szxsc01-ts
10.72.133.158 szxsc <-- 逻辑主机
root@szxsc02-ts # scstat -n
-- Cluster Nodes --
Node name Status
--------- ------
Cluster node: szxsc02-ts Online
Cluster node: szxsc01-ts Online
root@szxsc02-ts # scstat -i
-- IPMP Groups --
Node Name Group Status Adapter Status
--------- ----- ------ ------- ------
IPMP Group: szxsc02-ts sc_ipmp0 Online ce2 Online
IPMP Group: szxsc01-ts sc_ipmp0 Online ce2 Online
root@szxsc02-ts # ifconfig ce2 addif szxsc netmask + broadcast + up
step2. 先在主节点上安装NBU软件.
root@szxsc02-ts # ./install
… (软件包安装过程略)
If this machine will be using a different network interface than the default (szxsc02-ts), the name of the preferred interface should be used as the configured server name. If this machine will be part of a cluster, the virtual name should be used as the configured server name.
Would you like to use "szxsc02-ts" as the configured
name of the NetBackup server? [y,n] (y) n
Enter the name of the NetBackup server: szxsc
Is szxsc the master server? [y,n] (y)
Do you have any media servers? [y,n] (n) y
Enter the fully qualified name of a media server (q to quit): szxsc
Enter the fully qualified name of a media server (q to quit): q
…
Doing add_drv of the sg driver
Leaving existing sg configuration.
If you wish to update the configuration you need to
rm -f /kernel/drv/sg.conf
and rerun /usr/openv/volmgr/bin/driver/sg.install.
In order for device discovery and auto-configuration to work properly in a NetBackup Enterprise environment, particularly where peripherals are connected to multiple servers, one host must serve as the repository for global device database information.
Enter which host will store the global device database.
(default: szxsc): szxsc (重要:必须选择正确)
Starting the NetBackup database manager process (bpdbm).
…
step3.节点1的NBU软件包安装完成后,在另外一个节点上安装NBU软件.
将绑定在节点1上的逻辑主机释放,并重新绑定在节点2对外服务的网卡上:
root@szxsc02-ts # ifconfig ce2 removeif szxsc
root@szxsc01-ts # ifconfig ce2 addif szxsc netmask + broadcast + up
安装NBU软件,其Netbackup服务器的选择必须同节点1完全保持一致,软件包安装完成后,将
逻辑主机释放:
root@szxsc01-ts # ifconfig ce2 removeif szxsc
step4. 在节点1上配置Netbackup HA Agent(NBU软件安装完成后将自动包含HA Agent).
root@szxsc02-ts # scstat -D
-- Device Group Servers --
Device Group Primary Secondary
------------ ------- ---------
Device group servers: hdsdg szxsc02-ts szxsc01-ts
-- Device Group Status --
Device Group Status
------------ ------
Device group status: hdsdg Offline
root@szxsc02-ts # scswitch -z -D hdsdg -h szxsc02-ts
root@szxsc02-ts # grep hds /etc/vfstab
/dev/vx/dsk/hdsdg/lv_hds /dev/vx/rdsk/hdsdg/lv_hds /hds ufs 2 no global
root@szxsc02-ts # mount /hds (必须以global方式挂接,该文件系统将作为NBU共享catalog及volume database的存储空间,两个节点必须能同时访问)
root@szxsc02-ts # mkdir /hds/nbu_shared
root@szxsc02-ts # /usr/openv/netbackup/bin/cluster/cluster_config
Configuring NetBackup Sun Cluster Agent
VERITAS NetBackup High Availability support for Sun Cluster Configuration Script
VERITAS NetBackup High Availability support configuration options:
1. Both NetBackup Master and Media Server failover
2. NetBackup Master Server failover only
3. NetBackup Media Server failover only
q. Quit
What type of support do you want to configure...? [1-3, q] 1
Configuring NetBackup Master and Media Server failover
Enter the nodes you would like NetBackup to run on.
(szxsc02-ts szxsc01-ts ):
Removing NetBackup's start and stop scripts from /etc
Looking for NetBackup processes that need to be terminated.
Looking for Media Manager processes that need to be terminated.
You would need a Logical host name to be assigned as a Network Resource to the NetBackup resource. This host name should already have been registered in the NIS or DNS.
Enter the Logical host name to be assigned to the NetBackup resource: szxsc
The Network Resource szxsc would not be associated with a specific physical Solaris node - it would migrate between physical nodes, as part of the automatic failover of NetBackup Master and/or Media Server(s).
Henceforth, use szxsc as the NetBackup Master and/or Media Server name for all the NetBackup Clients of this NetBackup Server.
Press to continue.
You would need a shared directory on a cluster filesystem to store shared NetBackup's & Media Manager's configurations and databases.
The filesystem should have enough space to store NetBackup's backup indexes and Media Manager's volume databases.
Enter the shared directory path that you wish to use:
/hds/nbu_shared
Updating /usr/openv/volmgr/vm.conf
Updating /usr/openv/netbackup/bp.conf
Moving NetBackup files to shared space: /hds/nbu_shared
Removing NetBackup databases from szxsc01-ts (will be linked to shared)
No Portlist specified ...
Would use default 13724/tcp list.
No nafo groups or network adapters specified ...
Will try to auto-discover the network adapters and configure them into nafo groups.
Creating a failover instance ...
Resource type has been registered already
Creating failover resource group ...done.
Creating logical host resource ...done.
Creating resource for the resource type ...done.
Done.
The NetBackup Sun Cluster configuration was successful!
Configuring node szxsc02-ts for clustering
Configuring node szxsc01-ts for clustering.
Waiting for NetBackup to come online...
NetBackup is online...
step5. 上一步命令将把Netbackup的catalog及volume database移到全局共享文件系统中,以便所有的cluster节点都能访问到,并且NBU HA Agent将自动创建Cluster资源(组).
root@szxsc02-ts # ls -ltr /opt/openv/volmgr/database
total 812
-rw------- 1 root other 1536 Apr 5 17:18 robotic_def
-rw------- 1 root other 393600 Apr 5 17:18 ltidevs
lrwxrwxrwx 1 root root 37 Apr 5 17:33 volDB -> /hds/nbu_shared/volmgr/database/volDB
lrwxrwxrwx 1 root root 38 Apr 5 17:33 ruleDB -> /hds/nbu_shared/volmgr/database/ruleDB
lrwxrwxrwx 1 root root 38 Apr 5 17:33 poolDB -> /hds/nbu_shared/volmgr/database/poolDB
lrwxrwxrwx 1 root root 38 Apr 5 17:33 globDB -> /hds/nbu_shared/volmgr/database/globDB
root@szxsc02-ts # scstat -g
-- Resource Groups and Resources --
Group Name Resources
---------- ---------
Resources: scnb-harg szxsc scnb-hars
-- Resource Groups --
Group Name Node Name State
---------- --------- -----
Group: scnb-harg szxsc02-ts Online
Group: scnb-harg szxsc01-ts Offline
-- Resources --
Resource Name Node Name State Status Message
------------- --------- ----- --------------
Resource: szxsc szxsc02-ts Online Online - LogicalHostname online.
Resource: szxsc szxsc01-ts Offline Offline - LogicalHostname offline.
Resource: scnb-hars szxsc02-ts Online Online
Resource: scnb-hars szxsc01-ts Offline Offline
step6. NBU软件包安装完成后,分别在两个节点上执行下列操作以便正确识别到后端的虚拟带库.
root@szxsc02-ts # cfgadm -al -o show_FCP_dev | egrep 'changer|tape'
c0::2101000d773c3462,0 med-changer connected configured unknown
c0::2101000d773c3462,1 tape connected configured unknown
c0::2101000d773c3462,2 tape connected configured unknown
如上所示,后端的虚拟带库包含一个机械臂和两个Driver,LUN号为0,1,2.
root@szxsc02-ts # cd /usr/openv/volmgr/bin
root@szxsc02-ts # ./sg.build all -mt 2 -ml 2 (根据检测到的设备生成sg.conf和sg.links文件)
根据需要更改生成的文件,将机械臂和两个Driver以外的配置信息删除,更改后的文件如下:
root@szxsc02-ts # more sg.conf
# Configuration file for SCSA Generic.
#
name="sg" class="scsi" target=0 lun=0;
name="sg" class="scsi" target=0 lun=1;
name="sg" class="scsi" target=0 lun=2;
name="sg" class="scsi" target=1 lun=0;
name="sg" class="scsi" target=1 lun=1;
name="sg" class="scsi" target=1 lun=2;
name="sg" parent="fp" target=0 lun=0 fc-port-wwn="2101000d773c3462";
name="sg" parent="fp" target=0 lun=1 fc-port-wwn="2101000d773c3462";
name="sg" parent="fp" target=0 lun=2 fc-port-wwn="2101000d773c3462";
root@szxsc02-ts # more sg.links
# begin SCSA Generic devlinks file - creates nodes in /dev/sg
type=ddi_pseudo;name=sg;addr=0,0; sg/c\N0t0l0
type=ddi_pseudo;name=sg;addr=0,1; sg/c\N0t0l1
type=ddi_pseudo;name=sg;addr=0,2; sg/c\N0t0l2
type=ddi_pseudo;name=sg;addr=1,0; sg/c\N0t1l0
type=ddi_pseudo;name=sg;addr=1,1; sg/c\N0t1l1
type=ddi_pseudo;name=sg;addr=1,2; sg/c\N0t1l2
type=ddi_pseudo;name=sg;addr=w2101000d773c3462,0; sg/c\N0t\A1l0 (中间为TAB键)
type=ddi_pseudo;name=sg;addr=w2101000d773c3462,1; sg/c\N0t\A1l1
type=ddi_pseudo;name=sg;addr=w2101000d773c3462,2; sg/c\N0t\A1l2
更新sg driver:
root@szxsc02-ts # rem_drv sg
root@szxsc02-ts # rm /kernel/drv/sg.conf
root@szxsc02-ts # ./sg.install
Copied files to /kernel/drv and to /kernel/drv/sparcv9.
Doing add_drv of the sg driver
Removing old /dev/sg entries.
rm: /dev/sg/Scans is a directory
Editing /etc/devlink.tab...
Copying original /etc/devlink.tab to /etc/devlink.tab.04-10-05-13:47:15.
Added entry in /etc/devlink.tab file.
Made links in /dev/sg
root@szxsc02-ts # sgscan all
…
/dev/sg/c0tw2101000d773c3462l0: Changer: "IBM 03584L32"
/dev/sg/c0tw2101000d773c3462l1: Tape (/dev/rmt/1): "IBM ULT3580-TD1"
/dev/sg/c0tw2101000d773c3462l2: Tape (/dev/rmt/0): "IBM ULT3580-TD1"
在其它的cluster节点上执行类似的操作,确保OS能正确识别到所连接带库设备.
step7. 通过GUI界面jnbSA分别在节点1和节点2配置Storage Unit,当在节点2上执行此操作时,需要将NBU切换到该节点上,使用如下命令:
# scswitch -z -g scnb-harg -h szxsc01-ts
配置完成后,Media Manager相关后台进程将启动:
root@szxsc01-ts # bpps -a
…
MM Processes
------------
root 25478 1 0 17:44:09 ? 0:00 tldcd
root 25454 1 0 17:44:05 ? 0:00 /usr/openv/volmgr/bin/ltid
root 25475 25454 0 17:44:09 ? 0:00 avrd
root 24935 1 0 17:42:25 ? 0:00 vmd
root 25471 25454 0 17:44:07 ? 0:00 tldd
root@szxsc02-ts # rsh szxsc01-ts ls -ltr /opt/openv/volmgr/database
total 1648
lrwxrwxrwx 1 root root 37 Apr 5 17:42 volDB -> /hds/nbu_shared/volmgr/database/volDB
lrwxrwxrwx 1 root root 38 Apr 5 17:42 ruleDB -> /hds/nbu_shared/volmgr/database/ruleDB
lrwxrwxrwx 1 root root 38 Apr 5 17:42 poolDB -> /hds/nbu_shared/volmgr/database/poolDB
lrwxrwxrwx 1 root root 38 Apr 5 17:42 globDB -> /hds/nbu_shared/volmgr/database/globDB
-rw------- 1 root root 1536 Apr 5 17:43 robotic_def.tpacbak
-rw------- 1 root root 393600 Apr 5 17:43 ltidevs.tpacbak
-rw------- 1 root root 15224 Apr 5 17:43 globDB.tpacbak
-rw------- 1 root other 3072 Apr 5 17:43 robotic_def
-rw------- 1 root other 393600 Apr 5 17:43 ltidevs
阅读(3488) | 评论(0) | 转发(0) |