更新 '存储/ceph/base.md'
This commit is contained in:
parent
8a4ce7e6ff
commit
fda0534475
1 changed files with 39 additions and 0 deletions
|
@ -182,6 +182,45 @@ virsh edit xxx
|
||||||
</disk>
|
</disk>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 文件存储
|
||||||
|
```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 <data-name> 128
|
||||||
|
# 创建存储池,用于存放inode.128PG
|
||||||
|
ceph osd poll create <inode-name> 128
|
||||||
|
# 查看mds状态
|
||||||
|
ceph mds stat
|
||||||
|
|
||||||
|
# 创建文件系统
|
||||||
|
ceph fs new <fs-name> <inode-name> <data-name>
|
||||||
|
# 查看文件系统
|
||||||
|
ceph ls fs
|
||||||
|
# 挂载
|
||||||
|
mount -t ceph <mon-ip>:6789:/ /mnt -o name=admin,secret=<client.admin.key>
|
||||||
|
```
|
||||||
|
|
||||||
|
## 对象存储
|
||||||
|
```shell
|
||||||
|
# admin
|
||||||
|
ceph-deploy install --rgw node5
|
||||||
|
# 以下命令一样
|
||||||
|
yum install -y ceph-radosgw
|
||||||
|
ceph-deploy rgw create node5
|
||||||
|
# 修改服务端口,若需要
|
||||||
|
cat >> /etc/ceph.conf <<EOF
|
||||||
|
[client.rgw.node5]
|
||||||
|
host=node5
|
||||||
|
rgw_frontends='civetweb.port=8000'
|
||||||
|
EOF
|
||||||
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue