Bug 1379188 - [DOCS] Include instructions for setting partion type codes when creating OSDs manually
Summary: [DOCS] Include instructions for setting partion type codes when creating OSDs...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat
Component: Documentation
Version: 2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 2.2
Assignee: Erin Donnelly
QA Contact: Vasishta
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-26 00:08 UTC by Brad Hubbard
Modified: 2017-03-21 23:49 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 23:49:34 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Brad Hubbard 2016-09-26 00:08:13 UTC
Description of problem:

6.3.3. Adding an OSD with the Command Line Interface

We give the following example.

# parted /dev/sdd mklabel gpt
# parted /dev/sdd mkpart primary 1 10000
# parted /dev/sdd mkpart primary 10001 15000
# mkfs -t xfs /dev/sdd1
# mount -o noatime /dev/sdd1 /var/lib/ceph/osd/ceph-4
# echo "/dev/sdd1 /var/lib/ceph/osd/ceph-4  xfs defaults,noatime 1 2" >> /etc/fstab

This does not set the type of the partitions correctly and they remain at the default which utilities like ceph-disk, (possibly udev), etc. will not recognise. We should probably add commands to set the correct type, in this case they would be the following.

# sgdisk --typecode=1:4fbd7e29-9d25-41b8-afd0-062c0ceff05d -- /dev/sdd
# sgdisk --typecode=2:45B0969E-9B03-4F30-B4C6-B4B80CEFF106 -- /dev/sdd

Additional info:

An example that demonstrates the issue.

# dd if=/dev/zero of=/tmp/dummyhdd bs=1M count=1536
# losetup /dev/loop0 /tmp/dummyhdd
# parted /dev/loop0 mklabel gpt 
# parted /dev/loop0 mkpart primary 1 1000
# parted -s /dev/loop0 mkpart primary 1001 1500
# partprobe

# ceph-disk list
/dev/loop0 :
 /dev/loop0p1 other, ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
 /dev/loop0p2 other, ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
...

# sgdisk --typecode=1:4fbd7e29-9d25-41b8-afd0-062c0ceff05d -- /dev/loop0
# sgdisk --typecode=2:45B0969E-9B03-4F30-B4C6-B4B80CEFF106 -- /dev/loop0

/dev/loop0 :
 /dev/loop0p2 ceph journal
 /dev/loop0p1 ceph data, unprepared
...

See https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs


Note You need to log in before you can comment on or make changes to this bug.