Veritas Volume Manager 将镜像卷标识为丛。无需卸载丛或使整个卷脱机就可备份丛。这是通过创建卷的快照副本并备份此临时卷来完成的,您无需停止系统或拒绝用户访问数据。
执行此备份过程之前,请确保群集正在无故障运行。
phys-schost# 提示符表示全局群集提示符。此操作过程适用于全局群集。
此过程提供了 Sun Cluster 命令的长格式。此外,大多数命令还有简短格式。这些命令除了名称长短的不同以外,其功能都是相同的。有关命令及其简短格式的列表,请参见附录 B。
登录到群集的任意节点,成为该群集上磁盘组的当前主节点的超级用户,或使用一个可提供 solaris.cluster.admin RBAC 授权的角色。
列出磁盘组信息。
# vxprint -g diskgroup |
确定哪个节点当前已导入该磁盘组,这个节点就是该磁盘组的主节点。
# cldevicegroup status |
创建卷的快照。
# vxassist -g diskgroup snapstart volume |
创建快照可能需要较长时间,具体情况取决于卷大小。
检验是否已创建新卷。
# vxprint -g diskgroup |
当快照完成后,所选磁盘组的 State 字段会显示 Snapdone 状态。
停止正在访问文件系统的任何数据服务。
# clresourcegroup offline resource-group |
停止所有数据服务,以确保正确备份数据文件系统。如果没有运行任何数据服务,则无需执行步骤 6 和步骤 8。
创建一个名为 bkup-vol 的备份卷,然后将快照卷附加到此卷。
# vxassist -g diskgroup snapshot volume bkup-vol |
使用 clresourcegroup 命令重新启动在步骤 6 中停止的所有数据服务。
# clresourcegroup online - zone -n node resourcegroup |
节点名称。
可控制资源组的全局群集非投票节点 (node) 的名称。只有在创建资源组时指定了非投票节点的情况下,才能指定 zone。
检验该卷目前是否已附加到新卷 bkup-vol。
# vxprint -g diskgroup |
注册对设备组配置所做的更改。
# cldevicegroup sync diskgroup |
检查备份卷。
# fsck -y /dev/vx/rdsk/diskgroup/bkup-vol |
执行一次备份,以便将卷 bkup-vol 复制到磁带或另一介质上。
使用 ufsdump(1M) 命令或通常使用的备份实用程序。
# ufsdump 0ucf dump-device /dev/vx/dsk/diskgroup/bkup-vol |
删除临时卷。
# vxedit -rf rm bkup-vol |
注册对磁盘组配置所做的更改。
# cldevicegroup sync diskgroup |
在以下示例中,群集节点 phys-schost-2 是设备组 schost-1 的主属主。因此,备份过程从 phys-schost-2 执行的。将复制卷 /vo101,然后将其与新卷 bkup-vol 关联。
[Become superuser or assume a role that provides solaris.cluster.admin RBAC authorization on the primary node.] [Identify the current primary node for the device group:] # cldevicegroup status -- Device Group Servers -- Device Group Primary Secondary ------------ ------- --------- Device group servers: rmt/1 - - Device group servers: schost-1 phys-schost-2 phys-schost-1 -- Device Group Status -- Device Group Status ------------ ------ Device group status: rmt/1 Offline Device group status: schost-1 Online [List the device group information:] # vxprint -g schost-1 TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 dg schost-1 schost-1 - - - - - - dm schost-101 c1t1d0s2 - 17678493 - - - - dm schost-102 c1t2d0s2 - 17678493 - - - - dm schost-103 c2t1d0s2 - 8378640 - - - - dm schost-104 c2t2d0s2 - 17678493 - - - - dm schost-105 c1t3d0s2 - 17678493 - - - - dm schost-106 c2t3d0s2 - 17678493 - - - - v vol01 gen ENABLED 204800 - ACTIVE - - pl vol01-01 vol01 ENABLED 208331 - ACTIVE - - sd schost-101-01 vol01-01 ENABLED 104139 0 - - - sd schost-102-01 vol01-01 ENABLED 104139 0 - - - pl vol01-02 vol01 ENABLED 208331 - ACTIVE - - sd schost-103-01 vol01-02 ENABLED 103680 0 - - - sd schost-104-01 vol01-02 ENABLED 104139 0 - - - pl vol01-03 vol01 ENABLED LOGONLY - ACTIVE - - sd schost-103-02 vol01-03 ENABLED 5 LOG - - - [Start the snapshot operation:] # vxassist -g schost-1 snapstart vol01 [Verify the new volume was created:] # vxprint -g schost-1 TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 dg schost-1 schost-1 - - - - - - dm schost-101 c1t1d0s2 - 17678493 - - - - dm schost-102 c1t2d0s2 - 17678493 - - - - dm schost-103 c2t1d0s2 - 8378640 - - - - dm schost-104 c2t2d0s2 - 17678493 - - - - dm schost-105 c1t3d0s2 - 17678493 - - - - dm schost-106 c2t3d0s2 - 17678493 - - - - v vol01 gen ENABLED 204800 - ACTIVE - - pl vol01-01 vol01 ENABLED 208331 - ACTIVE - - sd schost-101-01 vol01-01 ENABLED 104139 0 - - - sd schost-102-01 vol01-01 ENABLED 104139 0 - - - pl vol01-02 vol01 ENABLED 208331 - ACTIVE - - sd schost-103-01 vol01-02 ENABLED 103680 0 - - - sd schost-104-01 vol01-02 ENABLED 104139 0 - - - pl vol01-03 vol01 ENABLED LOGONLY - ACTIVE - - sd schost-103-02 vol01-03 ENABLED 5 LOG - - - pl vol01-04 vol01 ENABLED 208331 - SNAPDONE - - sd schost-105-01 vol01-04 ENABLED 104139 0 - - - sd schost-106-01 vol01-04 ENABLED 104139 0 - - - [Stop data services, if necessary:] # clresourcegroup offline nfs-rg [Create a copy of the volume:] # vxassist -g schost-1 snapshot vol01 bkup-vol [Restart data services, if necessary:] # clresourcegroup online -n phys-schost-1 nfs-rg [Verify bkup-vol was created:] # vxprint -g schost-1 TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 dg schost-1 schost-1 - - - - - - dm schost-101 c1t1d0s2 - 17678493 - - - - ... v bkup-vol gen ENABLED 204800 - ACTIVE - - pl bkup-vol-01 bkup-vol ENABLED 208331 - ACTIVE - - sd schost-105-01 bkup-vol-01 ENABLED 104139 0 - - - sd schost-106-01 bkup-vol-01 ENABLED 104139 0 - - - v vol01 gen ENABLED 204800 - ACTIVE - - pl vol01-01 vol01 ENABLED 208331 - ACTIVE - - sd schost-101-01 vol01-01 ENABLED 104139 0 - - - sd schost-102-01 vol01-01 ENABLED 104139 0 - - - pl vol01-02 vol01 ENABLED 208331 - ACTIVE - - sd schost-103-01 vol01-02 ENABLED 103680 0 - - - sd schost-104-01 vol01-02 ENABLED 104139 0 - - - pl vol01-03 vol01 ENABLED LOGONLY - ACTIVE - - sd schost-103-02 vol01-03 ENABLED 5 LOG - - - [Synchronize the disk group with cluster framework:] # cldevicegroup sync schost-1 [Check the file systems:] # fsck -y /dev/vx/rdsk/schost-1/bkup-vol [Copy bkup-vol to the backup device:] # ufsdump 0ucf /dev/rmt/0 /dev/vx/rdsk/schost-1/bkup-vol DUMP: Writing 63 Kilobyte records DUMP: Date of this level 0 dump: Tue Apr 25 16:15:51 2000 DUMP: Date of last level 0 dump: the epoch DUMP: Dumping /dev/vx/dsk/schost-2/bkup-vol to /dev/rmt/0. ... DUMP: DUMP IS DONE [Remove the bkup-volume:] # vxedit -rf rm bkup-vol [Synchronize the disk group:] # cldevicegroup sync schost-1 |