Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
ddcd5674
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ddcd5674
编写于
8月 31, 2011
作者:
O
Osier Yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
storage: Add virsh support for fs pool formating
上级
27758859
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
3 deletion
+22
-3
tools/virsh.c
tools/virsh.c
+12
-2
tools/virsh.pod
tools/virsh.pod
+10
-1
未找到文件。
tools/virsh.c
浏览文件 @
ddcd5674
...
...
@@ -7199,6 +7199,8 @@ static const vshCmdInfo info_pool_build[] = {
static
const
vshCmdOptDef
opts_pool_build
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool name or uuid"
)},
{
"no-overwrite"
,
VSH_OT_BOOL
,
0
,
N_
(
"do not overwrite an existing pool of this type"
)},
{
"overwrite"
,
VSH_OT_BOOL
,
0
,
N_
(
"overwrite any existing data"
)},
{
NULL
,
0
,
0
,
NULL
}
};
...
...
@@ -7208,6 +7210,7 @@ cmdPoolBuild(vshControl *ctl, const vshCmd *cmd)
virStoragePoolPtr
pool
;
bool
ret
=
true
;
const
char
*
name
;
unsigned
int
flags
=
0
;
if
(
!
vshConnectionUsability
(
ctl
,
ctl
->
conn
))
return
false
;
...
...
@@ -7215,7 +7218,15 @@ cmdPoolBuild(vshControl *ctl, const vshCmd *cmd)
if
(
!
(
pool
=
vshCommandOptPool
(
ctl
,
cmd
,
"pool"
,
&
name
)))
return
false
;
if
(
virStoragePoolBuild
(
pool
,
0
)
==
0
)
{
if
(
vshCommandOptBool
(
cmd
,
"no-overwrite"
))
{
flags
|=
VIR_STORAGE_POOL_BUILD_NO_OVERWRITE
;
}
if
(
vshCommandOptBool
(
cmd
,
"overwrite"
))
{
flags
|=
VIR_STORAGE_POOL_BUILD_OVERWRITE
;
}
if
(
virStoragePoolBuild
(
pool
,
flags
)
==
0
)
{
vshPrint
(
ctl
,
_
(
"Pool %s built
\n
"
),
name
);
}
else
{
vshError
(
ctl
,
_
(
"Failed to build pool %s"
),
name
);
...
...
@@ -7227,7 +7238,6 @@ cmdPoolBuild(vshControl *ctl, const vshCmd *cmd)
return
ret
;
}
/*
* "pool-destroy" command
*/
...
...
tools/virsh.pod
浏览文件 @
ddcd5674
...
...
@@ -1355,10 +1355,19 @@ where the query is performed.
Configure whether I<pool> should automatically start at boot.
=item B<pool-build> I<pool-or-uuid>
=item B<pool-build> I<pool-or-uuid>
[I<--overwrite>] [I<--no-overwrite>]
Build a given pool.
Options I<--overwrite> and I<--no-overwrite> can only be used for
B<pool-build> a filesystem pool. If neither of them is specified,
B<pool-build> on a filesystem pool only makes the directory; If
I<--no-overwrite> is specified, it probes to determine if a
filesystem already exists on the target device, returning an error
if exists, or using mkfs to format the target device if not; If
I<--overwrite> is specified, mkfs is always executed, any existed
data on the target device is overwritten unconditionally.
=item B<pool-create> I<file>
Create and start a pool object from the XML I<file>.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录