分散ファイルシステム(DFS)

提供: 雑廉堂Wiki
2019年3月11日 (月) 23:48時点におけるMeisina04 (トーク | 投稿記録)による版 (stand-alone versus domain-based DFS)

FRS vs DFS vs DFS-R

FRS (ファイルレプリケーションサービス)はWindows Server 2000と2003でSYSVOLを複製するために使用されています。新しいバージョンのWindowsサーバーでは、Microsoftによって少しずつDFS-R(Distributed File System Replication = 分散ファイルシステムレプリケーション)に置き換えられています。


まだ、SambaにはFRSにも、DFS-Rにも、SYSVOLレプリケーションは含まれていません。

DFS-Rはしばしば、DFS(下記参照)のサブ機能とみなされており、両方共一緒に使用されますが、完全に別々に使用することもできます: 複数のターゲットを持つDFSは、DFS-Rなしで使用することが可能(フォルダーの内容が別の方法で更新された場合でも)で、DFS-RはDFSターゲットでない共有フォルダを複製できます。

Sambaは、DFSを部分的にサポートしますが、DFS-Rはまだサポートしていません。

DFS

DFSとは何か

DFS (Distributed File System = 分散ファイルシステム) は、いくつかの機能を提供する機能です: 例えば、代替の名前空間、ロードバランシング、自動フェイルオーバーなど。

技術的には、DFSはファイルを含まない、ジャンクションのみの、必要に応じて多くのジャンクションを持つサブディレクトリの共有ディレクトリへのアクセスを提供します。 ジャンクションとは、Unixファイルシステムで知られているような、ソフトリンクに似ていますが、共有ディレクトリを指すものであり、また、他のサーバー上の共有ディレクトリを指すこともできます。クライアントはまず最初にジャンクションをDFSサーバーに問い合わせ、それからこのジャンクションが指し示すファイルサーバーにアクセスします。

これの主な用途は、基になるインフラストラクチャの詳細をユーザーから隠す代替の名前空間(ディレクトリツリービュー)を作成することです。ユーザーに表示されるパス(DFS名と呼ばれる)は、サーバーの名前が変更されたとき、または一部のディレクトリが別のサーバーに移動されたときにも変わりません。管理者は、古いDFS名を新しいターゲットに単純に置き換えることができます。

DFS名は、オプションで複数のターゲットを指すことができます(つまり、クライアントにいくつかの代替ジャンクションを異なる共有フォルダーに伝える)。この場合、クライアントはどちらのターゲットにもアクセスできます。これにより、1つのサーバーに障害が発生した場合に、負荷分散と他のサーバーへの自動フェイルオーバーが可能になります。

スタンドアローン vs ドメインベースのDFS

DFSは、スタンドアロンでもドメインベースでもかまいません。

スタンドアロン版は1つのサーバー上で実行され、DFS名にそのサーバーの名前が含まれるようにします。それらはそのサーバーによって提供される共有のように見えます。

ドメインベースのセットアップでは、DFS名にドメイン名のみが含まれ、特定のサーバーの名前は含まれません。ドメイン内のいくつかのサーバーは、並行してDFSサーバーとして機能できます。クライアントは自動的にいずれかのDFSサーバーを選択し、そのサーバーにクエリを送信します。

Configure stand-alone DFS in Samba

The method to set up the stand-alone variant with Samba is described here:
https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/msdfs.html

In short it requires in the config file smb.conf the global option

 host msdfs = yes

(which is default on AD-DCs) and in one share declaration the two options

 path = /export/dfsroot
 msdfs root = yes

Then in the specified path create entries by running commands like

 ln -s msdfs:storage0\\share0 linka
 ln -s msdfs:server1\\share,server2\\share linkb

The first example defines one target, the second example creates two alternative targets that share the same contents.

Windows clients will see these as junctions.

Configure Member server DFS in Samba

Similar to above but required one additional setting in smb.conf the global option so it would be

 host msdfs = yes
 vfs object = dfs_samba4

Other just follow what happen on above.

Configure domain-based DFS in Samba

The procedure is the same as for stand-alone DFS, but it requires the vfs_object dfs_samba4 (which is default in AD-DC, but beware of the pitfalls of the vfs object option), and the DFS names must be declared on each DC (because the endpointmapper for DFS is not implemented).

There is currently (July 2014) a discussion in the mailing list in which several users report great difficulties with domain-based DFS in samba 4, maybe related with the implementation of smb protocol version 3.

Limitations

Neither the path dfsroot specified in the DFS share, nor any of the share paths in the ln-commands must contain upper case characters. The links might be allowed to contain upper case characters.

DFS works only for Administrator in Samba 4.1.4, and requires a patch to work for all users.

There is currently an ongoing discussion in the mailing list whether or not domain-based DFS really works.

DFS-R (replication) is not yet implemented.