Merge "Add Ceph's mpath partition types"
This commit is contained in:
commit
dc584039f5
|
@ -156,8 +156,10 @@ else
|
|||
# Make a list of all the hard drives that are to be wiped
|
||||
WIPE_HDD=""
|
||||
# Partition type OSD has a unique globally identifier
|
||||
CEPH_OSD_GUID="4FBD7E29-9D25-41B8-AFD0-062C0CEFF05D"
|
||||
CEPH_JOURNAL_GUID="45B0969E-9B03-4F30-B4C6-B4B80CEFF106"
|
||||
CEPH_REGULAR_OSD_GUID="4FBD7E29-9D25-41B8-AFD0-062C0CEFF05D"
|
||||
CEPH_REGULAR_JOURNAL_GUID="45B0969E-9B03-4F30-B4C6-B4B80CEFF106"
|
||||
CEPH_MPATH_OSD_GUID="4FBD7E29-8AE0-4982-BF9D-5A8D867AF560"
|
||||
CEPH_MPATH_JOURNAL_GUID="45B0969E-8AE0-4982-BF9D-5A8D867AF560"
|
||||
|
||||
# Check if we wipe OSDs
|
||||
if [ "$(curl -sf http://pxecontroller:6385/v1/ihosts/wipe_osds 2>/dev/null)" = "true" ]; then
|
||||
|
@ -189,7 +191,7 @@ else
|
|||
for part_number in "${part_numbers[@]}"; do
|
||||
sgdisk_part_info=$(sgdisk -i $part_number $dev)
|
||||
part_type_guid=$(echo "$sgdisk_part_info" | grep "$part_type_guid_str" | awk '{print $4;}')
|
||||
if [ "$part_type_guid" == $CEPH_OSD_GUID ]; then
|
||||
if [ "$part_type_guid" == $CEPH_REGULAR_OSD_GUID -o "$part_type_guid" == $CEPH_MPATH_OSD_GUID ]; then
|
||||
wlog "OSD found on $dev, skipping wipe"
|
||||
wipe_dev="false"
|
||||
break
|
||||
|
@ -263,7 +265,7 @@ do
|
|||
fi
|
||||
fi
|
||||
wlog "Wiping partition $part"
|
||||
if [ $WIPE_CEPH_OSDS == "true" -a "$part_type_guid" == $CEPH_JOURNAL_GUID ]; then
|
||||
if [[ $WIPE_CEPH_OSDS == "true" && ( "$part_type_guid" == $CEPH_REGULAR_JOURNAL_GUID || "$part_type_guid" == $CEPH_MPATH_JOURNAL_GUID ) ]]; then
|
||||
# Journal partitions require additional wiping. Based on the ceph-manage-journal.py
|
||||
# script in the integ repo (at the ceph/ceph/files/ceph-manage-journal.py location)
|
||||
# wiping 100MB of data at the beginning of the partition should be enough. We also
|
||||
|
|
Loading…
Reference in New Issue