proxmox ceph osd option to move wal to a new device

Eneko Lacunza elacunza at binovo.es
Fri Jan 14 09:34:28 CET 2022


Hi Marco,

Sorry for the delay, yesterday was a busy day...

I'm posting this to the list too, it may be helpful to others.

Remenber, this procedure was for physical partitions and for resizing 
Bluestore DB.

=== Cambiar/ampliar la partición block.db de Bluestore

1. Obtener la partición actual block.db: (BLOCKDB_PART)

ls -l /var/lib/ceph/osd/ceph-OSDID/block.db

2. Comprobar datos Bluestrore:

ceph-bluestore-tool show-label --path /var/lib/ceph/osd/ceph-OSDID

3. Obtener "Partition unique GUID" de la partición block.db:

sgdisk -i BLOCKDB_PART_NUM BLOCKDB_PART_DISK

4. Estudiar particiones del disco donde queremos crear la nueva 
partición, para ver dónde crear la nueva partición 
(BLOCKDB_PART_NUEVO_NUM, BLOCKDB_PART_NUEVO_DISK, 
BLOCKDB_PART_NUEVO_START_POS)

sgdisk -p BLOCKDB_PART_NUEVO_DISK

5. Crear nueva partición

sgdisk --new=BLOCKDB_PART_NUEVO_NUM:BLOCKDB_PART_NUEVO_START_POS:+30GiB 
--change-name="BLOCKDB_PART_NUEVO_NUM:ceph block.db" 
--typecode="BLOCKDB_PART_NUEVO_NUM:30cd0809-c2b2-499c-8879-2d6b78529876" 
--mbrtogpt BLOCKDB_PART_NUEVO_DISK

6. Recargar las particiones

partprobe BLOCKDB_PART_NUEVO_DISK

o bien

partx -u BLOCKDB_PART_NUEVO_DISK

7. Establecer permisos adecuados a la nueva partición

chown ceph.ceph BLOCKDB_PART_NUEVO_DEV

8. Parar OSD

systemctl stop ceph-osd at OSDID

9. Copiar datos de la partición vieja a la nueva

dd status=progress if=BLOCKDB_PART_DEV of=BLOCKDB_PART_NUEVO_DEV

10. Eliminar partición vieja y poner su "Partition unique GUID" a la nueva:

sgdisk --delete=BLOCKDB_PART_NUM BLOCKDB_PART_DISK
sgdisk --partition-guid="BLOCKDB_PART_NUEVO_NUM:PARTITION_UNIQUE_IDE" 
BLOCKDB_PART_NUEVO_DISK

11. Recargar las particiones

partprobe BLOCKDB_PART_DISK
partprobe BLOCKDB_PART_NUEVO_DISK

o bien

partx -u BLOCKDB_PART_DISK
partx -u BLOCKDB_PART_NUEVO_DISK

12. Ajustar enlace a block.db en OSD

cd /var/lib/ceph/osd/ceph-OSDID
rm block.db
ln -s BLOCKDB_PART_DEV block.db

13. Ampliar de forma efectiva el block.db

ceph-bluestore-tool bluefs-bdev-expand --path /var/lib/ceph/osd/ceph-OSDID

14. Poner en marcha OSD

systemctl start ceph-osd at OSDID

15. Compactar OSD en caso de que haya spillover

ceph daemon osd.OSDID compact


Hope this helps...

Cheers



El 13/1/22 a las 8:23, Marco Witte escribió:
> Hola Eneko,
>
> I think this is everything I can offer in spanish except ordering an 
> orange juice :)
>
> I would be interested to test out your commandchain on my testcluster.
>
> Thanks again for your input. Will take a look at "Ceph bluestore db 
> resize".
>
> Kind Regards
>
> Max
>

Eneko Lacunza
Zuzendari teknikoa | Director técnico
Binovo IT Human Project

Tel. +34 943 569 206 | https://www.binovo.es
Astigarragako Bidea, 2 - 2º izda. Oficina 10-11, 20180 Oiartzun

https://www.youtube.com/user/CANALBINOVO
https://www.linkedin.com/company/37269706/





More information about the pve-user mailing list