0

I have a google-startup-script that mounts disk on boot or restart. Unfortunately google-startup-scripts run last during the boot process, at the very end of the BSD init system. As a result, my wildfly server application in /etc/init.d starts before disk is mounted.

How can I ensure wildfly server starts after disk is mounted?

Rodgers Andati
  • 121
  • 1
  • 11
  • fstab is not an option? – elmalto Apr 10 '15 at 05:36
  • 2
    Avoid using fstab: It will render your instance unbootable if the disk is missing whichever the reason. Start your services in the same script after the disk has been mounted instead of using the regular init scripts in /etc/init.d. – Antxon Apr 10 '15 at 07:53
  • @Antxon, you are right. This same thing happened to me... an unbootable instance because of the disk not being available. Were you able to work with upstart or something to persist your mount points after system restarts? – ice.nicer May 18 '15 at 17:53

1 Answers1

0

I do agree that mounting the disk from fstab is not a good idea. For a solution, if it is a debian-like distro with init.d find wildfly in /etc/init.d i.e: /etc/init.d/wildfire and amend/add $gce_onboot to the # Required-Start: line in the beginning of script which should look like:

# Required-Start: google-startup-scripts xxxx yyyy
nickmilon
  • 1,332
  • 1
  • 10
  • 9