diff --git a/README.md b/README.md
index 781b980eb8..6f5dd91aad 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[English version](README_en.md)
+[中文版](README_cn.md)
@@ -14,79 +14,77 @@
[](https://github.com/opencurve/curve/releases)
[](https://github.com/opencurve/curve/blob/master/LICENSE)
+CURVE is a distributed storage system designed and developed independently by NetEase, featured with high performance, high availability, high reliability and well expansibility, and it can serve as the basis for storage systems designed for different scenario (e.g. block storage, object storage and cloud database).
-CURVE是网易自主设计研发的高性能、高可用、高可靠分布式存储系统,具有非常良好的扩展性。基于该存储底座可以打造适用于不同应用场景的存储系统,如块存储、对象存储、云原生数据库等。当前我们基于CURVE已经实现了高性能块存储系统,支持快照克隆和恢复 ,支持QEMU虚拟机和物理机NBD设备两种挂载方式, 在网易内部作为高性能云盘使用。
+So far, we have implemented a high performance block storage system, which supports snapshot, clone and recovery, and it can be attached to QEMU virtual machine or physical machine (by curve-nbd). CURVE has been served as an elastic block storage service inside NetEase for a certain time, during which high performance and reliability have shown.
-## 设计文档
+## Design Documentation
-- 通过 [CURVE概述](https://www.opencurve.io/) 可以了解 CURVE 架构
-- CURVE相关文档
- - [NEBD](docs/cn/nebd.md)
- - [MDS](docs/cn/mds.md)
- - [Chunkserver](docs/cn/chunkserver_design.md)
- - [Snapshotcloneserver](docs/cn/snapshotcloneserver.md)
- - [CURVE质量体系介绍](docs/cn/quality.md)
- - [CURVE监控体系介绍](docs/cn/monitor.md)
- - [Client](docs/cn/curve-client.md)
- - [Client Python API](docs/cn/curve-client-python-api.md)
-- CURVE上层应用
- - [对接k8s文档](docs/cn/k8s_csi_interface.md)
+- Wanna have a glance at CURVE? Click here for [Intro to CURVE](https://www.opencurve.io/)!
+- Want more details? Our documentation for every component:
+ - [NEBD](docs/en/nebd_en.md)
+ - [MDS](docs/en/mds_en.md)
+ - [Chunkserver](docs/en/chunkserver_design_en.md)
+ - [Snapshotcloneserver](docs/en/snapshotcloneserver_en.md)
+ - [CURVE quality control](docs/en/quality_en.md)
+ - [CURVE monitoring](docs/en/monitor_en.md)
+ - [Client](docs/en/client_en.md)
+ - [Client Python API](docs/en/curve-client-python-api_en.md)
+- Application based on CURVE
+ - [Work with k8s](docs/en/k8s_csi_interface_en.md)
-## 快速开始
+## Quick Start
-在您开始动手部署前请先仔细阅读特别说明部分:[特别说明](docs/cn/deploy.md#%E7%89%B9%E5%88%AB%E8%AF%B4%E6%98%8E)
+Want to try on it? Take it easy! We'll help you step by step, but make sure you've read this [Special Statement](docs/en/deploy_en.md#special-statement) before you start.
-### 部署All-in-one体验环境
+### Deploy an all-in-one environment (to try how CURVE works)
-[单机部署](docs/cn/deploy.md#%E5%8D%95%E6%9C%BA%E9%83%A8%E7%BD%B2)
+[Deploy on single machine](docs/en/deploy_en.md#deploy-on-single-machine)
-### 部署多机集群
+### Deploy multi-machine cluster (try it in production environment)
-[多机部署](docs/cn/deploy.md#%E5%A4%9A%E6%9C%BA%E9%83%A8%E7%BD%B2)
+[Deploy on multiple machines](docs/en/deploy_en.md#deploy-on-multiple-machines)
-### 查询工具说明
+### curve_ops_tool introduction
-[查询工具说明](docs/cn/curve_ops_tool.md)
+[curve_ops_tool introduction](docs/en/curve_ops_tool_en.md)
-## 参与开发
+## For Developers
+### Deploy build and development environment
-### 部署编译开发环境
+[development environment deployment](docs/en/build_and_run_en.md)
-[编译开发环境搭建](docs/cn/build_and_run.md)
+### Compile test cases and run
+[test cases compiling and running](docs/en/build_and_run_en.md#test-case-compilation-and-execution)
-### 测试用例编译及运行
-[测试用例编译及运行](docs/cn/build_and_run.md#%E6%B5%8B%E8%AF%95%E7%94%A8%E4%BE%8B%E7%BC%96%E8%AF%91%E5%8F%8A%E6%89%A7%E8%A1%8C)
+### Coding style guides
+CURVE is coded following [Google C++ Style Guide strictly](https://google.github.io/styleguide/cppguide.html). Please follow this guideline if you're trying to contribute your codes.
-### 编码规范
-CURVE编码规范严格按照[Google C++开源项目编码指南](https://zh-google-styleguide.readthedocs.io/en/latest/google-cpp-styleguide/contents/)来进行代码编写,请您也遵循这一指南来提交您的代码。
+### Code coverage requirement
+1. Unit tests: Incremental line coverage ≥ 80%, incremental branch coverage ≥ 70%
+2. Integration tests: Measure together with unit tests, and should fulfill the same requirement
+3. Exception tests: Not required yet
-### 测试覆盖率要求
-1. 单元测试:增量行覆盖80%以上,增量分支覆盖70%以上
-2. 集成测试:与单元测试合并统计,满足上述覆盖率要求即可
-3. 异常测试:暂不做要求
+### Other processes
-### 其他开发流程说明
-代码开发完成之后,提[pr](https://github.com/opencurve/curve/compare)到curve的master分支。提交pr时,请填写pr模板。pr提交之后会自动触发CI,CI通过并且经过review之后,代码才可合入。
-具体规则请见[CONTRIBUTING](https://github.com/opencurve/curve/blob/master/CONTRIBUTING.md).
+After finishing the development of your code, you should submit a pull request to master branch of CURVE and fill out a pull request template. The pull request will trigger the CI automatically, and the code will only be merged after passing the CI and being reviewed.
-## 版本发布周期
-- CURVE版本发布周期:大版本半年,小版本1~2个月
-- 版本号规则:采用3段式版本号,x.y.z{-后缀},x是大版本,y是小版本,z是bugfix,后缀用来区beta版本(-beta)、rc版本(-rc)、和稳定版本(没有后缀)。每半年的大版本是指x增加1,每1~2个月的小版本是y增加1。正式版本发布之后,如果有bugfix是z增加1。
+For more detail, please refer to [CONTRIBUTING](https://github.com/opencurve/curve/blob/master/CONTRIBUTING.md).
-## 分支规则
-所有的开发都在master分支开发,如果需要发布版本,从master拉取新的分支**release-x.y**。版本发布从release-x.y分支发布。
-
-## 反馈及交流
-
-- [Github Issues](https://github.com/openCURVE/CURVE/issues):欢迎提交BUG、建议,使用中如遇到问题可参考FAQ或加入我们的User group进行咨询
-- [FAQ](https://github.com/openCURVE/CURVE/wiki/CURVE-FAQ):主要根据User group中常见问题整理,还在逐步完善中
-- User group:当前为微信群,由于群人数过多,需要先添加以下个人微信,再邀请进群。
-
-
+## Release Cycle
+- CURVE release cycle:Half a year for major version, 1~2 months for minor version
+- Versioning format: We use a sequence of three digits and a suffix (x.y.z{-suffix}), x is the major version, y is the minor version, and z is for bugfix. The suffix is for distinguishing beta (-beta), RC (-rc) and GA version (without any suffix). Major version x will increase 1 every half year, and y will increase every 1~2 months. After a version is released, number z will increase if there's any bugfix.
+## Branch
+All the developments will be done under master branch. If there's any new version to establish, a new branch release-x.y will be pulled from the master, and the new version will be released from this branch.
+## Feedback & Contact
+- [Github Issues](https://github.com/openCURVE/CURVE/issues):You are sincerely welcomed to issue any bugs you came across or any suggestions through Github issues. If you have any question you can refer to our FAQ or join our user group for more details.
+- [FAQ](https://github.com/openCURVE/CURVE/wiki/CURVE-FAQ):Frequently asked question in our user group, and we'll keep working on it.
+- User group:We use Wechat group currently.
+
diff --git a/README_cn.md b/README_cn.md
new file mode 100644
index 0000000000..2790262754
--- /dev/null
+++ b/README_cn.md
@@ -0,0 +1,91 @@
+[English version](README.md)
+
+
+
+
+# CURVE
+
+[](http://59.111.91.248:8080/job/curve_untest_job/HTML_20Report/)
+[](http://59.111.91.248:8080/job/curve_failover_testjob/)
+[](http://59.111.91.248:8080/job/curve_robot_job/)
+[](http://59.111.91.248:8080/job/opencurve_multijob/lastBuild)
+[](https://github.com/opencurve/curve/tree/master/docs)
+[](https://github.com/opencurve/curve/releases)
+[](https://github.com/opencurve/curve/blob/master/LICENSE)
+
+
+CURVE是网易自主设计研发的高性能、高可用、高可靠分布式存储系统,具有非常良好的扩展性。基于该存储底座可以打造适用于不同应用场景的存储系统,如块存储、对象存储、云原生数据库等。当前我们基于CURVE已经实现了高性能块存储系统,支持快照克隆和恢复 ,支持QEMU虚拟机和物理机NBD设备两种挂载方式, 在网易内部作为高性能云盘使用。
+
+## 设计文档
+
+- 通过 [CURVE概述](https://opencurve.github.io/) 可以了解 CURVE 架构
+- CURVE相关文档
+ - [NEBD](docs/cn/nebd.md)
+ - [MDS](docs/cn/mds.md)
+ - [Chunkserver](docs/cn/chunkserver_design.md)
+ - [Snapshotcloneserver](docs/cn/snapshotcloneserver.md)
+ - [CURVE质量体系介绍](docs/cn/quality.md)
+ - [CURVE监控体系介绍](docs/cn/monitor.md)
+ - [Client](docs/cn/curve-client.md)
+ - [Client Python API](docs/cn/curve-client-python-api.md)
+- CURVE上层应用
+ - [对接k8s文档](docs/cn/k8s_csi_interface.md)
+
+## 快速开始
+
+在您开始动手部署前请先仔细阅读特别说明部分:[特别说明](docs/cn/deploy.md#%E7%89%B9%E5%88%AB%E8%AF%B4%E6%98%8E)
+
+### 部署All-in-one体验环境
+
+[单机部署](docs/cn/deploy.md#%E5%8D%95%E6%9C%BA%E9%83%A8%E7%BD%B2)
+
+### 部署多机集群
+
+[多机部署](docs/cn/deploy.md#%E5%A4%9A%E6%9C%BA%E9%83%A8%E7%BD%B2)
+
+### 查询工具说明
+
+[查询工具说明](docs/cn/curve_ops_tool.md)
+
+## 参与开发
+
+
+### 部署编译开发环境
+
+[编译开发环境搭建](docs/cn/build_and_run.md)
+
+### 测试用例编译及运行
+[测试用例编译及运行](docs/cn/build_and_run.md#%E6%B5%8B%E8%AF%95%E7%94%A8%E4%BE%8B%E7%BC%96%E8%AF%91%E5%8F%8A%E6%89%A7%E8%A1%8C)
+
+### 编码规范
+CURVE编码规范严格按照[Google C++开源项目编码指南](https://zh-google-styleguide.readthedocs.io/en/latest/google-cpp-styleguide/contents/)来进行代码编写,请您也遵循这一指南来提交您的代码。
+
+### 测试覆盖率要求
+1. 单元测试:增量行覆盖80%以上,增量分支覆盖70%以上
+2. 集成测试:与单元测试合并统计,满足上述覆盖率要求即可
+3. 异常测试:暂不做要求
+
+### 其他开发流程说明
+代码开发完成之后,提[pr](https://github.com/opencurve/curve/compare)到curve的master分支。提交pr时,请填写pr模板。pr提交之后会自动触发CI,CI通过并且经过review之后,代码才可合入。
+具体规则请见[CONTRIBUTING](https://github.com/opencurve/curve/blob/master/CONTRIBUTING.md).
+
+## 版本发布周期
+- CURVE版本发布周期:大版本半年,小版本1~2个月
+- 版本号规则:采用3段式版本号,x.y.z{-后缀},x是大版本,y是小版本,z是bugfix,后缀用来区beta版本(-beta)、rc版本(-rc)、和稳定版本(没有后缀)。每半年的大版本是指x增加1,每1~2个月的小版本是y增加1。正式版本发布之后,如果有bugfix是z增加1。
+
+## 分支规则
+所有的开发都在master分支开发,如果需要发布版本,从master拉取新的分支**release-x.y**。版本发布从release-x.y分支发布。
+
+## 反馈及交流
+
+- [Github Issues](https://github.com/openCURVE/CURVE/issues):欢迎提交BUG、建议,使用中如遇到问题可参考FAQ或加入我们的User group进行咨询
+- [FAQ](https://github.com/openCURVE/CURVE/wiki/CURVE-FAQ):主要根据User group中常见问题整理,还在逐步完善中
+- User group:当前为微信群,由于群人数过多,需要先添加以下个人微信,再邀请进群。
+
+
+
+
+
+
+
+
diff --git a/README_en.md b/README_en.md
deleted file mode 100644
index 6bee5ebbef..0000000000
--- a/README_en.md
+++ /dev/null
@@ -1,89 +0,0 @@
-[中文版](README.md)
-
-
-
-
-# CURVE
-
-[](http://59.111.93.165:8080/job/curve_untest_job/HTML_20Report/)
-[](http://59.111.93.165:8080/job/curve_failover_testjob/)
-[](http://59.111.93.165:8080/job/curve_robot_job/)
-[](http://59.111.93.165:8080/job/opencurve_multijob/lastBuild)
-[](https://github.com/opencurve/curve/tree/master/docs)
-[](https://github.com/opencurve/curve/releases)
-[](https://github.com/opencurve/curve/blob/master/LICENSE)
-
-CURVE is a distributed storage system designed and developed independently by NetEase, featured with high performance, high availability, high reliability and well expansibility, and it can serve as the basis for storage systems designed for different scenario (e.g. block storage, object storage and cloud database).
-
-So far, we have implemented a high performance block storage system, which supports snapshot, clone and recovery, and it can be attached on QEMU virtual machine or physical machine (by curve-nbd). CURVE has been served as an elastic block storage service inside NetEase for a certain time, during which high performance and reliability have shown.
-
-## Design Documentation
-
-- Wanna have a glance at CURVE? Click here for [Intro to CURVE](https://opencurve.github.io/)!
-- Want more details? Our documentation for every component:
- - [NEBD](docs/en/nebd_en.md)
- - [MDS](docs/en/mds_en.md)
- - [Chunkserver](docs/cn/chunkserver_design_en.md)
- - [Snapshotcloneserver](docs/cn/snapshotcloneserver_en.md)
- - [CURVE quality control](docs/cn/quality.md)
- - [CURVE monitoring](docs/cn/monitor.md)
- - [Client](docs/cn/curve-client.md)
- - [Client Python API](docs/cn/curve-client-python-api.md)
-- Application based on CURVE
- - [Work with k8s](docs/cn/k8s_csi_interface.md)
-
-## Quick Start
-
-Want to try on it? Take it easy! We'll help you step by step, but make sure you've read this [Special Statement](docs/cn/deploy.md#%E7%89%B9%E5%88%AB%E8%AF%B4%E6%98%8E) before you start.
-
-### Deploy an all-in-one environment (to try how CURVE works)
-
-[Deploy on single machine](docs/cn/deploy.md#%E5%8D%95%E6%9C%BA%E9%83%A8%E7%BD%B2)
-
-### Deploy multi-machine cluster (try it in production environment)
-
-[Deploy on multiple machines](docs/cn/deploy.md#%E5%A4%9A%E6%9C%BA%E9%83%A8%E7%BD%B2)
-
-### curve_ops_tool introduction
-
-[curve_ops_tool introduction](docs/cn/curve_ops_tool.md)
-
-## For Developers
-
-### Deploy build and development environment
-
-[development environment deployment](docs/cn/build_and_run.md)
-
-### Compile test cases and run
-[test cases compiling and running](docs/cn/build_and_run.md#%E6%B5%8B%E8%AF%95%E7%94%A8%E4%BE%8B%E7%BC%96%E8%AF%91%E5%8F%8A%E6%89%A7%E8%A1%8C)
-
-### Coding style guides
-CURVE is coded following [Google C++ Style Guide strictly](https://google.github.io/styleguide/cppguide.html). Please follow this guideline if you're trying to contribute your codes.
-
-### Code coverage requirement
-1. Unit tests: Incremental line coverage ≥ 80%, incremental branch coverage ≥ 70%
-2. Integration tests: Measure together with unit tests, and should fulfill the same requirement
-3. Exception tests: Not required yet
-
-### Other processes
-
-After finishing the development of your code, you should submit a pull request to master branch of CURVE and fill out a pull request template. The pull request will trigger the CI automatically, and the code will only be merged after passing the CI and being reviewed.
-
-For more detail, please refer to [CONTRIBUTING](https://github.com/opencurve/curve/blob/master/CONTRIBUTING.md).
-
-## Release Cycle
-- CURVE release cycle:Half a year for major version, 1~2 months for minor version
-
-- Versioning format: We use a sequence of three digits and a suffix (x.y.z{-suffix}), x is the major version, y is the minor version, and z is for bugfix. The suffix is for distinguishing beta (-beta), RC (-rc) and GA version (without any suffix). Major version x will increase 1 every half year, and y will increase every 1~2 months. After a version is released, number z will increase if there's any bugfix.
-
-## Branch
-
-All the developments will be done under master branch. If there's any new version to establish, a new branch release-x.y will be pulled from the master, and the new version will be released from this branch.
-
-## Feedback & Contact
-
-- [Github Issues](https://github.com/openCURVE/CURVE/issues):You are sincerely welcomed to issue any bugs you came across or any suggestions through Github issues. If you have any question you can refer to our FAQ or join our user group for more details.
-- [FAQ](https://github.com/openCURVE/CURVE/wiki/CURVE-FAQ):Frequently asked question in our user group, and we'll keep working on it.
-- User group:We use Wechat group currently.
-
-
diff --git a/docs/cn/curve-client-python-api.md b/docs/cn/curve-client-python-api.md
index b730ad24a2..90adcfe8d1 100644
--- a/docs/cn/curve-client-python-api.md
+++ b/docs/cn/curve-client-python-api.md
@@ -1,304 +1,322 @@
-#### 获取一个与curve集群交互的CBDClient对象
-
-```python
-import curvefs
-
-# 获取一个与后端集群交互的CBDClient对象,不同的CBDClient对象可以与不同的集群建立连接
-cbd1 = curvefs.CBDClient()
-cbd2 = curvefs.CBDClient()
-```
-
-#### 初始化CBDClient
-
-```python
-import curvefs
-cbd = curvefs.CBDClient()
-
-# 参数:curve-client配置文件的绝对路径
-# 返回值:返回0表示初始化成功,-1表示初始化失败
-cbd.Init("/etc/curve/client.conf")
-```
-
-#### 创建文件
-
-```python
-import curvefs
-cbd = curvefs.CBDClient()
-cbd.Init("/etc/curve/client.conf") # 后续示例省略初始化过程
-
-# 参数:三个参数分别为
-# 文件全路径
-# 文件所属用户信息
-# 文件大小
-# 返回值:返回0表示创建成功,否则返回错误码
-
-# 首先初始化user信息(curvefs的控制面接口都有用户信息验证,都需要传入用户信息)
-user = curvefs.UserInfo_t()
-user.owner = "curve"
-user.password = "" # 密码为空时,可以省略
-
-# 调用Create接口创建文件
-cbd.Create("/curve", user, 10*1024*1024*1024)
-
-# UserInfo定义如下
-typedef struct UserInfo {
- char owner[256]; # 用户名
- char password[256]; # 用户密码
-} UserInfo_t;
-```
-
-#### 查看文件信息
-
-```python
-# 参数:三个参数分别为
-# 文件名
-# 用户信息
-# 文件信息[出参]
-# 返回值:返回0表示获取成功,否则返回错误码
-
-# 构造user信息
-user = curvefs.UserInfo_t()
-user.owner = "curve"
-
-# 构造file信息
-finfo = curvefs.FileInfo_t()
-
-# 查看文件信息
-cbd.StatFile("/curve", user, finfo)
-print finfo.filetype
-print finfo.length
-print finfo.ctime
-
-# FileInfo定义如下
-typedef struct FileInfo {
- uint64_t id;
- uint64_t parentid;
- int filetype; # 卷类型
- uint64_t length; # 卷大小
- uint64_t ctime; # 卷创建时间
- char filename[256]; # 卷名
- char owner[256]; # 卷所属用户
- int fileStatus; # 卷状态
-} FileInfo_t;
-
-# 文件状态
-#define CURVE_FILE_CREATED 0
-#define CURVE_FILE_DELETING 1
-#define CURVE_FILE_CLONING 2
-#define CURVE_FILE_CLONEMETAINSTALLED 3
-#define CURVE_FILE_CLONED 4
-#define CURVE_FILE_BEINGCLONED 5
-```
-
-#### 扩容文件
-
-```python
-# 参数:三个参数分别为
-# 文件名
-# 用户信息
-# 扩容后文件大小
-# 返回值:返回0表示扩容成功,否则返回错误码
-
-# 构造user信息
-user = curvefs.UserInfo_t()
-user.owner = "curve"
-
-# 扩容
-cbd.Extend("/curve", user, 20*1024*1024*1024)
-
-# 查看扩容后的文件信息
-finfo = curvefs.FileInfo_t()
-cbd.StatFile("/curve", user, finfo)
-print finfo.length
-```
-
-#### 打开/关闭文件
-
-```python
-# 打开文件
-# 参数:两个参数分别为
-# 文件名
-# 用户信息
-# 返回值:打开成功返回文件fd,否则返回错误码
-
-# 构造user信息
-user = curvefs.UserInfo_t()
-user.owner = "user1"
-
-# 打开文件,返回fd
-fd = cbd.Open("/tmp1", user)
-
-# 关闭文件
-# 参数:打开文件时返回的fd
-# 返回值:关闭成功返回0,否则返回错误码
-cbd.Close(fd)
-```
-
-#### 读写文件
-
-```python
-# 写文件
-# 参数:四个参数分别为
-# 文件fd
-# 待写入数据
-# 偏移量
-# 写入数据长度
-# 返回值:写入成功返回写入字节数,否则返回错误码
-
-# 构造user信息
-user = curvefs.UserInfo_t()
-user.owner = "user1"
-
-# 打开文件,返回fd
-fd = cbd.Open("/tmp1", user)
-
-# 写文件(目前读写都需要4k对齐)
-cbd.Write(fd, "aaaaaaaa"*512, 0, 4096)
-cbd.Write(fd, "bbbbbbbb"*512, 4096, 4096)
-
-# 读文件
-# 参数:四个参数分别为
-# 文件fd
-# 空字符串
-# 偏移量
-# 读取数据长度
-# 返回值:读取成功返回读取数据,否则返回错误码
-
-# 读取的内容通过返回值返回,buf在此没有意义,可以传入一个空串
-cbd.Read(fd,"", 0, 4096)
-
-# 关闭文件
-cbd.Close(fd)
-```
-
-备注:当前python api接口,不支持异步读写
-
-#### 删除文件
-
-```python
-# 参数:两个参数分别为
-# 文件名
-# 用户信息
-# 返回值:删除成功返回0,否则返回错误码
-
-# 构造user信息
-user = curvefs.UserInfo_t()
-user.owner = "curve"
-
-# 删除文件
-cbd.Unlink("/curve", user)
-```
-
-#### 重命名文件
-
-```python
-# 参数:三个参数分别为
-# 用户信息
-# 旧文件名
-# 新文件名
-# 返回值:成功返回0,否则返回错误码
-
-# 构造user信息
-user = curvefs.UserInfo_t()
-user.owner = "curve"
-
-# 重命名
-cbd.Rename(user, "/curve", "/curve-new")
-```
-
-#### 创建目录
-
-```python
-# 参数:两个参数分别为
-# 目录路径
-# 用户信息
-# 返回值:成功返回0,否则返回错误码
-
-# 构造user信息
-user = curvefs.UserInfo_t()
-user.owner = "curve"
-# 创建目录
-cbd.Mkdir("/curvedir", user)
-```
-
-#### 删除目录
-
-```python
-# 参数:两个参数分别为
-# 目录路径
-# 用户信息
-# 返回值:成功返回0,否则返回错误码
-
-# 构造user信息
-user = curvefs.UserInfo_t()
-user.owner = "curve"
-
-# 删除目录
-cbd.Rmdir("/curvedir", user)
-```
-
-#### 获取目录下的文件
-
-```python
-# 参数:两个参数分别为
-# 目录路径
-# 用户信息
-# 返回值:当前目录下的文件列表(只包括文件名)
-files = cbd.Listdir("/test", user)
-for f in files:
- print f
-```
-
-#### 获取集群ID
-
-```python
-# 通过返回值判断是否获取成功
-# 成功返回集群id字符串
-# 失败返回空字符串
-clusterId = cbd.GetClusterId()
-print clusterId
-# c355675a-f4d2-4729-b80a-5a7bcc749d1c
-```
-
-#### 清理CBDClient对象
-
-```python
-cbd.UnInit()
-```
-
-### 错误码
-
-| Code | Message | 描述 |
-| :--: | :-------------------------- | ------------------------ |
-| 0 | OK | 操作成功 |
-| -1 | EXISTS | 文件或目录已存存在 |
-| -2 | FAILED | 操作失败 |
-| -3 | DISABLEDIO | 禁止IO |
-| -4 | AUTHFAIL | 认证失败 |
-| -5 | DELETING | 正在删除 |
-| -6 | NOTEXIST | 文件不存在 |
-| -7 | UNDER_SNAPSHOT | 快照中 |
-| -8 | NOT_UNDERSNAPSHOT | 非快照状态 |
-| -9 | DELETE_ERROR | 删除错误 |
-| -10 | NOT_ALLOCATE | Segment未分配 |
-| -11 | NOT_SUPPORT | 操作不支持 |
-| -12 | NOT_EMPTY | 目录非空 |
-| -13 | NO_SHRINK_BIGGER_FILE | 禁止缩容 |
-| -14 | SESSION_NOTEXISTS | Session不存在 |
-| -15 | FILE_OCCUPIED | 文件被占用 |
-| -16 | PARAM_ERROR | 参数错误 |
-| -17 | INTERNAL_ERROR | 内部错误 |
-| -18 | CRC_ERROR | CRC检查错误 |
-| -19 | INVALID_REQUEST | 请求参数存在异常 |
-| -20 | DISK_FAIL | 磁盘异常 |
-| -21 | NO_SPACE | 空间不足 |
-| -22 | NOT_ALIGNED | IO未对齐 |
-| -23 | BAD_FD | 文件正在被关闭,fd不可用 |
-| -24 | LENGTH_NOT_SUPPORT | 文件长度不满足要求 |
-| -25 | SESSION_NOT_EXIST | Session不存在(与-14重复) |
-| -26 | STATUS_NOT_MATCH | 状态异常 |
-| -27 | DELETE_BEING_CLONED | 删除文件正在被克隆 |
-| -28 | CLIENT_NOT_SUPPORT_SNAPSHOT | Client版本不支持快照 |
-| -29 | SNAPSHOT_FROZEN | Snapshot功能禁用中 |
-| -100 | UNKNOWN | 未知错误 |
-
+[English version](../en/curve-client-python-api_en.md)
+
+#### 获取一个与curve集群交互的CBDClient对象
+
+```python
+import curvefs
+
+# 获取一个与后端集群交互的CBDClient对象,不同的CBDClient对象可以与不同的集群建立连接
+cbd1 = curvefs.CBDClient()
+cbd2 = curvefs.CBDClient()
+```
+
+#### 初始化CBDClient
+
+```python
+import curvefs
+cbd = curvefs.CBDClient()
+
+# 参数:curve-client配置文件的绝对路径
+# 返回值:返回0表示初始化成功,-1表示初始化失败
+cbd.Init("/etc/curve/client.conf")
+```
+
+#### 创建文件
+
+```python
+import curvefs
+cbd = curvefs.CBDClient()
+cbd.Init("/etc/curve/client.conf") # 后续示例省略初始化过程
+
+# 参数:三个参数分别为
+# 文件全路径
+# 文件所属用户信息
+# 文件大小
+# 返回值:返回0表示创建成功,否则返回错误码
+
+# 首先初始化user信息(curvefs的控制面接口都有用户信息验证,都需要传入用户信息)
+user = curvefs.UserInfo_t()
+user.owner = "curve"
+user.password = "" # 密码为空时,可以省略
+
+# 调用Create接口创建文件
+cbd.Create("/curve", user, 10*1024*1024*1024)
+
+# UserInfo定义如下
+typedef struct UserInfo {
+ char owner[256]; # 用户名
+ char password[256]; # 用户密码
+} UserInfo_t;
+```
+
+#### 查看文件信息
+
+```python
+# 参数:三个参数分别为
+# 文件名
+# 用户信息
+# 文件信息[出参]
+# 返回值:返回0表示获取成功,否则返回错误码
+
+# 构造user信息
+user = curvefs.UserInfo_t()
+user.owner = "curve"
+
+# 构造file信息
+finfo = curvefs.FileInfo_t()
+
+# 查看文件信息
+cbd.StatFile("/curve", user, finfo)
+print finfo.filetype
+print finfo.length
+print finfo.ctime
+
+# FileInfo定义如下
+typedef struct FileInfo {
+ uint64_t id;
+ uint64_t parentid;
+ int filetype; # 卷类型
+ uint64_t length; # 卷大小
+ uint64_t ctime; # 卷创建时间
+ char filename[256]; # 卷名
+ char owner[256]; # 卷所属用户
+ int fileStatus; # 卷状态
+} FileInfo_t;
+
+# 文件状态
+#define CURVE_FILE_CREATED 0
+#define CURVE_FILE_DELETING 1
+#define CURVE_FILE_CLONING 2
+#define CURVE_FILE_CLONEMETAINSTALLED 3
+#define CURVE_FILE_CLONED 4
+#define CURVE_FILE_BEINGCLONED 5
+```
+
+#### 扩容文件
+
+```python
+# 参数:三个参数分别为
+# 文件名
+# 用户信息
+# 扩容后文件大小
+# 返回值:返回0表示扩容成功,否则返回错误码
+
+# 构造user信息
+user = curvefs.UserInfo_t()
+user.owner = "curve"
+
+# 扩容
+cbd.Extend("/curve", user, 20*1024*1024*1024)
+
+# 查看扩容后的文件信息
+finfo = curvefs.FileInfo_t()
+cbd.StatFile("/curve", user, finfo)
+print finfo.length
+```
+
+#### 打开/关闭文件
+
+```python
+# 打开文件
+# 参数:两个参数分别为
+# 文件名
+# 用户信息
+# 返回值:打开成功返回文件fd,否则返回错误码
+
+# 构造user信息
+user = curvefs.UserInfo_t()
+user.owner = "user1"
+
+# 打开文件,返回fd
+fd = cbd.Open("/tmp1", user)
+
+# 关闭文件
+# 参数:打开文件时返回的fd
+# 返回值:关闭成功返回0,否则返回错误码
+cbd.Close(fd)
+```
+
+#### 读写文件
+
+```python
+# 写文件
+# 参数:四个参数分别为
+# 文件fd
+# 待写入数据
+# 偏移量
+# 写入数据长度
+# 返回值:写入成功返回写入字节数,否则返回错误码
+
+# 构造user信息
+user = curvefs.UserInfo_t()
+user.owner = "user1"
+
+# 打开文件,返回fd
+fd = cbd.Open("/tmp1", user)
+
+# 写文件(目前读写都需要4k对齐)
+cbd.Write(fd, "aaaaaaaa"*512, 0, 4096)
+cbd.Write(fd, "bbbbbbbb"*512, 4096, 4096)
+
+# 读文件
+# 参数:四个参数分别为
+# 文件fd
+# 空字符串
+# 偏移量
+# 读取数据长度
+# 返回值:读取成功返回读取数据,否则返回错误码
+
+# 读取的内容通过返回值返回,buf在此没有意义,可以传入一个空串
+cbd.Read(fd,"", 0, 4096)
+
+# 关闭文件
+cbd.Close(fd)
+```
+
+备注:当前python api接口,不支持异步读写
+
+#### 删除文件
+
+```python
+# 参数:两个参数分别为
+# 文件名
+# 用户信息
+# 返回值:删除成功返回0,否则返回错误码
+
+# 构造user信息
+user = curvefs.UserInfo_t()
+user.owner = "curve"
+
+# 删除文件
+cbd.Unlink("/curve", user)
+```
+#### 恢复文件
+
+```python
+# 参数:三个参数分别为
+# 文件名
+# 用户信息
+# 文件id(可选,默认为0)
+# 返回值:恢复成功返回0,否则返回错误码
+
+# 构造user信息
+user = curvefs.UserInfo_t()
+user.owner = "curve"
+
+# 恢复文件
+cbd.Recover("/curve", user, 0)
+```
+
+#### 重命名文件
+
+```python
+# 参数:三个参数分别为
+# 用户信息
+# 旧文件名
+# 新文件名
+# 返回值:成功返回0,否则返回错误码
+
+# 构造user信息
+user = curvefs.UserInfo_t()
+user.owner = "curve"
+
+# 重命名
+cbd.Rename(user, "/curve", "/curve-new")
+```
+
+#### 创建目录
+
+```python
+# 参数:两个参数分别为
+# 目录路径
+# 用户信息
+# 返回值:成功返回0,否则返回错误码
+
+# 构造user信息
+user = curvefs.UserInfo_t()
+user.owner = "curve"
+# 创建目录
+cbd.Mkdir("/curvedir", user)
+```
+
+#### 删除目录
+
+```python
+# 参数:两个参数分别为
+# 目录路径
+# 用户信息
+# 返回值:成功返回0,否则返回错误码
+
+# 构造user信息
+user = curvefs.UserInfo_t()
+user.owner = "curve"
+
+# 删除目录
+cbd.Rmdir("/curvedir", user)
+```
+
+#### 获取目录下的文件
+
+```python
+# 参数:两个参数分别为
+# 目录路径
+# 用户信息
+# 返回值:当前目录下的文件列表(只包括文件名)
+files = cbd.Listdir("/test", user)
+for f in files:
+ print f
+```
+
+#### 获取集群ID
+
+```python
+# 通过返回值判断是否获取成功
+# 成功返回集群id字符串
+# 失败返回空字符串
+clusterId = cbd.GetClusterId()
+print clusterId
+# c355675a-f4d2-4729-b80a-5a7bcc749d1c
+```
+
+#### 清理CBDClient对象
+
+```python
+cbd.UnInit()
+```
+
+### 错误码
+
+| Code | Message | 描述 |
+| :--: | :-------------------------- | ------------------------ |
+| 0 | OK | 操作成功 |
+| -1 | EXISTS | 文件或目录已存存在 |
+| -2 | FAILED | 操作失败 |
+| -3 | DISABLEDIO | 禁止IO |
+| -4 | AUTHFAIL | 认证失败 |
+| -5 | DELETING | 正在删除 |
+| -6 | NOTEXIST | 文件不存在 |
+| -7 | UNDER_SNAPSHOT | 快照中 |
+| -8 | NOT_UNDERSNAPSHOT | 非快照状态 |
+| -9 | DELETE_ERROR | 删除错误 |
+| -10 | NOT_ALLOCATE | Segment未分配 |
+| -11 | NOT_SUPPORT | 操作不支持 |
+| -12 | NOT_EMPTY | 目录非空 |
+| -13 | NO_SHRINK_BIGGER_FILE | 禁止缩容 |
+| -14 | SESSION_NOTEXISTS | Session不存在 |
+| -15 | FILE_OCCUPIED | 文件被占用 |
+| -16 | PARAM_ERROR | 参数错误 |
+| -17 | INTERNAL_ERROR | 内部错误 |
+| -18 | CRC_ERROR | CRC检查错误 |
+| -19 | INVALID_REQUEST | 请求参数存在异常 |
+| -20 | DISK_FAIL | 磁盘异常 |
+| -21 | NO_SPACE | 空间不足 |
+| -22 | NOT_ALIGNED | IO未对齐 |
+| -23 | BAD_FD | 文件正在被关闭,fd不可用 |
+| -24 | LENGTH_NOT_SUPPORT | 文件长度不满足要求 |
+| -25 | SESSION_NOT_EXIST | Session不存在(与-14重复) |
+| -26 | STATUS_NOT_MATCH | 状态异常 |
+| -27 | DELETE_BEING_CLONED | 删除文件正在被克隆 |
+| -28 | CLIENT_NOT_SUPPORT_SNAPSHOT | Client版本不支持快照 |
+| -29 | SNAPSHOT_FROZEN | Snapshot功能禁用中 |
+| -100 | UNKNOWN | 未知错误 |
+
diff --git a/docs/cn/curve_ops_tool.md b/docs/cn/curve_ops_tool.md
index 1f6e9029e0..c3621d4d78 100644
--- a/docs/cn/curve_ops_tool.md
+++ b/docs/cn/curve_ops_tool.md
@@ -1,3 +1,5 @@
+[English version](../en/curve_ops_tool_en.md)
+