Project

General

Profile

Actions

Bug #13058

closed

Ceph destroyed my MBR record when trying to convert it to GPT after initiating a new journal partition

Added by Stefan Eriksson over 8 years ago. Updated about 7 years ago.

Status:
Can't reproduce
Priority:
Normal
Assignee:
-
Category:
ceph cli
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
ceph-deploy
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Hi

I have my OS on sda and the OS use sda1-3 now I wanted to initiate a new OSD and ran with this command:
And I want to have journaling on the same disk as my OS as its SSD.

ceph-deploy osd prepare osd03:sdb:/dev/sda

...
[osd03][WARNIN] WARNING:ceph-disk:OSD will not be hot-swappable if journal is not the same device as the osd data
[osd03][WARNIN] DEBUG:ceph-disk:Creating journal partition num 4 size 5120 on /dev/sda
[osd03][WARNIN] INFO:ceph-disk:Running command: /sbin/sgdisk --new=4:0:+5120M --change-name=4:ceph journal --partition-guid=4:80836633--8e7d-5cf560e53ef --typecode=4:45b09694f-b4b80ceff106 --mbrtogpt -- /dev/sda
[osd03][DEBUG ] 
[osd03][DEBUG ] ***************************************************************
[osd03][DEBUG ] Found invalid GPT and valid MBR; converting MBR to GPT format.
[osd03][DEBUG ] ***************************************************************
[osd03][DEBUG ] 
[osd03][DEBUG ] Warning: The kernel is still using the old partition table.
[osd03][DEBUG ] The new table will be used at the next reboot.
[osd03][DEBUG ] The operation has completed successfully.
[osd03][WARNIN] INFO:ceph-disk:calling partx on prepared device /dev/sda
[osd03][WARNIN] INFO:ceph-disk:re-reading known partitions will display errors
[osd03][WARNIN] INFO:ceph-disk:Running command: /sbin/partx -a
...

as you see it tries to convert my MBR to GPT but fails and now the server wont boot, still it only considered this a warning.

Actions #1

Updated by Stefan Eriksson over 8 years ago

The whole output is:

[WARNIN] INFO:ceph-disk:calling partx on prepared device /dev/sda
[WARNIN] INFO:ceph-disk:re-reading known partitions will display errors
[WARNIN] INFO:ceph-disk:Running command: /sbin/partx -a /dev/sda
[WARNIN] partx: /dev/sda: error adding partitions 1-3

I missed the last line where it says "error adding partitions 1-3"

Actions #2

Updated by Loïc Dachary over 8 years ago

By providing the whole disk as a journal (/dev/sda) you allowed ceph-disk to use it entirely. This should work fine with existing partitions if the disk already has a GPT partition table. But it has undesirable side effects if the disk is with a non GTP partition table. In this case it is recommended to manually prepare the partition and give it to ceph-disk as /dev/sda4 or something.

That being said, it should probably do nothing when given a disk that does not have a GPT partition for the journal. Could you please let me know which version of Ceph you used ? I suppose it's Hammer but since v0.94.4 is not published yet, it probably is v0.94.3.

Actions #3

Updated by Loïc Dachary about 7 years ago

  • Status changed from New to Can't reproduce
Actions

Also available in: Atom PDF