Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.