How to Specify the Order in Which Filesystems are Automatically Mounted


I need a particular row in /etc/fstab to be mounted always after two other rows:

# Always mount these first
UUID=fdf38dd4-9e9d-479d-b830-2a6989958503 / ext4 noatime,discard,errors=remount-ro 0 1
UUID=2b548eb8-fa67-46ce-a998-91d587dba62f /home/.hdd ext4 errors=remount-ro 0 2

# Always mount this second
none /home/ak aufs br:/home/.ssd/ak=rw:/home/.hdd/ak=rw 0 0

The current behavior is to often reverse the order of the last two rows in an unpredictable manner. How can I specify the necessary order?

Best Answer

Systemd has now included a dependency option that enforces mount ordering. In your case add the fstab arguments:


The noauto option will not work if you need to mount over other mounted file systems. In my case the above worked see commit for more details.

Related Question