Project

General

Profile

Bug #10983

use a new disk as journal disk,ceph-disk prepare fail

Added by wei qiaomiao over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
-
Start date:
03/02/2015
Due date:
% Done:

100%

Source:
other
Tags:
Backport:
hammer,firefly
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

ceph version:0.87
os:redhat 7.0

use a new disk, has not partion, as journal disk, ceph-disk prepare fail[root@ceph-0 ~]# parted --machine -- /dev/sdh print
Error: /dev/sdh: unrecognised disk label
BYT;
/dev/sdh:300GB:scsi:512:512:unknown:TOSHIBA AL13SEB300:;
[root@ceph-0 ~]# parted --machine -- /dev/sdi print
BYT;
/dev/sdi:300GB:scsi:512:512:msdos:TOSHIBA AL13SEB300:;
1:1049kB:300GB:300GB:ext3::;
[root@ceph-0 ~]# ceph-disk prepare /dev/sdi /dev/sdh
Error: /dev/sdh: unrecognised disk label
ceph-disk: Error: weird parted units:


Related issues

Duplicated by Ceph - Bug #10314: use a new disk as journal disk,ceph-disk prepare execute fail Duplicate 12/14/2014
Copied to Ceph - Backport #11710: use a new disk as journal disk,ceph-disk prepare fail Resolved 03/02/2015
Copied to Ceph - Backport #11711: use a new disk as journal disk,ceph-disk prepare fail Resolved 03/02/2015

Associated revisions

Revision f5acf6bb (diff)
Added by Loic Dachary over 3 years ago

ceph-disk: more robust parted output parser

In some cases, depending on the implementation or the operating system,

parted --machine -- /dev/sdh print

may contain empty lines. The current parsing code is fragile and highly
depends on output details. Replace it with code that basically does the
same sanity checks (output not empty, existence of units, existence of
the dev entry) but handles the entire output instead of checking line by
line.

http://tracker.ceph.com/issues/10983 Fixes: #10983

Signed-off-by: Loic Dachary <>

Revision 8709e34f (diff)
Added by Loic Dachary over 3 years ago

ceph-disk: more robust parted output parser

In some cases, depending on the implementation or the operating system,

parted --machine -- /dev/sdh print

may contain empty lines. The current parsing code is fragile and highly
depends on output details. Replace it with code that basically does the
same sanity checks (output not empty, existence of units, existence of
the dev entry) but handles the entire output instead of checking line by
line.

http://tracker.ceph.com/issues/10983 Fixes: #10983

Signed-off-by: Loic Dachary <>
(cherry picked from commit f5acf6bb6a342b05897605703d7d9cb7c09714fd)

Revision 90909671 (diff)
Added by Loic Dachary over 3 years ago

ceph-disk: more robust parted output parser

In some cases, depending on the implementation or the operating system,

parted --machine -- /dev/sdh print

may contain empty lines. The current parsing code is fragile and highly
depends on output details. Replace it with code that basically does the
same sanity checks (output not empty, existence of units, existence of
the dev entry) but handles the entire output instead of checking line by
line.

http://tracker.ceph.com/issues/10983 Fixes: #10983

Signed-off-by: Loic Dachary <>
(cherry picked from commit f5acf6bb6a342b05897605703d7d9cb7c09714fd)

History

#1 Updated by Travis Rhoden over 3 years ago

  • Project changed from Ceph-deploy to Ceph

ceph-disk is part of ceph, used by ceph-deploy. moving to that project.

#2 Updated by Loic Dachary over 3 years ago

  • Status changed from New to Verified
  • Assignee set to Loic Dachary

#3 Updated by Loic Dachary over 3 years ago

  • Status changed from Verified to Need Review
  • % Done changed from 0 to 80

in https://github.com/ceph/ceph/pull/3872 see the ceph-disk: more robust parted output parser commit. It is part of this series to benefit from tests that cover all cases (no partition table, a partition table with one existing entry in the partition table).

#4 Updated by Loic Dachary over 3 years ago

  • Backport set to hammer,firefly,dumpling

#5 Updated by Loic Dachary over 3 years ago

  • Backport changed from hammer,firefly,dumpling to hammer,firefly

#6 Updated by Loic Dachary over 3 years ago

  • Status changed from Need Review to Pending Backport

#9 Updated by Nathan Cutler over 3 years ago

  • Status changed from Pending Backport to Resolved
  • % Done changed from 80 to 100
  • Regression set to No

Also available in: Atom PDF