Move a Ceph OSD Journal

Move a Ceph OSD Journal

Here are the steps to move a Ceph OSD journal. I previously described how to setup a journal partition here. In my case I am moving the journal on OSD 8. You can get lookup the correct UUID using: ls -l /dev/disk/by-partuuid/

Don’t forget to set (and unset) noout so Ceph doesn’t start rebalancing when the OSD in question temporarily dissappears.

[email protected]:$ ceph osd set noout
set noout
[email protected]:$ systemctl stop [email protected]
[email protected]oxmox:$ ceph-osd -i 8 --flush-journal
2017-04-25 23:16:38.445663 7f93bd7f1800 -1 flushed journal /var/lib/ceph/osd/ceph-8/journal for object store /var/lib/ceph/osd/ceph-8
[email protected]:$ rm -f /var/lib/ceph/osd/ceph-8/journal
[email protected]:$ ln -s /dev/disk/by-partuuid/5bc920ad-20ce-4e07-b879-f8d32556c65a /var/lib/ceph/osd/ceph-8/journal
[email protected]:$ echo "5bc920ad-20ce-4e07-b879-f8d32556c65a" > /var/lib/ceph/osd/ceph-8/journal_uuid
[email protected]:$ ceph-osd -i 8 --mkjournal
2017-04-25 23:21:06.353543 7f0eaf792800 -1 created new journal /var/lib/ceph/osd/ceph-8/journal for object store /var/lib/ceph/osd/ceph-8
[email protected]:$ systemctl start [email protected]
[email protected]:$ ceph osd unset noout
unset noout

Issue ceph osd tree to make sure everything is up and in and you are good to go.

Leave a Reply

Your email address will not be published. Required fields are marked *