示例#1
0
        // Configure Undo Retention for Snapshots..
        if ($flag_snapshot_retention_dirty == TRUE) {
            $result = $snapshot->set_retention($conn_db, SNAPSHOT_RETENTION);
            $error->check();
        }
        break;
    case 'add_storage':
        $drive = new Drive();
        if (AWS == TRUE && $disk_path == 'aws_new') {
            $aws = new Aws($aws_instance_id, $aws_region);
            $aws_volume_id = $aws->create_volume(AWS_VOLUME_SIZE);
            $error->check();
            $aws_available_device = $drive->fetch_available_device($conn_asm, $array_aws_default_device_list);
            $error->check();
            $aws->attach_volume($aws_volume_id, $aws_available_device);
            $error->check();
            $disk_path = '/dev/' . $aws_available_device;
        }
        $timer = 0;
        while (!$drive->disk_exist($conn_asm, $disk_path)) {
            $timer += 1;
            if ($timer > 30) {
                $error->set_msg("The device has not been detected.");
            }
            $error->check();
            sleep(1);
        }
        $result = $drive->add_disk($conn_asm, DEFAULT_DG, $disk_path);
        $error->check();
        break;