k8s
Docker常用操作
Docker推送本地镜像到内网Harbor
Harbor 部署
使用kk部署kubesphere
kubernetes 挂载 configMap 中的单个文件
Jenkins
使用Docker部署Apt-Cacher-ng服务
序列图
kubernetes拉取内网Harbor中的私有镜像
rook-ceph 使用常见问题
ingress-nginx 安装与使用
gitlab ubuntu 安装文档
gitlab runner 相关问题
minio 常用操作
202304代办列表
redis 常用操作
curve 常用操作
kubeadm搭建k8s集群
如何将 kubeadm init 需要的镜像离线到本地 Harbor
前置依赖安装
podman非根用户容器开机自启
本文档使用 MrDoc 发布
-
+
首页
curve 常用操作
[部署 CurveBS 客户端](https://github.com/opencurve/curveadm/wiki/curvebs-client-deployment) [CurveAdm 常见运维操作](https://github.com/opencurve/curveadm/wiki/maintain-curve) [Curve块存储应用实践之nbd](https://github.com/opencurve/curve-meetup-slides/blob/b7fd3b69201b9561c4f3d30ab71ae5bae31ec3f2/PrePaper/2022/cw123/20221205/Curve%E5%9D%97%E5%AD%98%E5%82%A8%E5%BA%94%E7%94%A8%E5%AE%9E%E8%B7%B5%E4%B9%8Bnbd.md) ## curve 挂载nbd设备 将客户主机导入配置文件 ``` vim hosts.yaml curveadm hosts commit hosts.yaml ``` 修改客户端配置 `vim client.yaml` ``` kind: curvebs container_image: opencurvedocker/curvebs:v1.2 mds.listen.addr: 10.0.1.1:6700,10.0.1.2:6700,10.0.1.3:6700 log_dir: /var/log/curve_client ``` ## 映射 CurveBS 卷 ``` curveadm map dtdream:/vol1 --host client-host1 -c client.yaml --create --size 100GiB ``` - `<volume-user>`: 该卷所属用户名,用户可自行定义 - `<volume-name>`: 卷名,用户可自行定义 - `--host`: 将卷挂载到指定主机,用户可自行选择,请确保该主机已被导入 - `--create`:当卷不存在时,则自行创建 - `--size`: 指定创建卷的大小,默认为 10GB - `-c`: 指定客户端配置文件 创建的卷大小为逻辑大小,注意不要超出总的逻辑大小。通过 `curve_ops_tool space` 查看物理空间和逻辑空间: ``` root@curvebs-chunkserver-ea0d3147d143:/curvebs/chunkserver# curve_ops_tool space Space info: physical: total = 528GB, used = 11GB(2.22%), left = 516GB(97.78%) logical: total = 176GB, used = 0GB(0.00%, can be recycled = 0GB(0.00%)), left = 176GB(100.00%), created file size = 0GB(0.00%) ``` ``` # 查看nbd设备 lsblk | grep nbd # 挂载nbd设备 mount /dev/nbd0 /nbd0/ # 格式化nbd设备 mkfs.ext4 /dev/nbd0 # 取消 CurveBS 卷映射 curveadm unmap dtdream:/vol1 --host client-host1 ``` ``` # 进入chunkserver curveadm enter xxxxxxxx # 查看文件列表 curve_ops_tool list --fileName=/ # 删除创建的 CurveBS 卷 curve_ops_tool delete --fileName=/pgdata # 清理回收站,如果执行完命令后空间始终没有释放,可能是某些节点挂掉了,需要先修复节点 curve_ops_tool clean-recycle # 查看空间占用 curve_ops_tool space ``` > 测试发现将一个卷映射到两台主机时,对文件的修改没有实时同步。 > 应该需要通过 [格式化并挂载 PFS](https://apsaradb.github.io/PolarDB-for-PostgreSQL/zh/deploying/fs-pfs.html) 挂载到多处? ## help ``` root@curvebs-chunkserver-9b0ffaa4a04d:/curvebs/chunkserver# curve_ops_tool --help curve_ops_tool: Usage: curve_ops_tool [Command] [OPTIONS...] COMMANDS: space : show curve all disk type space, include total space and used space status : show the total status of the cluster chunkserver-status : show the chunkserver online status mds-status : show the mds status client-status : show the client status client-list : list all client etcd-status : show the etcd status snapshot-clone-status : show the snapshot clone server status copysets-status : check the health state of all copysets chunkserver-list : show curve chunkserver-list, list all chunkserver information server-list : list all server information logical-pool-list : list all logical pool information cluster-status : show cluster status get : show the file info and the actual space of file list : list the file info of files in the directory seginfo : list the segments info of the file delete : delete the file, to force delete, should specify the --forcedelete=true clean-recycle : clean the RecycleBin create : create file, file length unit is GB chunk-location : query the location of the chunk corresponding to the offset check-consistency : check the consistency of three copies remove-peer : remove the peer from the copyset transfer-leader : transfer the leader of the copyset to the peer reset-peer : reset the configuration of copyset, only reset to one peer is supported do-snapshot : do snapshot of the peer of the copyset do-snapshot-all : do snapshot of all peers of all copysets check-chunkserver : check the health state of the chunkserver check-copyset : check the health state of one copyset check-server : check the health state of the server check-operator : check the operators list-may-broken-vol: list all volumes on majority offline copysets rapid-leader-schedule: rapid leader schedule in cluster in logicalpool ```
幻翼
2023年4月12日 09:36
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
分享
链接
类型
密码
更新密码