Skip to content

Commit 4ae6ae6

Browse files
committed
blog: fix old pre formatting markdown
Fix preformatted markdown in a couple nice old blog posts. Signed-off-by: Dan van der Ster <[email protected]>
1 parent 0786411 commit 4ae6ae6

File tree

2 files changed

+213
-173
lines changed
  • src/en/news/blog
    • 2017/new-luminous-cephfs-subtree-pinning
    • 2018/new-mimic-centralized-configuration-management

2 files changed

+213
-173
lines changed

src/en/news/blog/2017/new-luminous-cephfs-subtree-pinning/index.md

Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,28 @@ In Luminous, [multiple active metadata servers](http://ceph.com/community/new-lu
1515

1616
You can view the current subtree divisions of the file system by querying the admin socket of each MDS (on the host each MDS is operating on):
1717

18-
$ ceph fs status
19-
cephfs - 0 clients
20-
========
21-
+------+--------+-----+---------------+-------+-------+
22-
| Rank | Stat e | MDS | Activity | dns | inos |
23-
+------+--------+-----+---------------+-------+-------+
24-
| 0 | active | b | Reqs: 0 /s | 0 | 0 |
25-
| 1 | active | c | Reqs: 0 /s | 0 | 0 |
26-
| 2 | active | a | Reqs: 0 /s | 0 | 0 |
27-
+------+--------+-----+---------------+-------+-------+
28-
+-------------------+----------+-------+-------+
29-
| Pool | type | used | avail |
30-
+-------------------+----------+-------+-------+
31-
| cephfs_metadata | metadata | 4098 | 9554M |
32-
| cephfs_data | data | 0 | 9554M |
33-
+-------------------+----------+-------+-------+
34-
$ bin/ceph daemon mds.a get subtrees | jq '.[] | [.dir.path, .auth_first]'
35-
["~mds2", 2]
36-
["", 0]
37-
["/tmp", 2]
18+
```
19+
$ ceph fs status
20+
cephfs - 0 clients
21+
========
22+
+------+--------+-----+---------------+-------+-------+
23+
| Rank | Stat e | MDS | Activity | dns | inos |
24+
+------+--------+-----+---------------+-------+-------+
25+
| 0 | active | b | Reqs: 0 /s | 0 | 0 |
26+
| 1 | active | c | Reqs: 0 /s | 0 | 0 |
27+
| 2 | active | a | Reqs: 0 /s | 0 | 0 |
28+
+------+--------+-----+---------------+-------+-------+
29+
+-------------------+----------+-------+-------+
30+
| Pool | type | used | avail |
31+
+-------------------+----------+-------+-------+
32+
| cephfs_metadata | metadata | 4098 | 9554M |
33+
| cephfs_data | data | 0 | 9554M |
34+
+-------------------+----------+-------+-------+
35+
$ bin/ceph daemon mds.a get subtrees | jq '.[] | [.dir.path, .auth_first]'
36+
["~mds2", 2]
37+
["", 0]
38+
["/tmp", 2]
39+
```
3840

3941
The “” subtree is the root of the file system (“/”) and is always managed by rank 0. The “/tmp” subtree is being managed by rank 2. (A subtree path beginning with “~” is an internal subtree and not part of the file system hierarchy.)
4042

@@ -48,15 +50,17 @@ For example, it can prevent a directory from splitting into multiple subtrees an
4850

4951
Pinning a directory to a particular rank is done by setting an extended attribute:
5052

51-
$ setfattr -n ceph.dir.pin -v 2 /mnt/cephfs/tmp
52-
53+
```
54+
$ setfattr -n ceph.dir.pin -v 2 /mnt/cephfs/tmp
55+
```
5356
This has the effect of preventing the CephFS directory “/tmp” from being split into smaller subtrees and also pinning “/tmp” to rank 2 (if that rank exists). Once this is done, you may query the rank 2 MDS to see its subtree map:
5457

55-
$ ceph daemon mds.b get subtrees | jq '.[] | [.dir.path, .auth_first, .export_pin]'
56-
["", 0, -1]
57-
["~mds0", 0, -1]
58-
["/tmp", 2, 2]
59-
58+
```
59+
$ ceph daemon mds.b get subtrees | jq '.[] | [.dir.path, .auth_first, .export_pin]'
60+
["", 0, -1]
61+
["~mds0", 0, -1]
62+
["/tmp", 2, 2]
63+
```
6064
Here we can see that “/tmp” has its export_pin set to 2 and rank 2 is authoritative (auth_first).
6165

6266
(N.B. a pinned directory is only shipped to its rank if it is not empty.)
@@ -65,15 +69,16 @@ Here we can see that “/tmp” has its export_pin set to 2 and rank 2 is author
6569

6670
You may also have a hierarchy of pins. This means a child directory can have a pin set which overrides the pin of a parent. So we may have:
6771

68-
$ setfattr -n ceph.dir.pin -v 0 /mnt/cephfs/users/
69-
$ setfattr -n ceph.dir.pin -v 1 /mnt/cephfs/users/joe/
70-
$ ceph daemon mds.b get subtrees | jq '.[] | [.dir.path, .auth_first, .export_pin]'
71-
["", 0, -1]
72-
["~mds0", 0, -1]
73-
["/tmp", 2, 2]
74-
["/users/joe", 1, 1]
75-
["/users", 0, 0]
76-
72+
```
73+
$ setfattr -n ceph.dir.pin -v 0 /mnt/cephfs/users/
74+
$ setfattr -n ceph.dir.pin -v 1 /mnt/cephfs/users/joe/
75+
$ ceph daemon mds.b get subtrees | jq '.[] | [.dir.path, .auth_first, .export_pin]'
76+
["", 0, -1]
77+
["~mds0", 0, -1]
78+
["/tmp", 2, 2]
79+
["/users/joe", 1, 1]
80+
["/users", 0, 0]
81+
```
7782
The “/users” subtree sets a “default” pin for itself and its children (home directories) to rank 0. However, “/users/joe” has a pin to rank 1 which overrides the “/users” pin.
7883

7984
### Future Direction

0 commit comments

Comments
 (0)