4

Using Ubuntu 12.04 or 14.04, how can I prevent an upstart service from starting until a couple of network volumes (GlusterFS) get successfully mounted?

Pablo Fernandez
  • 7,438
  • 25
  • 71
  • 83
  • 1
    Use the `start on` conditions e.g. `start on (net-device-up IFACE!=lo and started service-a and started service-b)` – HBruijn Jun 18 '14 at 14:05

1 Answers1

4

According to the upstart cookbook/intro linked here, upstart will emit a 'filesystem' event when all mounts are completed. You should be able to "start on filesystem" the required service to achieve what you're looking for, unless you're only wanting certain (but not all) filesystems to be mounted prior to service invocation?

Peter Grace
  • 3,456
  • 1
  • 27
  • 43
  • I already have start on filesystem, but the service is started even when my GlusterFS volumes are not mounted. I think it doesn't include all filesystems. – Pablo Fernandez Jul 10 '14 at 09:24