]>
Commit | Line | Data |
---|---|---|
3efd9988 FG |
1 | :orphan: |
2 | ||
3 | ====================================================== | |
4 | ceph-bluestore-tool -- bluestore administrative tool | |
5 | ====================================================== | |
6 | ||
7 | .. program:: ceph-bluestore-tool | |
8 | ||
9 | Synopsis | |
10 | ======== | |
11 | ||
12 | | **ceph-bluestore-tool** *command* | |
13 | [ --dev *device* ... ] | |
14 | [ --path *osd path* ] | |
15 | [ --out-dir *dir* ] | |
16 | [ --log-file | -l *filename* ] | |
17 | [ --deep ] | |
18 | | **ceph-bluestore-tool** fsck|repair --path *osd path* [ --deep ] | |
19 | | **ceph-bluestore-tool** show-label --dev *device* ... | |
20 | | **ceph-bluestore-tool** prime-osd-dir --dev *device* --path *osd path* | |
21 | | **ceph-bluestore-tool** bluefs-export --path *osd path* --out-dir *dir* | |
11fdf7f2 TL |
22 | | **ceph-bluestore-tool** bluefs-bdev-new-wal --path *osd path* --dev-target *new-device* |
23 | | **ceph-bluestore-tool** bluefs-bdev-new-db --path *osd path* --dev-target *new-device* | |
24 | | **ceph-bluestore-tool** bluefs-bdev-migrate --path *osd path* --dev-target *new-device* --devs-source *device1* [--devs-source *device2*] | |
3efd9988 FG |
25 | |
26 | ||
27 | Description | |
28 | =========== | |
29 | ||
30 | **ceph-bluestore-tool** is a utility to perform low-level administrative | |
31 | operations on a BlueStore instance. | |
32 | ||
33 | Commands | |
34 | ======== | |
35 | ||
1adf2230 | 36 | :command:`help` |
3efd9988 FG |
37 | |
38 | show help | |
39 | ||
1adf2230 | 40 | :command:`fsck` [ --deep ] |
3efd9988 FG |
41 | |
42 | run consistency check on BlueStore metadata. If *--deep* is specified, also read all object data and verify checksums. | |
43 | ||
1adf2230 | 44 | :command:`repair` |
3efd9988 FG |
45 | |
46 | Run a consistency check *and* repair any errors we can. | |
47 | ||
1adf2230 | 48 | :command:`bluefs-export` |
3efd9988 FG |
49 | |
50 | Export the contents of BlueFS (i.e., rocksdb files) to an output directory. | |
51 | ||
1adf2230 | 52 | :command:`bluefs-bdev-sizes` --path *osd path* |
3efd9988 FG |
53 | |
54 | Print the device sizes, as understood by BlueFS, to stdout. | |
55 | ||
1adf2230 | 56 | :command:`bluefs-bdev-expand` --path *osd path* |
3efd9988 FG |
57 | |
58 | Instruct BlueFS to check the size of its block devices and, if they have expanded, make use of the additional space. | |
59 | ||
11fdf7f2 TL |
60 | :command:`bluefs-bdev-new-wal` --path *osd path* --dev-target *new-device* |
61 | ||
62 | Adds WAL device to BlueFS, fails if WAL device already exists. | |
63 | ||
64 | :command:`bluefs-bdev-new-db` --path *osd path* --dev-target *new-device* | |
65 | ||
66 | Adds DB device to BlueFS, fails if DB device already exists. | |
67 | ||
68 | :command:`bluefs-bdev-migrate` --dev-target *new-device* --devs-source *device1* [--devs-source *device2*] | |
69 | ||
70 | Moves BlueFS data from source device(s) to the target one, source devices | |
71 | (except the main one) are removed on success. Target device can be both | |
72 | already attached or new device. In the latter case it's added to OSD | |
73 | replacing one of the source devices. Following replacement rules apply | |
74 | (in the order of precedence, stop on the first match): | |
75 | ||
76 | - if source list has DB volume - target device replaces it. | |
77 | - if source list has WAL volume - target device replace it. | |
78 | - if source list has slow volume only - operation isn't permitted, requires explicit allocation via new-db/new-wal command. | |
79 | ||
1adf2230 | 80 | :command:`show-label` --dev *device* [...] |
3efd9988 FG |
81 | |
82 | Show device label(s). | |
83 | ||
84 | Options | |
85 | ======= | |
86 | ||
87 | .. option:: --dev *device* | |
88 | ||
89 | Add *device* to the list of devices to consider | |
90 | ||
11fdf7f2 TL |
91 | .. option:: --devs-source *device* |
92 | ||
93 | Add *device* to the list of devices to consider as sources for migrate operation | |
94 | ||
95 | .. option:: --dev-target *device* | |
96 | ||
97 | Specify target *device* migrate operation or device to add for adding new DB/WAL. | |
98 | ||
3efd9988 FG |
99 | .. option:: --path *osd path* |
100 | ||
101 | Specify an osd path. In most cases, the device list is inferred from the symlinks present in *osd path*. This is usually simpler than explicitly specifying the device(s) with --dev. | |
102 | ||
103 | .. option:: --out-dir *dir* | |
104 | ||
105 | Output directory for bluefs-export | |
106 | ||
107 | .. option:: -l, --log-file *log file* | |
108 | ||
109 | file to log to | |
110 | ||
111 | .. option:: --log-level *num* | |
112 | ||
113 | debug log level. Default is 30 (extremely verbose), 20 is very | |
114 | verbose, 10 is verbose, and 1 is not very verbose. | |
115 | ||
116 | .. option:: --deep | |
117 | ||
118 | deep scrub/repair (read and validate object data, not just metadata) | |
119 | ||
120 | Device labels | |
121 | ============= | |
122 | ||
123 | Every BlueStore block device has a single block label at the beginning of the | |
124 | device. You can dump the contents of the label with:: | |
125 | ||
126 | ceph-bluestore-tool show-label --dev *device* | |
127 | ||
128 | The main device will have a lot of metadata, including information | |
129 | that used to be stored in small files in the OSD data directory. The | |
11fdf7f2 | 130 | auxiliary devices (db and wal) will only have the minimum required |
3efd9988 FG |
131 | fields (OSD UUID, size, device type, birth time). |
132 | ||
133 | OSD directory priming | |
134 | ===================== | |
135 | ||
136 | You can generate the content for an OSD data directory that can start up a | |
137 | BlueStore OSD with the *prime-osd-dir* command:: | |
138 | ||
139 | ceph-bluestore-tool prime-osd-dir --dev *main device* --path /var/lib/ceph/osd/ceph-*id* | |
140 | ||
141 | ||
142 | Availability | |
143 | ============ | |
144 | ||
145 | **ceph-bluestore-tool** is part of Ceph, a massively scalable, | |
146 | open-source, distributed storage system. Please refer to the Ceph | |
147 | documentation at http://ceph.com/docs for more information. | |
148 | ||
149 | ||
150 | See also | |
151 | ======== | |
152 | ||
153 | :doc:`ceph-osd <ceph-osd>`\(8) |