[samba-jp:20587] Re: Vista オフラインファイルでのおかしな動作 Samba がらみ

YAMASAKI Hiroyuki yamasaki.hiroyuki @ sp.qnes.nec.co.jp
2009年 2月 24日 (火) 22:22:56 JST


山崎と申します。

>Linux側でファイルを削除して同期すると、PC側のファイルやディレクトリが消
>えないことがあります。PC側の削除も効きません。

その挙動についてはわかりませんが、vistaとsambaのオフラインファイルの同期は
挙動が怪しいと思っています。

以下に私が知っていることを列挙します。
どなたか、下記の情報に間違い/不足/追加情報がありましたら、お教えください。

   *    *    *

■sambaが3.0.25b未満だと話にならない。

  samba3.0.25bのバグ修正が以下。

    o Offline caching of files with Windows XP/Vista clients.

  historyに書かれずにこっそり修正されるバグもあるでしょうから、可能な限り新しい
  バージョンを使う方がいいと思います。


■samba3.0.25の説明で、map acl inheritをnoにするな、と言っているようだ。

	Windows Vista, Office 2007, and Offline Files
	=============================================

	Research surrounding offline files, Windows Vista, and Microsoft
	Office 2007 has revealed a incompatibility between these
	applications and the "map acl inherit = no" setting in smb.conf.
	Users requiring support client side caching (csc) and offline
	files are encouraged to enable the "map acl inherit" for any
	affected share definitions in the server's configuration.
	Future versions of Samba will enable this setting by default.

	Please refer to the smb.conf(5) man page for more details on
	"map acl inherit".

    
■VistaにSP1が適用されていないと話にならない。

 以下のVista SP1の修正一覧をサーチするとわかりますが、オフラインファイルに関する
 修正が7つあります。
 
 http://technet.microsoft.com/en-us/library/cc749061.aspx  
 

■Vista SP1に含まれていない修正がある。

 Offline files that are ghost items on a computer that is running Windows Vista or 
 Windows Server 2008 cannot be synchronized with the corresponding files on a file server
 http://support.microsoft.com/kb/949671
 
 入手するにはサポートに連絡が必要。
 (そろそろ出ると思われるSP2に含まれるかどうか不明)

■vistaのオフラインファイルは、oplockが利用可能である必要がある。
 
 Windows で Opportunistic Lock を構成する
 http://support.microsoft.com/kb/296264/ja
 に以下のように書いてある。
 --------------------------------------------------------------------------------------
 Opportunistic Lock を無効にすると、Windows Vista のオフライン ファイル機能が失敗します。 
 --------------------------------------------------------------------------------------

 よって、samba側でoplockを無効にしているようなら、有効に変更する。
  また、kernel oplockが有効だと自動的にレベル2oplockが無効になってしまうので、
  smb.confでkernel oplockを明示的に無効にする。

■Microsoftの情報

 信頼性はわかりませんが、Microsoftのストレージチーム(?)がblogでsambaとvistaのオフライン
 ファイルの問題を調べてくれている。(調査日が2007年3月と古いですが・・)

 http://blogs.technet.com/filecab/archive/2007/03/16/using-offline-files-with-samba-emc-servers-nas-devices.aspx

 ・oplockが有効になるようにsmb.confの設定を変更。

 ・sambaでhidden等のファイル属性を保持するために、smb.confのcreate maskと
  map hidden等のパラメータを変更。

 ・sambaのタイムタンプが秒単位に丸められるので、それを対応するためにvista側で
    HKLM\Software\Microsoft\Windows\CurrentVersion\NetCache の
  RoundUpWriteTimeOnSyncというレジストリ値を1に設定。
  (このレジストリが本当に効果あるのか不明ですが・・)

 



samba-jp メーリングリストの案内