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.

Can volumes be guaranteed to mount in a particular order, or is there a way to set up something along the line of dependencies, where one filesystem must be mounted before another may be mounted?

I need an undefined amount of extra storage space on various areas of my file structure, so the solution was to mount an extra hard drive at /mnt/external/sdb1, and then create directories beneath that for mounting as bind on top of the original file structure.

This allows some failover for the event that the USB disk become unreliable for any reason, however if that is the case, I want to ensure that when the disk becomes unmountable, that the proceeding bind mounts are not bothered with (even though they should fail in theory, with the absence of that directory).

But I also want to know if this can be done because I can imagine such a technique to be useful in other situations.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

File system mount order is determined by the order in which the file systems appear in the fstab file.

The exceptions to this ordering are file systems have their own init scripts.

In Ubuntu order determinate in /etc/init/mountall.conf:

emits virtual-filesystems
emits local-filesystems
emits remote-filesystems
emits all-swaps
emits filesystem
share|improve this answer

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.