1CEPH-BLUESTORE-TOOL(8)               Ceph               CEPH-BLUESTORE-TOOL(8)
2
3
4

NAME

6       ceph-bluestore-tool - bluestore administrative tool
7

SYNOPSIS

9       ceph-bluestore-tool command
10       [ --dev device ... ]
11       [ --path osd path ]
12       [ --out-dir dir ]
13       [ --log-file | -l filename ]
14       [ --deep ]
15       ceph-bluestore-tool fsck|repair --path osd path [ --deep ]
16       ceph-bluestore-tool show-label --dev device ...
17       ceph-bluestore-tool prime-osd-dir --dev device --path osd path
18       ceph-bluestore-tool bluefs-export --path osd path --out-dir dir
19       ceph-bluestore-tool bluefs-bdev-new-wal --path osd path --dev-target new-device
20       ceph-bluestore-tool bluefs-bdev-new-db --path osd path --dev-target new-device
21       ceph-bluestore-tool bluefs-bdev-migrate --path osd path --dev-target new-device --devs-source device1 [--devs-source device2]
22       ceph-bluestore-tool free-dump|free-score --path osd path [ --allocator block/bluefs-wal/bluefs-db/bluefs-slow ]
23
24

DESCRIPTION

26       ceph-bluestore-tool  is  a  utility to perform low-level administrative
27       operations on a BlueStore instance.
28

COMMANDS

30       help
31          show help
32
33       fsck [ --deep ]
34          run consistency check on BlueStore metadata.  If  --deep  is  speci‐
35          fied, also read all object data and verify checksums.
36
37       repair
38          Run a consistency check and repair any errors we can.
39
40       bluefs-export
41          Export  the  contents  of  BlueFS (i.e., rocksdb files) to an output
42          directory.
43
44       bluefs-bdev-sizes --path osd path
45          Print the device sizes, as understood by BlueFS, to stdout.
46
47       bluefs-bdev-expand --path osd path
48          Instruct BlueFS to check the size of its block devices and, if  they
49          have expanded, make use of the additional space.
50
51       bluefs-bdev-new-wal --path osd path --dev-target new-device
52          Adds WAL device to BlueFS, fails if WAL device already exists.
53
54       bluefs-bdev-new-db --path osd path --dev-target new-device
55          Adds DB device to BlueFS, fails if DB device already exists.
56
57       bluefs-bdev-migrate   --dev-target   new-device  --devs-source  device1
58       [--devs-source device2]
59          Moves BlueFS data from source device(s) to the  target  one,  source
60          devices  (except the main one) are removed on success. Target device
61          can be both already attached or new device. In the latter case  it's
62          added to OSD replacing one of the source devices. Following replace‐
63          ment rules apply (in the order of  precedence,  stop  on  the  first
64          match):
65
66              · if source list has DB volume - target device replaces it.
67
68              · if source list has WAL volume - target device replace it.
69
70              · if  source list has slow volume only - operation isn't permit‐
71                ted, requires explicit allocation via new-db/new-wal command.
72
73       show-label --dev device [...]
74          Show device label(s).
75
76       free-dump       --path       osd       path        [        --allocator
77       block/bluefs-wal/bluefs-db/bluefs-slow ]
78          Dump all free regions in allocator.
79
80       free-score        --path       osd       path       [       --allocator
81       block/bluefs-wal/bluefs-db/bluefs-slow ]
82          Give a [0-1] number that  represents  quality  of  fragmentation  in
83          allocator.  0 represents case when all free space is in one chunk. 1
84          represents worst possible fragmentation.
85

OPTIONS

87       --dev *device*
88              Add device to the list of devices to consider
89
90       --devs-source *device*
91              Add device to the list of devices to  consider  as  sources  for
92              migrate operation
93
94       --dev-target *device*
95              Specify  target  device  migrate  operation or device to add for
96              adding new DB/WAL.
97
98       --path *osd path*
99              Specify an osd path.  In most cases, the device list is inferred
100              from  the symlinks present in osd path.  This is usually simpler
101              than explicitly specifying the device(s) with --dev.
102
103       --out-dir *dir*
104              Output directory for bluefs-export
105
106       -l, --log-file *log file*
107              file to log to
108
109       --log-level *num*
110              debug log level.  Default is 30 (extremely verbose), 20 is  very
111              verbose, 10 is verbose, and 1 is not very verbose.
112
113       --deep deep scrub/repair (read and validate object data, not just meta‐
114              data)
115
116       --allocator *name*
117              Useful for free-dump and  free-score  actions.  Selects  alloca‐
118              tor(s).
119

DEVICE LABELS

121       Every  BlueStore block device has a single block label at the beginning
122       of the device.  You can dump the contents of the label with:
123
124          ceph-bluestore-tool show-label --dev *device*
125
126       The main device will have a lot of metadata, including information that
127       used to be stored in small files in the OSD data directory.  The auxil‐
128       iary devices (db and wal) will only have the  minimum  required  fields
129       (OSD UUID, size, device type, birth time).
130

OSD DIRECTORY PRIMING

132       You  can  generate the content for an OSD data directory that can start
133       up a BlueStore OSD with the prime-osd-dir command:
134
135          ceph-bluestore-tool prime-osd-dir --dev *main device* --path /var/lib/ceph/osd/ceph-*id*
136

AVAILABILITY

138       ceph-bluestore-tool is part of Ceph, a massively scalable, open-source,
139       distributed  storage  system. Please refer to the Ceph documentation at
140       http://ceph.com/docs for more information.
141

SEE ALSO

143       ceph-osd(8)
144
146       2010-2020, Inktank Storage, Inc. and contributors. Licensed under  Cre‐
147       ative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
148
149
150
151
152dev                              Apr 21, 2020           CEPH-BLUESTORE-TOOL(8)
Impressum