alter chunk 参数:更改 chunk 状态为 online 或 offline(SQL 管理 API)

随同 admin()task() 函数,使用 alter chunk 参数在 dbspace、blobspace 或 sbspace 中使 chunk 为 online 或使 chunk 为 offline。

语法

元素 描述 关键考虑
space_name blobspace、dbspace 或 sbspace 的名称。  
path_name chunk 的磁盘分区或无缓冲设备。  
offset 磁盘分区或无缓冲设备内达到 chunk 的偏移量(以 KB 为单位)。缺省是 0 请参阅 admin() 和 task() 参数大小规范

用法

chunk 必须在镜像对中,或非关键 dbspace 内的非主 chunk。

使用 alter chunk online 参数来更改 chunk 状态为 online。

使用 alter chunk offline 参数来更改 chunk 状态为 offline。

这个函数等同于 onspaces -s 命令。

示例

下列示例使名为 dbspace4 的 chunk 为 online:

EXECUTE FUNCTION task("alter chunk online","dbspace4","/dev/raw_dev1","0");