Skip to content

Instantly share code, notes, and snippets.

@syuchan1005
Last active December 30, 2024 07:02
Show Gist options
  • Select an option

  • Save syuchan1005/dab7d1faa37e58511d3ad83613abefd8 to your computer and use it in GitHub Desktop.

Select an option

Save syuchan1005/dab7d1faa37e58511d3ad83613abefd8 to your computer and use it in GitHub Desktop.
How to move the Ceph block and db LVM disks to another machine

How to move the Ceph block and db LVM disks to another machine

Environment

ServerA (old): Proxmox 8.3.0

  • 6 OSDs and 1 db(have all OSDs db lvs)

ServerB (new): Proxmox 8.3.0

  • No OSD, mon and mgr are installed

steps

  1. Login ServerA
  2. Add flags to ceph - noreblance norecover noscrub (I don't know if it is correct. But, no problem with my servers.)
  3. Stop OSDs
ceph osd out <osd>
systemctl stop ceph-osd@<osd>
  1. Export LVM disks
vgchange -a n <vg>
vgexport <vg>
  1. Move physical disks to ServerB
  2. Login ServerB
  3. Confirm that the VGs are available
vgscan
  1. Import VGs and rescan devices to detect added VGs
vgimport -a
uevadm trigger --subsystem-match=block --action=add
  1. Activate added VGs and LVs
vgchange -a y (not needed on my server)
ceph-volume lvm activate --all
ceph osd in <osd>

NOTE: pveceph automatically creates a symbolic link to /etc/ceph/ceph.conf. However, it is not created just by installing ceph. It is necessary to install mon and mgr.

  1. Confirm that the OSD is registered
  2. Remove ceph flags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment