Add an OSD¶
Run these on the host that has the disk, as root. The host needs a running Ceph cluster and the client.bootstrap-osd keyring at /var/lib/ceph/bootstrap-osd/ceph.keyring.
-
Find the disk's stable path in
/dev/disk/by-id/. Use that path, not/dev/sdX, everywhere below. -
If the disk has ever held anything, wipe it. This destroys everything on the disk:
- Create the OSD. Ceph assigns it the next free ID:
- Look up the new OSD's ID and fsid:
prepareleaves the OSD's directory mounted as a tmpfs. Unmount it, then activate the OSD onto the OS disk:
- Add the ID to the host's
osdsincluster.nixand deploy:
nixos-rebuild switch --flake .#<host> --target-host root@<host>.lan.cmu.edu --build-host root@<host>.lan.cmu.edu
- Check that
systemctl status ceph-osd-<id>shows it running and thatceph osd treelists it asup.