Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am setting up a new Linux Ubuntu server on Amazon EC2 and wanted to create a few extra volumes, to be mounted without execute permissions.

  • /tmp for temporary files
  • /var so that log files and mysql DBs have their own disk
  • /var/www for websites

Now /var/www would be mounted within /var I wonder if that is a problem, since also /var is a mounted volume, or is a normal thing to do?

Also are /etc/fstab volumes mounted from top to bottom, and in that case should I put /var first and /var/www after?

share|improve this question
up vote 4 down vote accepted

According to the fstab manual:

The order of records in fstab is important because fsck(8), mount(8),
and umount(8) sequentially iterate through fstab doing their thing.

So yes, lines in the beginning got processed first, so put /var before /var/www. As to the second question: you can safely mount filesystems within a mounted one, it will work.

share|improve this answer

There's no reason why you can't do this, really.

Bear in mind that normally, / is just /dev/sda1 or wherever, and you can mount whatever you like under /, such as /home as a NFS mount.

Remember that you can also change where MySQL stores it's files, so they're not in the default /var/lib/mysql, ditto /var/www.

Personally, /var/www makes a lot less sense to me than /srv/<sitename>

share|improve this answer

Your Answer


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.