]> git.proxmox.com Git - ceph.git/blame - ceph/doc/man/8/ceph-bluestore-tool.rst
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / doc / man / 8 / ceph-bluestore-tool.rst
CommitLineData
3efd9988
FG
1:orphan:
2
3======================================================
4 ceph-bluestore-tool -- bluestore administrative tool
5======================================================
6
7.. program:: ceph-bluestore-tool
8
9Synopsis
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
27Description
28===========
29
30**ceph-bluestore-tool** is a utility to perform low-level administrative
31operations on a BlueStore instance.
32
33Commands
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
84Options
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
120Device labels
121=============
122
123Every BlueStore block device has a single block label at the beginning of the
124device. You can dump the contents of the label with::
125
126 ceph-bluestore-tool show-label --dev *device*
127
128The main device will have a lot of metadata, including information
129that used to be stored in small files in the OSD data directory. The
11fdf7f2 130auxiliary devices (db and wal) will only have the minimum required
3efd9988
FG
131fields (OSD UUID, size, device type, birth time).
132
133OSD directory priming
134=====================
135
136You can generate the content for an OSD data directory that can start up a
137BlueStore 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
142Availability
143============
144
145**ceph-bluestore-tool** is part of Ceph, a massively scalable,
146open-source, distributed storage system. Please refer to the Ceph
147documentation at http://ceph.com/docs for more information.
148
149
150See also
151========
152
153:doc:`ceph-osd <ceph-osd>`\(8)