Skip to content
Snippets Groups Projects
Commit aad8df8c authored by Antonio Falabella's avatar Antonio Falabella
Browse files

push conf

parent c16b7c71
No related branches found
No related tags found
No related merge requests found
......@@ -18,21 +18,54 @@ ceph osd crush rm-device-class osd.1
ceph osd crush set-device-class nvme osd.1
```
Add bucket type to hierarchy:
```
ceph osd crush add-bucket group1 host
ceph osd crush set 0 1.0 host=group1
```
Define the crush map rule
```
ceph osd crush rule create-replicated nvme_meta default host nvme
ceph osd crush rule create-replicated data default host hdd
ceph osd crush rule create-replicated hdd_data default host hdd
```
## Manual edit crush crush map
```
ceph osd getcrushmap -o crush.map
crushtool -d crush.map -o decompiled.map
crushtool -c decompiled.map -o manual.map
ceph osd setcrushmap -i manual.map
ceph osd crush rule create-replicated data_custom default custom_group hdd
```
## Pools
```
ceph osd pool create ceph_data 1024 replicated data 30
ceph osd pool create ceph_data 1024 replicated hdd_data
ceph osd pool set ceph_data size 2
ceph osd pool create ceph_metadata 2 replicated nvme_meta
ceph osd pool set ceph_metadata size 2
ceph osd force-create-pg 2.0 --yes-i-really-mean-it
```
## Filesystems
```
ceph fs new cephfs ceph_metadata ceph_data
```
## Authentication
```
ceph auth get-or-create client.1 mon 'allow r' mds 'allow rw' osd 'allow rw pool=ceph_data'
```
## Mount the filesystem
Copy the content of the key to client that is going to mount the fs
```
[client.1]
key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXx==
```
Create a file `/etc/ceph/client.admin` with content
```
XXXXXXXXXXXXXXXXXXXXXXXXXXXXx==
```
and then issue
```
mount -v -t ceph 131.154.130.69:6789:/ /mnt/ceph -o name=1,secretfile=/etc/ceph/client.admin
```
ceph-deploy --overwrite-conf config push cs-001
ceph-deploy --overwrite-conf config push cs-002
ceph-deploy --overwrite-conf config push ds-001
ceph-deploy --overwrite-conf config push ds-303
ceph-deploy --overwrite-conf config push ds-304
ceph-deploy --overwrite-conf config push ds-507
ceph-deploy --overwrite-conf config push qn-cnfslhc
ssh root@ds-001 systemctl restart ceph-mon@ds-001
ssh root@cs-001 systemctl restart ceph-mon@cs-001
ssh root@ds-303 systemctl restart ceph-mon@ds-303
ssh root@ds-507 systemctl restart ceph-mon@ds-507
ssh root@qn-cnfslhc systemctl restart ceph-mon@qn-cnfslhc
ssh root@qn-cnfslhc systemctl restart ceph-mgr@qn-cnfslhc
ssh root@ds-001 systemctl restart ceph-mgr@ds-001
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment