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 [2025/03/30 21:39] – niziakvm:proxmox:ceph:db:move_db_disks [2026/10/21 11:23] (current) – niziak
Line 65: Line 65:
 <code bash> <code bash>
 pvcreate /dev/nvme0n1p6 pvcreate /dev/nvme0n1p6
- 
 vgcreate ceph-db-8gb /dev/nvme0n1p6 vgcreate ceph-db-8gb /dev/nvme0n1p6
-OR 
-vgextend ... 
- 
 lvcreate -n db-8gb -l 100%FREE ceph-db-8gb lvcreate -n db-8gb -l 100%FREE ceph-db-8gb
-OR 
-lvextend -l +100%FREE ceph-db/db 
- 
 ceph-volume lvm new-db --osd-id 0 --osd-fsid 024c05b3-6e22-4df1-b0af-5cb46725c5c8 --target ceph-db-8gb/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) --> Making new volume at /dev/ceph-db-8gb/db-8gb for OSD: 0 (/var/lib/ceph/osd/ceph-0)
Line 79: Line 72:
 Running command: /usr/bin/chown -R ceph:ceph /dev/dm-0 Running command: /usr/bin/chown -R ceph:ceph /dev/dm-0
 --> New volume attached. --> 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>
  
Line 90: Line 95:
 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>