0

I've created two user accounts for two applications: mongod and node.js. Both of these store their data in their home folder. This keeps data "sandboxed" and prevents them from needing to be in the sudoers / admin file.

However, I have read that the home folder is not mounted when upstart runs my applications.

How do I ensure that it is mounted before upstart attempts to run my application, in a proper way?

Tom
  • 601
  • 2
  • 8
  • 15
  • I assume your `/home` is a separate filesystem from, say, `/`, then? – cjc Mar 10 '12 at 13:24
  • @cjc no, it's the same partition / filesystem. – Tom Mar 10 '12 at 14:06
  • In that case, /home will be mounted at the same time as the / filesystem, and there shouldn't be an issue with Upstart. Also, I believe you can make Upstart services dependent on other services, so you can run mongo and nodejs after /home mounts, etc., so those instructions that you cited are perhaps a little lacking. – cjc Mar 10 '12 at 14:11
  • @cjc, are you sure about this? If so, if you could post that comment as an answer I can accept it and close this issue. – Tom Mar 10 '12 at 14:30

1 Answers1

1

Since /home is in the / filesystem, /home will be mounted at the same time as the / filesystem, and there shouldn't be an issue with Upstart. For that matter, Upstart can't really start without /etc/init being available, which will imply that /home will be available, unless you're doing something with autohome.

Given this, your concern about /home being mounted after Upstart begins working through /etc/init shouldn't be an issue: both locations will be available at the same time.

Also, I believe you can make Upstart services dependent on other services, so you can run mongo and nodejs after /home mounts, etc., so those instructions that you cited are perhaps a little lacking. Take a look at http://upstart.ubuntu.com/cookbook/#ordering for the documentation on how to make your scripts run after the mount event.

cjc
  • 24,533
  • 2
  • 49
  • 69
  • Thanks. When I get time to test this, and it does go wrong, I'll make sure to post a comment here. – Tom Mar 10 '12 at 16:35