Skip to content
Snippets Groups Projects
Commit f82e118c authored by Antonio Falabella's avatar Antonio Falabella
Browse files

Update ceph-bluestore-tool.md

parent c0019ccc
No related branches found
No related tags found
No related merge requests found
### ceph-bluestore-tool
ceph-bluestore-tool is a utility to perform low-level administrative operations on a BlueStore instance.
Check the man page for the detailed list of options.
## Size
In order to use this tool the OSD must be stopped. Here you can see the output for and OSD with data partition 10GB and db and wal 1GB each. No pool has been created yet.
```
ceph-bluestore-tool bluefs-bdev-sizes --path /var/lib/ceph/osd/ceph-0
inferring bluefs devices from bluestore path
0 : device size 0x40000000 : own 0x[1000~3ffff000] = 0x3ffff000 : using 0x5ff000(6.0 MiB)
1 : device size 0x3fc00000 : own 0x[2000~3fbfe000] = 0x3fbfe000 : using 0x7fe000(8.0 MiB)
2 : device size 0x27fc00000 : own 0x[11fe00000~40000000] = 0x40000000 : using 0x0(0 B) : bluestore has 0x23fb10000(9.0 GiB) available
```
## Export
```
ceph-bluestore-tool bluefs-export --path /var/lib/ceph/osd/ceph-0 --out-dir /tmp/export_example/
inferring bluefs devices from bluestore path
slot 2 /var/lib/ceph/osd/ceph-0/block -> /dev/dm-0
slot 1 /var/lib/ceph/osd/ceph-0/block.db -> /dev/dm-2
slot 0 /var/lib/ceph/osd/ceph-0/block.wal -> /dev/dm-1
db/
db/000004.sst
db/000007.sst
db/000010.sst
db/CURRENT
db/IDENTITY
db/LOCK
db/MANIFEST-000011
db/OPTIONS-000011
db/OPTIONS-000014
db.slow/
db.wal/
db.wal/000012.log
```
## Device labels
```
ls -l /var/lib/ceph/osd/ceph-0/
total 52
-rw-r--r--. 1 ceph ceph 227 Feb 4 10:53 activate.monmap
lrwxrwxrwx. 1 ceph ceph 24 Feb 4 10:53 block -> /dev/disk1_data/vdb_data
lrwxrwxrwx. 1 ceph ceph 25 Feb 4 10:53 block.db -> /dev/disk2_journal/vdc_db
lrwxrwxrwx. 1 ceph ceph 26 Feb 4 10:53 block.wal -> /dev/disk2_journal/vdc_wal
ceph-bluestore-tool show-label --dev /dev/disk1_data/vdb_data
{
"/dev/disk1_data/vdb_data": {
"osd_uuid": "b7c58830-cf6b-453c-b144-556b35678cff",
"size": 10733223936,
"btime": "2021-02-04T10:53:08.609084+0000",
"description": "main",
"bfm_blocks": "163840",
"bfm_blocks_per_key": "128",
"bfm_bytes_per_block": "65536",
"bfm_size": "10733223936",
"bluefs": "1",
"ceph_fsid": "a729979a-da01-406e-8097-11dca4c6783f",
"kv_backend": "rocksdb",
"magic": "ceph osd volume v026",
"mkfs_done": "yes",
"osd_key": "AQAT0htgylx8HxAAfXiWoAKb73I3iiurLXKeZA==",
"ready": "ready",
"require_osd_release": "15",
"whoami": "0"
}
}
ceph-bluestore-tool show-label --dev /dev/disk2_journal/vdc_db
{
"/dev/disk2_journal/vdc_db": {
"osd_uuid": "b7c58830-cf6b-453c-b144-556b35678cff",
"size": 1069547520,
"btime": "2021-02-04T10:53:08.612721+0000",
"description": "bluefs db"
}
}
ceph-bluestore-tool show-label --dev /dev/disk2_journal/vdc_wal
{
"/dev/disk2_journal/vdc_wal": {
"osd_uuid": "b7c58830-cf6b-453c-b144-556b35678cff",
"size": 1073741824,
"btime": "2021-02-04T10:53:08.614547+0000",
"description": "bluefs wal"
}
}
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment