====== Move DB to new drive ======
blkid
/dev/nvme0n1p3: PARTLABEL="DB" PARTUUID="b30d904f-94ce-4776-982a-db5947dac1cd"
ceph osd set noout
systemctl stop ceph-osd@3
systemctl disable ceph-osd@3
ddrescue -f -n -vv c66f0c74-12b2-aa42-afc4-f4bd12bfa87c DB.img
Replace disk, restore partition layout.
ddrescue -f -n -vv DB.img /dev/nvme0n1p3
Restore original UUID
gpart /dev/nvme0n1
x
c
3
w
partprobe
Verify ceph osd config:
ceph-volume lvm list
Activate volume:
ceph-volume lvm activate --all
===== LVM way =====
Idea is to:
* add 2nd disc to the same LVM PV,
* then force LV data movement to second storage,
* remove 1st disc from LVM PV
pvcreate /dev/sdd7
vgextend ceph-bf4ade97-581a-4832-a517-2d83503fe01d /dev/sdd7
lvscan
pvmove -n /dev/ceph-bf4ade97-581a-4832-a517-2d83503fe01d/osd-db-40769e33-2fb8-431d-8996-40870e35c3ee /dev/sdc7 /dev/sdd7
vgreduce ceph-bf4ade97-581a-4832-a517-2d83503fe01d /dev/sdc7
pvremove /dev/sdc7
Activate volume:
ceph-volume lvm list
[db] /dev/ceph-bf4ade97-581a-4832-a517-2d83503fe01d/osd-db-40769e33-2fb8-431d-8996-40870e35c3ee
block device /dev/ceph-feea9396-abeb-4b50-8cdc-3a35598ec651/osd-block-c794c0d0-0515-4bfb-bb54-00656fa8712d
db device /dev/ceph-bf4ade97-581a-4832-a517-2d83503fe01d/osd-db-40769e33-2fb8-431d-8996-40870e35c3ee
db uuid 5zRs08-Hif1-hIFp-rNfO-WTah-26MG-ojnLVh
devices /dev/sdd7
ceph-volume lvm activate --all
====== DRAFTS: ======
zfs create -V 5GB rpool/data/DB
ceph-bluestore-tool --path /var/lib/ceph/osd/ceph-3 --devs-source /var/lib/ceph/osd/ceph-3/block.db --command bluefs-bdev-migrate --dev-target /dev/zvol/rpool/data/DB
inferring bluefs devices from bluestore path
device removed:1 /var/lib/ceph/osd/ceph-3/block.db
device added: 1 /dev/zd144
Rollback:
ceph-bluestore-tool --path /var/lib/ceph/osd/ceph-3 --devs-source /var/lib/ceph/osd/ceph-3/block.db --command bluefs-bdev-migrate --dev-target /dev/nvme0n1p3
/usr/bin/ln -snf /dev/zd144 /var/lib/ceph/osd/ceph-3/block.db
ceph-bluestore-tool --path /var/lib/ceph/osd/ceph-12 --devs-source /var/lib/ceph/osd/ceph-12/block --devs-source /var/lib/ceph/osd/ceph-12/block.db --command bluefs-bdev-migrate --dev-target --dev-target /dev/vdg1