diff --git a/src/ceph-disk-prepare b/src/ceph-disk-prepare index 03c1527bd93..b69f21e4bf3 100755 --- a/src/ceph-disk-prepare +++ b/src/ceph-disk-prepare @@ -184,6 +184,8 @@ def prepare( WARNING: This will unconditionally overwrite anything given to it. """ + osd_uuid = str(uuid.uuid4()) + try: subprocess.check_call( args=[ @@ -193,6 +195,9 @@ def prepare( '--mbrtogpt', '--largest-new=1', '--change-name=1:ceph data', + '--partition-guid=1:{osd_uuid}'.format( + osd_uuid=osd_uuid, + ), '--typecode=1:89c57f98-2fe5-4dc0-89c1-f3ad0ceff2be', '--', disk, @@ -222,7 +227,6 @@ def prepare( path = mount(dev=dev, fstype=fstype, options=mount_options) try: write_one_line(path, 'ceph_fsid', cluster_uuid) - osd_uuid = str(uuid.uuid4()) write_one_line(path, 'fsid', osd_uuid) write_one_line(path, 'magic', CEPH_OSD_ONDISK_MAGIC) finally: