meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vm:proxmox:ceph:db:move_db_disks [2024/02/18 16:14] – niziakvm:proxmox:ceph:db:move_db_disks [2026/10/21 11:23] (current) – niziak
Line 59: Line 59:
 --> Migrate to existing, Source: ['--devs-source', '/var/lib/ceph/osd/ceph-0/block.db'] Target: /var/lib/ceph/osd/ceph-0/block --> Migrate to existing, Source: ['--devs-source', '/var/lib/ceph/osd/ceph-0/block.db'] Target: /var/lib/ceph/osd/ceph-0/block
 --> Migration successful. --> Migration successful.
 +</code>
  
 +Create (or resize) new PV,VG,LV for DB and attach it:
 +
 +<code bash>
 +pvcreate /dev/nvme0n1p6
 +vgcreate ceph-db-8gb /dev/nvme0n1p6
 +lvcreate -n db-8gb -l 100%FREE ceph-db-8gb
 +ceph-volume lvm new-db --osd-id 0 --osd-fsid 024c05b3-6e22-4df1-b0af-5cb46725c5c8 --target ceph-db-8gb/db-8gb
 +--> Making new volume at /dev/ceph-db-8gb/db-8gb for OSD: 0 (/var/lib/ceph/osd/ceph-0)
 +Running command: /usr/bin/chown -h ceph:ceph /var/lib/ceph/osd/ceph-0/block.db
 +Running command: /usr/bin/chown -R ceph:ceph /dev/dm-0
 +--> New volume attached.
 +</code>
 +
 +Resize PV,VG,LV for DB:
 +
 +<code bash>
 +pvresize /dev/nvme...
 +# pvresize automatically resizes vg
 +lvextend -l +100%FREE ceph-db/db
 +lvchange -ay /dev/ceph-50bbae14-dbdb-48c0-9fa9-8a50cb991285/osd-db-7d84ca53-a110-44ba-93f2-f06108526ed9
 +
 +# restore owner and re-creates symlinks:
 +ceph-volume lvm activate --all
 +</code>
 +
 +<code bash>
 +ceph-volume lvm migrate --osd-id 0 --osd-fsid 024c05b3-6e22-4df1-b0af-5cb46725c5c8 --from data db --target ceph-db-8gb/db-8gb
 +--> Migrate to existing, Source: ['--devs-source', '/var/lib/ceph/osd/ceph-0/block'] Target: /var/lib/ceph/osd/ceph-0/block.db
 +--> Migration successful.
 +</code>
 +
 +<code bash>
 systemctl start ceph-osd@3.service systemctl start ceph-osd@3.service
 ceph osd unset noout ceph osd unset noout
 +</code>
 +
 +Resize LV without migrating DB to HDD and back is possible:
 +<code bash>
 +
 +# restore owner and re-creates symlinks:
 +ceph-volume lvm activate --all
 +
 +# expand BlueFS
 +ceph-bluestore-tool bluefs-bdev-expand --path /var/lib/ceph/osd/ceph-5
  
 +# Verify new size:
 +ceph-bluestore-tool show-label --dev /dev/dm-1
 +ceph tell osd.5 bluefs stats
 </code> </code>
  
-===== create new one =====+===== OR: create new one =====