JavaScript is required to for searching.
跳过导航链接
退出打印视图
Oracle® ZFS Storage Appliance 管理指南
Oracle 技术网
文档库
PDF
打印视图
反馈
search filter icon
search icon

文档信息

使用本文档

 1 Oracle ZFS Storage Appliance 概述

 2 状态

 3 初始配置

 4 网络配置

 5 存储配置

 6 存储区域网络配置

 7 用户配置

 8 设置 ZFSSA 首选项

 9 警报配置

 10 群集配置

 11 ZFSSA 服务

 12 共享资源、项目和模式

 13 复制

 14 影子迁移

 15 CLI 脚本化

 16 维护工作流

使用工作流

工作流执行上下文

工作流参数

约束参数

可选参数

工作流错误处理

工作流输入验证

工作流执行审计

工作流执行报告

版本控制

设备版本控制

工作流版本控制

作为警报操作的工作流

警报操作执行上下文

审计警报操作

使用调度的工作流

使用 CLI

对调度表进行编码

示例:设备类型选择

BUI

CLI

下载工作流

查看工作流

执行工作流

 17 集成

索引

审计警报操作

作为警报操作执行的工作流可以使用 audit 函数生成审计日志条目。建议通过 audit 函数将所有相关的调试信息生成到审计日志中。例如,下面是如果处于群集状态则执行故障转移的工作流-但是它审计所有无法重新引导故障:

var workflow = {
       name: 'Failover',
       description: 'Fail the node over to its clustered peer',
       alert: true,
       setid: true,
       execute: function (params) {
               /*
                * To failover, we first confirm that clustering is configured
                * and that we are in the clustered state.  We then reboot,
                * which will force our peer to takeover.  Note that we're
                * being very conservative by only rebooting if in the
                * AKCS_CLUSTERED state:  there are other states in which it
                * may well be valid to failback (e.g., we are in AKCS_OWNER,
                * and our peer is AKCS_STRIPPED), but those states may also
                * indicate aberrent operation, and we therefore refuse to
                * failback.  (Even in an active/passive clustered config, a
                * FAILBACK should always be performed to transition the
                * cluster peers from OWNER/STRIPPED to CLUSTERED/CLUSTERED.)
                */
               var uuid = params.uuid;
               var clustered = 'AKCS_CLUSTERED';

               audit('attempting failover in response to alert ' + uuid);

               try {
                       run('configuration cluster');
               } catch (err) {
                       audit('could not get clustered state; aborting');
                       return;
               }

               if ((state = get('state')) != clustered) {
                       audit('state is ' + state + '; aborting');
                       return;
               }

               if ((state = get('peer_state')) != clustered) {
                       audit('peer state is ' + state + '; aborting');
                       return;
               }

               run('cd /');
               run('confirm maintenance system reboot');
       }
};