On Windows it is possible to create DFS using windows share. However, I'm using Linux server and wondering - is it possible to create MSDFS using Samba on Linux?

What configuration changes needed to do it?

  • AFACT, DFS is just file sharing with more flexible path naming. that's standard on any file system on Unix-like systems. NFS would do
    – Javier
    Oct 20, 2010 at 17:40
  • 3
    @Javier That may apply to DFSN (DFS Namespaces), but DFS also includes replication as part of the system.
    – phoebus
    Oct 20, 2010 at 18:36
  • @Javier it's not only flexible path naming, but grouping (possible 10 or 50 servers) into one, kinda gateway for the user. In space of http servers or k8s ingress - this is usual thing
    – Reishin
    Jul 29, 2023 at 17:38

4 Answers 4


Samba can do it through special symbolic link files. Samba has to be compiled with the --with-msdfs option to make it work. Then you need to modify the smb.conf file to turn it on.

    host msdfs = yes

 #Add DFS as a share definition
    path = /srv/smb/dfsroot
    msdfs root = yes

Once it does, you can make symlinks with this syntax to emulate linking to a remote host:

ln -s 'msdfs:server\volume` accounting

Lower-case is key. If you're replicating the data somehow (Samba, unlike Microsoft, doesn't bundle replication in with DFS) you can emulate that as well.

ln -s 'msdfs:server1\acct,msdfs:server2\acct' accounting

It's a good idea to ensure the links are owned by root. You don't want stray users redirecting other users to places nefarious.


You can also try MooseFS - an open-source distributed file system for Linux. It's fault-tolerant and has got a lot of different useful technical features.


A quick trip to your search engine of choice would bring up Ceph, Lustre and gFarm to name but three, obviously you're free to discover more options via the same route.

  • nah, Ceph is not even close to MSDFS and the way how both work
    – Reishin
    Jul 29, 2023 at 17:40

yes, you have the global file system (GFS) red hat link

  • 1
    I don't think that's anything like Windows' DFS. GFS sounds like a filesystem for clusters, based on shared storage, e.g. a SAN LUN. Windows DFS provides an abstraction layer for UNC paths, so that \\domain\share\somefolder may reside on multiple servers, with the client selecting one based on various criteria. It also provides for replication of the data between servers. DFS works quite well even over WAN links. Oct 20, 2010 at 19:03