Project

General

Profile

Actions

Bug #10146

closed

ceph-disk: sometimes the journal symlink is not created

Added by Dan van der Ster over 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
-
% Done:

0%

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

Description

Hi,
We observed in practise that sometimes the journal symlink is not created during a ceph-disk prepare run.

Environment:
  • Scientific Linux 6.6
  • ceph-disk from master branch
  • /dev/sdo is a new empty spinning disk (for the OSD)
  • /dev/sdc is an SSD with 5 journal partitions
  • /dev/sdc1 is not currently used by any OSD
To reproduce:
  • ceph-disk --verbose prepare /dev/sdo /dev/sdc1
Expected result:
  • sdo becomes and OSD with a sdc1 as the journal. The /var/lib/ceph/osd/ceph-X/journal should be soft-linked to /dev/disk/by-partuuid/<uuid of sdc1> which is a softlink to /dev/sdc1
Actual result:
  • /var/lib/ceph/osd/ceph-X/journal is softlinked to /dev/disk/by-partuuid/<uuid of sdc1>, but /dev/disk/by-partuuid/<uuid of sdc1> is a plain empty file, not a softlink to /dev/sdc1
Explanation:
  • In function prepare_journal_dev sgdisk is called to change the partition guid, then partx -a is called to reload the partition table, the udevadm settle is called to let udev finish handling the new ptable. It is expected that either sgdisk or partx triggers udev to add the new /dev/disk/by-partuuid/ symlink to /dev/sdc1, but in practise (with a busy server) the new symlink is not created. By "busy", we mean that /dev/sdc is seeing around 100 writes / second.
  • Since the by-partuuid symlink doesn't exist, later in ceph-disk when the symlink from /var/lib/ceph/osd/ceph-X/journal to /dev/disk/by-partuuid/<journal_uuid> is made, this results in an empty file being created at the link target, and afterwords the OSD cannot start.
Solutions:
  • We have found that by retriggering the udev block subsystem the symlink is always created. See the patch here: https://github.com/ceph/ceph/pull/2955
  • Another possible solution would be to not change the partition guid when re-using a journal partition. The previous /dev/disk/by-partuuid/ link would already exist and could be used by the new OSD.

Related issues 1 (0 open1 closed)

Copied to Ceph - Backport #12418: ceph-disk: sometimes the journal symlink is not createdResolvedLoïc Dachary11/20/2014Actions
Actions

Also available in: Atom PDF