diff --git a/存储/ceph/base.md b/存储/ceph/base.md index 3599efe..72f97f0 100644 --- a/存储/ceph/base.md +++ b/存储/ceph/base.md @@ -182,6 +182,45 @@ virsh edit xxx ``` +## 文件存储 +```shell +# mds服务器 +yum install -y ceph-mds +# admin +# 创建mds服务 +ceph-deploy mds create node4 +# 同步配置文件及key +ceph-deploy admin node4 +# 创建存储池 +# 创建存储池,用于存储block(块),128PG +# pg为2的次方,推荐64或128 +ceph osd pool create 128 +# 创建存储池,用于存放inode.128PG +ceph osd poll create 128 +# 查看mds状态 +ceph mds stat +# 创建文件系统 +ceph fs new +# 查看文件系统 +ceph ls fs +# 挂载 +mount -t ceph :6789:/ /mnt -o name=admin,secret= +``` + +## 对象存储 +```shell +# admin +ceph-deploy install --rgw node5 +# 以下命令一样 +yum install -y ceph-radosgw +ceph-deploy rgw create node5 +# 修改服务端口,若需要 +cat >> /etc/ceph.conf <