]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbdmap: per-device mount (Closes: #8538) 2092/head
authorDmitry Smirnov <onlyjob@member.fsf.org>
Fri, 11 Jul 2014 09:50:24 +0000 (19:50 +1000)
committerDmitry Smirnov <onlyjob@member.fsf.org>
Fri, 11 Jul 2014 09:50:24 +0000 (19:50 +1000)
commitb844ec93c50453fa5dc70d367224f2286440d7dd
tree7b8204afeb5bb999a088bf96fa687be4fdec3ece
parentbd6ba100428c1a67ccd1bce851e7778cfe21ebb1
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 <onlyjob@member.fsf.org>
src/init-rbdmap