Re: dm-crypt journal replacement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No need to re-create the osd.

The easiest way to replace the journal is by creating the new journal partition with the same partition guid. You can use 'sgdisk -n <partition number>:<starting sector>:<ending sector> --change-name="<partition number>:ceph journal" --partition-guid=<partition number>:<partition guid from the failed journal> --typecode=<partition number>:45b0969e-9b03-4f30-b4c6-5ec00ceff106 <disk device>' to create the new journal partition. You can get the partition guid of the failed journal via 'cat /var/lib/ceph/osd/<osd directory>/journal_uuid' if you don't have it already.

Once your partition is created correctly, dmcrypt should be able to map it using the existing key from the old journal. Then the journal needs to be initialized via 'ceph-osd -i <osd number> --mkjournal' and you should be able to start the osd at that point.

If you can't or don't want to reuse the existing partition guid with its associated dmcrypt key, you can follow the same procedure to create the journal partition using a new partition guid of your choice, but then you have to generate a dmcrypt key with something like 'dd bs=<key size in bytes, i.e. 256> count=1 if=/dev/urandom of=/etc/ceph/dmcrypt-keys/<partition guid>' and then create the dmcrypt volume with 'cryptsetup --key-file /etc/ceph/dmcrypt-keys/<partition guid> --key-size <key size in bytes> create <journal partition>' to get the encrypted journal device. Then you have to replace the 'journal' and 'journal_dmcrypt' symlinks in /var/lib/ceph/<osd directory> and write the new partition guid to the 'journal_uuid' file in the same directory. You still have to perform the --mkjournal with ceph-osd, and you should be good to go.


Steve Taylor | Senior Software Engineer | StorageCraft Technology Corporation
380 Data Drive Suite 300 | Draper | Utah | 84020
Office: 801.871.2799 |


If you are not the intended recipient of this message or received it erroneously, please notify the sender and delete it, together with any attachments, and be advised that any dissemination or copying of this message is prohibited.


-----Original Message-----
From: ceph-users [mailto:ceph-users-bounces@xxxxxxxxxxxxxx] On Behalf Of Nikolay Khramchikhin
Sent: Wednesday, January 25, 2017 6:50 AM
To: ceph-users@xxxxxxxxxxxxxx
Subject: ***Suspected Spam*** dm-crypt journal replacement

 Hello, folks,


 Can someone share the procedure of replacement failed journal deployed with "ceph-deploy  disk prepare --dm-crypt" ? Can`t find at docs anything about it. Is there only way - recreation of osd?

 Ceph Jewel 10.2.5


--
 Regards,

 Nikolay Khramchikhin,

_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux