My end goal is that I want a samba share that displays all of the folders across several disks as one unified, read-only folder. This is for a NAS/media server setup.

Is there a way to create a unified folder that contains all of the subfolders of each of these drives in this way?

  • I guess you could do that with symlinks, but what's supposed to happen if you have a subdir /foo on more than one disk? Jun 6, 2013 at 6:05

1 Answer 1


You can use a union file system like aufs on Linux:

set /disk1 /disk2 /disk3
mount -t aufs -o br"$(printf ':%s=ro' "$@")" aufs /union/disk

(if files are common between the disks, the one from disk1 takes precedence)

  • out of interest, would this work for a non-readonly folder?
    – muzzamo
    Jun 7, 2013 at 1:20
  • @MurrayWaters, yes, the typical usage of aufs is to make a read-only directory writable by layering a writable one on top of it (think of instance of a live CD which you can modify by writing the new files on a RAM FS). See the aufs man page for all the possibilities. Jun 7, 2013 at 7:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .