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 have this line in my /etc/fstab:

/mnt/tmp    /tmp    none    bind,nobootwait

On EC2 however, /mnt may be lost during restarts causing the mount to fail due to non existent /mnt/tmp. So is there a way to explicitly create this directory?

share|improve this question

1 Answer 1

you can make put the following lines in your /etc/rc.local file :

mkdir -p /mnt/tmp && mount --bind -o nobootwait /mnt/tmp /tmp 
share|improve this answer
    
Does rc.local really get run before filesystems are mounted? –  wfaulk May 6 '12 at 8:13
    
No you are right, but he can remove the fstab entries, no ? –  Razique May 7 '12 at 9:00

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.