使用docker安装ceph

使用docker安装ceph #划分子网 docker network create –driver bridge –subnet 172.20.0.0/16 ceph-network docker network ls docker network inspect ceph-network #用于存放ceph配置 mkdir -p /myceph/etc/ceph #创建目录代表osd mkdir -p /myceph/osd/0 /myceph/osd/1 /myceph/osd/2 # monitor node docker run -itd –name monnode –network ceph-network –ip 172.20.0.10 -e MON_NAME=monnode -e MON_IP=172.20.0.10 -v /myceph/etc/ceph:/etc/ceph ceph/mon # docker exec monnode ceph osd create docker exec… Continue reading 使用docker安装ceph

Published
Categorized as ceph, storage

快照与备份的区别

定义 SNIA对快照的描述: A point in time copy of a defined collection of data. 快照有全量快照和增量快照.我们常用的基本是增量快照(delta snapshot) A type of point in time copy that preserves the state of data at an instant in time, by storing only those blocks that are different from an already existing full copy of the data. 主要特点是,快照是虚拟的拷贝而不是物理的拷贝,只有发生过修改的block才会被重写.因此如果完全没有被修改过的块遭遇破坏而导致的存储错误.快照回滚也无法修复. 目的 做快照,通常有2个目的: + 一是为了将来对于删除或损坏的文件能够进行恢复… Continue reading 快照与备份的区别

Published
Categorized as poem

结合vmstat分析iostat输出结果

man vmstat FIELD DESCRIPTION FOR VM MODE Procs r: The number of processes waiting for run time. r 表示运行队列 (就是说多少个进程真的分配到CPU). 当这个值超过了CPU数目, 就会出现CPU瓶颈. b: The number of processes in uninterruptible sleep. Memory swpd: the amount of virtual memory used. free: the amount of idle memory. buff: the amount of memory used as buffers. cache: the amount… Continue reading 结合vmstat分析iostat输出结果

使用iostat分析问题

文章来源: How I Use Iostat and Vmstat for Performance Analysis 考虑到svctm在iostat是不保证准确的. 分析io await相关问题需要和blktrace结合起来分析. 1. Is the I/O heavy? Check the sum of w/s and r/s. The larger, the heavier I/O. Also check %util, the more, the heavier. If it is close to 100, then the I/O is definitely significant. It should be noted that during… Continue reading 使用iostat分析问题

PYTHONPATH作用

尝试使用命令行执行自己的一个小项目,抛出了异常 (venv) [root@node2 hui-cache-test]# python system-info-data/src/main.py Traceback (most recent call last): File “system-info-data/src/main.py”, line 1, in <module> from src.iostat.collect_op import * ModuleNotFoundError: No module named ‘src’ Google一番原来是需要配置$PYTHONPATH export PYTHONPATH=path-to-project-directory:$PYTHONPATH #export PYTHONPATH=/root/hui-cache-test/system-info-data:$PYTHONPATH

Published
Categorized as py