.\" Man page generated from reStructuredText. . .TH "CEPH-BLUESTORE-TOOL" "8" "Jun 11, 2021" "dev" "Ceph" .SH NAME ceph-bluestore-tool \- bluestore administrative tool . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .nf \fBceph\-bluestore\-tool\fP \fIcommand\fP [ \-\-dev \fIdevice\fP ... ] [ \-\-path \fIosd path\fP ] [ \-\-out\-dir \fIdir\fP ] [ \-\-log\-file | \-l \fIfilename\fP ] [ \-\-deep ] \fBceph\-bluestore\-tool\fP fsck|repair \-\-path \fIosd path\fP [ \-\-deep ] \fBceph\-bluestore\-tool\fP show\-label \-\-dev \fIdevice\fP ... \fBceph\-bluestore\-tool\fP prime\-osd\-dir \-\-dev \fIdevice\fP \-\-path \fIosd path\fP \fBceph\-bluestore\-tool\fP bluefs\-export \-\-path \fIosd path\fP \-\-out\-dir \fIdir\fP \fBceph\-bluestore\-tool\fP bluefs\-bdev\-new\-wal \-\-path \fIosd path\fP \-\-dev\-target \fInew\-device\fP \fBceph\-bluestore\-tool\fP bluefs\-bdev\-new\-db \-\-path \fIosd path\fP \-\-dev\-target \fInew\-device\fP \fBceph\-bluestore\-tool\fP bluefs\-bdev\-migrate \-\-path \fIosd path\fP \-\-dev\-target \fInew\-device\fP \-\-devs\-source \fIdevice1\fP [\-\-devs\-source \fIdevice2\fP] \fBceph\-bluestore\-tool\fP free\-dump|free\-score \-\-path \fIosd path\fP [ \-\-allocator block/bluefs\-wal/bluefs\-db/bluefs\-slow ] .fi .sp .SH DESCRIPTION .sp \fBceph\-bluestore\-tool\fP is a utility to perform low\-level administrative operations on a BlueStore instance. .SH COMMANDS .sp \fBhelp\fP .INDENT 0.0 .INDENT 3.5 show help .UNINDENT .UNINDENT .sp \fBfsck\fP [ \-\-deep ] .INDENT 0.0 .INDENT 3.5 run consistency check on BlueStore metadata. If \fI\-\-deep\fP is specified, also read all object data and verify checksums. .UNINDENT .UNINDENT .sp \fBrepair\fP .INDENT 0.0 .INDENT 3.5 Run a consistency check \fIand\fP repair any errors we can. .UNINDENT .UNINDENT .sp \fBbluefs\-export\fP .INDENT 0.0 .INDENT 3.5 Export the contents of BlueFS (i.e., rocksdb files) to an output directory. .UNINDENT .UNINDENT .sp \fBbluefs\-bdev\-sizes\fP \-\-path \fIosd path\fP .INDENT 0.0 .INDENT 3.5 Print the device sizes, as understood by BlueFS, to stdout. .UNINDENT .UNINDENT .sp \fBbluefs\-bdev\-expand\fP \-\-path \fIosd path\fP .INDENT 0.0 .INDENT 3.5 Instruct BlueFS to check the size of its block devices and, if they have expanded, make use of the additional space. .UNINDENT .UNINDENT .sp \fBbluefs\-bdev\-new\-wal\fP \-\-path \fIosd path\fP \-\-dev\-target \fInew\-device\fP .INDENT 0.0 .INDENT 3.5 Adds WAL device to BlueFS, fails if WAL device already exists. .UNINDENT .UNINDENT .sp \fBbluefs\-bdev\-new\-db\fP \-\-path \fIosd path\fP \-\-dev\-target \fInew\-device\fP .INDENT 0.0 .INDENT 3.5 Adds DB device to BlueFS, fails if DB device already exists. .UNINDENT .UNINDENT .sp \fBbluefs\-bdev\-migrate\fP \-\-dev\-target \fInew\-device\fP \-\-devs\-source \fIdevice1\fP [\-\-devs\-source \fIdevice2\fP] .INDENT 0.0 .INDENT 3.5 Moves BlueFS data from source device(s) to the target one, source devices (except the main one) are removed on success. Target device can be both already attached or new device. In the latter case it\(aqs added to OSD replacing one of the source devices. Following replacement rules apply (in the order of precedence, stop on the first match): .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .IP \(bu 2 if source list has DB volume \- target device replaces it. .IP \(bu 2 if source list has WAL volume \- target device replace it. .IP \(bu 2 if source list has slow volume only \- operation isn\(aqt permitted, requires explicit allocation via new\-db/new\-wal command. .UNINDENT .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBshow\-label\fP \-\-dev \fIdevice\fP [...] .INDENT 0.0 .INDENT 3.5 Show device label(s). .UNINDENT .UNINDENT .sp \fBfree\-dump\fP \-\-path \fIosd path\fP [ \-\-allocator block/bluefs\-wal/bluefs\-db/bluefs\-slow ] .INDENT 0.0 .INDENT 3.5 Dump all free regions in allocator. .UNINDENT .UNINDENT .sp \fBfree\-score\fP \-\-path \fIosd path\fP [ \-\-allocator block/bluefs\-wal/bluefs\-db/bluefs\-slow ] .INDENT 0.0 .INDENT 3.5 Give a [0\-1] number that represents quality of fragmentation in allocator. 0 represents case when all free space is in one chunk. 1 represents worst possible fragmentation. .UNINDENT .UNINDENT .SH OPTIONS .INDENT 0.0 .TP .B \-\-dev *device* Add \fIdevice\fP to the list of devices to consider .UNINDENT .INDENT 0.0 .TP .B \-\-devs\-source *device* Add \fIdevice\fP to the list of devices to consider as sources for migrate operation .UNINDENT .INDENT 0.0 .TP .B \-\-dev\-target *device* Specify target \fIdevice\fP migrate operation or device to add for adding new DB/WAL. .UNINDENT .INDENT 0.0 .TP .B \-\-path *osd path* Specify an osd path. In most cases, the device list is inferred from the symlinks present in \fIosd path\fP\&. This is usually simpler than explicitly specifying the device(s) with \-\-dev. .UNINDENT .INDENT 0.0 .TP .B \-\-out\-dir *dir* Output directory for bluefs\-export .UNINDENT .INDENT 0.0 .TP .B \-l, \-\-log\-file *log file* file to log to .UNINDENT .INDENT 0.0 .TP .B \-\-log\-level *num* debug log level. Default is 30 (extremely verbose), 20 is very verbose, 10 is verbose, and 1 is not very verbose. .UNINDENT .INDENT 0.0 .TP .B \-\-deep deep scrub/repair (read and validate object data, not just metadata) .UNINDENT .INDENT 0.0 .TP .B \-\-allocator *name* Useful for \fIfree\-dump\fP and \fIfree\-score\fP actions. Selects allocator(s). .UNINDENT .SH DEVICE LABELS .sp Every BlueStore block device has a single block label at the beginning of the device. You can dump the contents of the label with: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C ceph\-bluestore\-tool show\-label \-\-dev *device* .ft P .fi .UNINDENT .UNINDENT .sp The main device will have a lot of metadata, including information that used to be stored in small files in the OSD data directory. The auxiliary devices (db and wal) will only have the minimum required fields (OSD UUID, size, device type, birth time). .SH OSD DIRECTORY PRIMING .sp You can generate the content for an OSD data directory that can start up a BlueStore OSD with the \fIprime\-osd\-dir\fP command: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C ceph\-bluestore\-tool prime\-osd\-dir \-\-dev *main device* \-\-path /var/lib/ceph/osd/ceph\-*id* .ft P .fi .UNINDENT .UNINDENT .SH BLUEFS LOG RESCUE .sp Some versions of BlueStore were susceptible to BlueFS log growing extremaly large \- beyond the point of making booting OSD impossible. This state is indicated by booting that takes very long and fails in _replay function. .INDENT 0.0 .TP .B This can be fixed by:: ceph\-bluestore\-tool fsck \-\-path \fIosd path\fP \-\-bluefs_replay_recovery=true .TP .B It is advised to first check if rescue process would be successfull:: ceph\-bluestore\-tool fsck \-\-path \fIosd path\fP \-\-bluefs_replay_recovery=true \-\-bluefs_replay_recovery_disable_compact=true .UNINDENT .sp If above fsck is successfull fix procedure can be applied. .SH AVAILABILITY .sp \fBceph\-bluestore\-tool\fP is part of Ceph, a massively scalable, open\-source, distributed storage system. Please refer to the Ceph documentation at \fI\%http://ceph.com/docs\fP for more information. .SH SEE ALSO .sp ceph\-osd(8) .SH COPYRIGHT 2010-2021, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0) .\" Generated by docutils manpage writer. .