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