Project

General

Profile

Feature #8538

Functionality to have rbdmap also mount after mapping an image

Added by JuanJose Galvez over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
06/04/2014
Due date:
% Done:

100%

Spent time:
Source:
Support
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

In RE: https://inktank.zendesk.com/agent/#/tickets/1462

Summary: Over 200 rbd images are being mapped to a RHEL7 machine on boot. When fstab is being processed and RHEL7 attempts to mount these images, not all images have been mapped yet, it causes the node to go into emergency maintenance mode. Ideally what we would like to see is the ability to have rbdmap trigger the mount commands after mapping of an image has been completed - giving us the ability to mount specific entries rather than relying on fstab and mount -a.

Associated revisions

Revision b844ec93 (diff)
Added by Dmitry Smirnov over 4 years ago

rbdmap: per-device mount (Closes: #8538)

`/etc/init.d/rbdmap start` was doing `mount -a`. Although (arguably)
`mount -a -O _netdev` could be less disruptive, it's not RBD mapping job to
mount unrelated devices and potentially do it at the wrong time.

Solution is to call `mount {device}` which works as expected and mounts
device even if it given in form `mount /dev/rbd/pool/imagename` while
`/etc/fstab` uses UUID or LABEL notation.

Furthermore this commit

  • fixes global exit code (it was always 0): now it is 0 only when
    all devices were (un)mounted successfully; otherwise non-zero.
  • replaces `mount -a` with per-device post-mapping `mount {dev}`
  • show mapping progress using LSB functions per device instead of for {start|stop} invocation.
  • capture output of `(u)mount` (if any) and report it as "info".

Signed-off-by: Dmitry Smirnov <>

Revision bf048976
Added by Sage Weil over 4 years ago

Merge pull request #2092 from onlyjob/rbdmap

rbdmap: per-device mount (Closes: #8538)

Reviewed-by: Sage Weil <>

History

#1 Updated by Dmitry Smirnov over 4 years ago

  • Status changed from New to Need Review
  • % Done changed from 0 to 50

"mount -a" behaviour strikes me as incorrect. Not only we mount unrelated file systems but also there is a risk to do it unexpectedly at the wrong time, like when administrator unmounted file system(s) before mapping RBD devices using "service rbdmap start" or "/etc/init.d/rbdmap start".

Luckily there is an elegant solution to this, please review:

https://github.com/ceph/ceph/pull/2092

#2 Updated by Dmitry Smirnov over 4 years ago

  • Status changed from Need Review to Resolved
  • % Done changed from 50 to 100

Merged. Thanks, Sage.

Also available in: Atom PDF