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 SAN(Storage Area Network) 구성

 7 사용자 구성

 8 ZFSSA 환경 설정

 9 경보 구성

 10 클러스터 구성

 11 ZFSSA 서비스

 12 공유, 프로젝트 및 스키마

 13 복제

 14 섀도우 마이그레이션

 15 CLI 스크립트 작성

 16 유지 관리 워크플로우

워크플로우 사용

워크플로우 실행 컨텍스트

워크플로우 매개변수

제한된 매개변수

선택적 매개변수

워크플로우 오류 처리

워크플로우 입력 검증

워크플로우 실행 감사

워크플로우 실행 보고

버전 지정

어플라이언스 버전 지정

워크플로우 버전 지정

경보 조치로서의 워크플로우

경보 조치 실행 컨텍스트

경보 조치 감사

예약된 워크플로우 사용

CLI 사용

일정 코딩

예: 장치 유형 선택

BUI

CLI

워크플로우 다운로드

워크플로우 보기

워크플로우 실행

 17 통합

색인

예: 장치 유형 선택

다음은 지정된 드라이브 유형을 기반으로 워크시트를 만드는 워크플로우 예입니다.

var steps = [ {
	step: 'Checking for existing worksheet',
	execute: function (params) {
		/*
		 * In this step, we're going to see if the worksheet that
		 * we're going to create already exists.  If the worksheet
		 * already exists, we blow it away if the user has indicated
		 * that they desire this behavior.  Note that we store our
		 * derived worksheet name with the parameters, even though
		 * it is not a parameter per se; this is explicitly allowed,
		 * and it allows us to build state in one step that is
		 * processed in another without requiring additional global
		 * variables.
		 */
		params.worksheet = 'Drilling down on ' + params.type + ' disks';

		try {
			run('analytics worksheets select name="' +
			    params.worksheet + '"');

			if (params.overwrite) {
				run('confirm destroy');
				return;
			}
				
			throw ('Worksheet called "' + params.worksheet +
			    '" already exists!');
		} catch (err) {
			if (err.code != EAKSH_ENTITY_BADSELECT)
				throw (err);
		}
	}
 }, {
	step: 'Finding disks of specified type',
	execute: function (params) {
		/*
		 * In this step, we will iterate over all chassis, and for
		 * each chassis iterates over all disks in the chassis,
		 * looking for disks that match the specified type.
		 */
		var chassis, name, disks;
		var i, j;

		run('cd /');
		run('maintenance hardware');

		chassis = list();
		params.disks = [];

		for (i = 0; i < chassis.length; i++) {
			run('select ' + chassis[i]);

			name = get('name');
			run('select disk');
			disks = list();

			for (j = 0; j < disks.length; j++) {
				run('select ' + disks[j]);

				if (get('use') == params.type) {
					params.disks.push(name + '/' +
					    get('label'));
				}

				run('cd ..');
			}

			run('cd ../..');
		}

		if (params.disks.length === 0)
			throw ('No ' + params.type + ' disks found');
		run('cd /');
	}
 }, {
	step: 'Creating worksheet',
	execute: function (params) {
		/*
		 * In this step, we're ready to actually create the worksheet
		 * itself:  we have the disks of the specified type and
		 * we know that we can create the worksheet.  Note that we
		 * create several datasets:  first, I/O bytes broken down
		 * by disk, with each disk of the specified type highlighted
		 * as a drilldown.  Then, we create a separate dataset for
		 * each disk of the specified type.  Finally, note that we
		 * aren't saving the datasets -- we'll let the user do that
		 * from the created worksheet if they so desire.  (It would
		 * be straightforward to add a boolean parameter to this
		 * workflow that allows that last behavior to be optionally
		 * changed.)
		 */
		var disks = [], i;

		run('analytics worksheets');
		run('create "' + params.worksheet + '"');
		run('select name="' + params.worksheet + '"');
		run('dataset');
		run('set name=io.bytes[disk]');

		for (i = 0; i < params.disks.length; i++)
			disks.push('"' + params.disks[i] + '"');

		run('set drilldowns=' + disks.join(','));
		run('commit');

		for (i = 0; i < params.disks.length; i++) {
			run('dataset');
			run('set name="io.bytes[disk=' +
			    params.disks[i] + ']"');
			run('commit');
		}
	}
} ];

var workflow = {
	name: 'Disk drilldown',
	description: 'Creates a worksheet that drills down on system, ' +
	    'cache, or log devices',
	parameters: {
		type: {
			label: 'Create a new worksheet drilling down on',
			type: 'ChooseOne',
			options: [ 'cache', 'log', 'system' ],
			optionlabels: [ 'Cache', 'Log', 'System' ]
		},
		overwrite: {
			label: 'Overwrite the worksheet if it exists',
			type: 'Boolean'
		}
	},
	execute: function (params) { return (steps); }
};