[netatalk-ja:0382] Re: rsync -Eでもコピーされない._ファイルについて
HAT
hat @ fa2.so-net.ne.jp
2014年 9月 18日 (木) 21:07:24 JST
HATです。
Netatalk 3.xが動いているように見えません。
極めて古いNetatalk 2.xが動いているように見えます。
そのLinuxのシェルにログインして、
$ asip-status.pl localhost
$ afpd -V
でバージョンを確認してください。
ウチの環境の場合は、こう表示されます。
$ asip-status.pl localhost
AFP reply from localhost:548
Flags: 1 Cmd: 3 ID: 57005
Reply: DSIGetStatus
Request ID: 57005
Machine type: Netatalk3.1.6
AFP versions: AFP2.2,AFPX03,AFP3.1,AFP3.2,AFP3.3,AFP3.4
UAMs: DHX2,DHCAST128
Volume Icon & Mask: Yes
Flags:
SupportsCopyFile
SupportsServerMessages
SupportsServerSignature
SupportsTCP/IP
SupportsSrvrNotifications
SupportsOpenDirectory
SupportsUTF8Servername
SupportsUUIDs
SupportsExtSleep
SupportsSuperClient
Server name: hatachan
Signature:
d7 ce 23 49 d9 00 65 3e bf 48 7c 5f 38 e4 8a 0e ..#I..e>.H|_8...
Network address: 192.168.1.1 (TCP/IP address)
UTF8 Servername: hatachan
$ afpd -V
afpd 3.1.6 - Apple Filing Protocol (AFP) daemon of Netatalk
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version. Please see the file COPYING for further information and details.
afpd has been compiled with support for these features:
AFP versions: 2.2 3.0 3.1 3.2 3.3 3.4
CNID backends: dbd last tdb mysql
Zeroconf support: Avahi
TCP wrappers support: Yes
Quota support: Yes
Admin group support: Yes
Valid shell checks: Yes
cracklib support: Yes
EA support: ad | sys
ACL support: Yes
LDAP support: Yes
D-Bus support: Yes
Spotlight support: Yes
DTrace probes: Yes
afp.conf: /etc/afp.conf
extmap.conf: /etc/extmap.conf
state directory: /var/netatalk/
afp_signature.conf: /var/netatalk/afp_signature.conf
afp_voluuid.conf: /var/netatalk/afp_voluuid.conf
UAM search path: /usr/lib64/netatalk//
Server messages path: /var/netatalk/msg/
> ◆テスト内容
> 1.Mavericksからafp://netatalkserverでnetatalkに接続
> 2.netatalkの管理にある任意のフォルダにて新規フォルダを作成(例)。試しに「netatalk」というフォルダを作成
> 3.netatalkフォルダの中身をnetatalkを動かしているLinuxへsshで接続してみてみると次の通り
> --------------------------------------------------------------------------------------------------------------
> $ ls -ltra
> 合計 12
> drwxrwsrwx 3 kimura Domain Users 4096 9月 18 17:25 2014 .
> drwxrwsrwx 2 kimura Domain Users 4096 9月 18 17:25 2014 .AppleDouble
> drwxrwxrwx 13 aid-dcc Domain Users 4096 9月 18 17:25 2014 ..
> --------------------------------------------------------------------------------------------------------------
> ※.AppleDoubleディレクトリが作成されている
> ※この1〜3の操作を何度繰り返しても新しく作成したフォルダの中に.AppleDoubleディレクトリが作成されます
この時点でnetatalk 2.xの疑いが強い。
> 4..AppleDoubleに移動して中身をみてみる
> --------------------------------------------------------------------------------------------------------------
> $ cd .AppleDouble/
> $ ls -ltra
> 合計 12
> drwxrwsrwx 3 kimura Domain Users 4096 9月 18 17:25 2014 ..
> drwxrwsrwx 2 kimura Domain Users 4096 9月 18 17:25 2014 .
> -rw-rw-rw- 1 kimura Domain Users 741 9月 18 17:25 2014 .Parent
> --------------------------------------------------------------------------------------------------------------
> ※.Parentというファイルが作成されている
.Parentはディレクトリのメタデータを保存するためのAppleDouble Header fileです。
> 5. .Parentというファイルをapple_dumpでみてみる
> $ apple_dump .Parent
Dumping ".Parent"...
-------------------------------------------------------------------------------
MagicNumber: 00051607 : AppleDouble
Version : 00020000 : Version 2
Filler : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : ................
Num. of ent: 000D : 13
Fillerがオールゼロになっているのは、規格通りのAppleDouble version2です。
エントリの数が13個もあるのはnetatalkの特徴です。
-------------------------------------------------------------------------------
Entry ID : 00000002 : Resource Fork
Offset : 000002E5 : 741
Length : 00000000 : 0
ディレクトリはリソースフォークを持たないので、サイズは当然ながらゼロです。
-------------------------------------------------------------------------------
Entry ID : 00000003 : Real Name
Offset : 000000B6 : 182
Length : 00000008 : 8
-RAW DUMP--: 0 1 2 3 4 5 6 7 8 9 A B C D E F : (ASCII)
00000000 : 6E 65 74 61 74 61 6C 6B : netatalk
Real Nameを保存しているのは古いNetatalkの特徴です。
これを保存しても意味がないし、解決できない問題があったので、現在はReal Name
を保存しません。
> 6.「netatalk」というフォルダにMavericksからafpで接続したままで新規作成したファイルを保存してみる
>
> ※ファイルの作成は、Mavericksでmiというエディタを起動し、そこに任意の文字を書き、
> 保存先として「netatalk」というフォルダを指定して保存する、というやり方で実施
>
> 7.6の手順を実施した後、「netatalk」というフォルダをls- laしてみる
> --------------------------------------------------------------------------------------------------------------
> $ ls -la
> 合計 20
> drwxrwsrwx 3 kimura Domain Users 4096 9月 18 17:37 2014 .
> drwxrwxrwx 13 aid-dcc Domain Users 4096 9月 18 17:25 2014 ..
> drwxrwsrwx 2 kimura Domain Users 4096 9月 18 17:37 2014 .AppleDouble
> -rwxrwxrwx 1 kimura Domain Users 4096 9月 18 17:37 2014 ._a.txt
> -rwxrwxrwx 1 kimura Domain Users 5 9月 18 17:37 2014 a.txt
> --------------------------------------------------------------------------------------------------------------
「a.txt」と同じディレクトリに「._a.txt」ができています。
この「._a.txt」は、おそらくOS Xが作ったものでしょう。
拡張属性をサポートしないAFPサーバに拡張属性付きのファイルを作るとき、
OS Xは「._a.txt」を作ってそのなかに保存します。
この動作については、以下のページで説明しています。
http://hatx.blog.so-net.ne.jp/2009-08-31
このページを書いたのは2009-08-31であり、最後に更新したのは2010-06-17です。
それぐらい古い、拡張属性をサポートしないNetatalkが動いているようにみえます。
> 8.7をの手順を実施した後「netatalk」というフォルダ内の.AppleDoubleに移動し、ls -laした結果は次のとおりです
>
> # ls -ltra
> 合計 20
> -rw-rw-rw- 1 kimura Domain Users 741 9月 18 17:25 2014 .Parent
> drwxrwsrwx 3 kimura Domain Users 4096 9月 18 17:37 2014 ..
> -rw-rw-rw- 1 kimura Domain Users 2079 9月 18 17:37 2014 a.txt
> drwxrwsrwx 2 kimura Domain Users 4096 9月 18 17:37 2014 .
> -rw-rw-rw- 1 kimura Domain Users 741 9月 18 17:37 2014 ._a.txt
>
> ※a.txtと._a.txtというファイルが作成されている。この2つをapple_dumpしてみた結果は次のとおりです
> ※添付したAppleDoubleフォルダに入っているa.txtと._a.txtが.AppleDoubleの中にあったファイルです
>
> $ apple_dump a.txt
> a.txt:
>
> -------------------------------------------------------------------------------
> MagicNumber: 00051607 : AppleDouble
> Version : 00020000 : Version 2
> Filler : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : ................
> Num. of ent: 000D : 13
>
> -------------------------------------------------------------------------------
> Entry ID : 00000002 : Resource Fork
> Offset : 000002E5 : 741
> Length : 0000053A : 1338
>
> $ apple_dump ._a.txt
> ._a.txt:
>
> -------------------------------------------------------------------------------
> MagicNumber: 00051607 : AppleDouble
> Version : 00020000 : Version 2
> Filler : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : ................
> Num. of ent: 000D : 13
>
> -------------------------------------------------------------------------------
> Entry ID : 00000002 : Resource Fork
> Offset : 000002E5 : 741
> Length : 00000000 : 0
>
> -------------------------------------------------------------------------------
>
> 9. Linuxのnetatalkで作成した「netatalk」というフォルダをMacminiからafpマウントしてみた結果は次のとおりです
> --------------------------------------------------------------------------------------------------------------
> dc-macmini:netatalk aid-dcc$ ls -la@
> total 32
> drwxrwxrwx 1 aid-dcc staff 264 9 18 17:37 .
> drwxrwxrwx 1 aid-dcc staff 466 9 18 17:25 ..
> -rwxrwxrwx 1 aid-dcc staff 4096 9 18 17:37 ._a.txt
> -rwxrwxrwx@ 1 aid-dcc staff 5 9 18 17:37 a.txt
> com.apple.ResourceFork 1338
> com.apple.FinderInfo 32
> com.apple.TextEncoding 15
> --------------------------------------------------------------------------------------------------------------
>
> ※._a.txtがみえています
> ※MacminiからLinuxのnetatalkサーバへの接続は、Finderの共有を使って行いました。接続後、dfすると次のとおりです
>
> --------------------------------------------------------------------------------------------------------------
> dc-macmini:netatalk aid-dcc$ df -h
> Filesystem Size Used Avail
> Capacity iused ifree %iused Mounted on
> /dev/disk0s2 931Gi 60Gi 870Gi
> 7% 15896204 228084538 7% /
> devfs 194Ki 194Ki 0Bi
> 100% 670 0 100% /dev
> /dev/disk2s2 16Ti 6.7Ti 9.3Ti
> 43% 451570323 622150504 42% /Volumes/Drobo_Main
> map -hosts 0Bi 0Bi 0Bi
> 100% 0 0 100% /net
> map auto_home 0Bi 0Bi 0Bi
> 100% 0 0 100% /home
> /dev/disk3s2 16Ti 7.5Ti 8.5Ti
> 48% 505126688 568594139 47% /Volumes/Drobo_sub
> /dev/disk1s2 931Gi 633Mi 931Gi
> 1% 162146 243944520 0% /Volumes/Macintosh HD2
> //kimura @ aaaa._afpovertcp._tcp.local/hoge 8.4Ti 6.4Ti 2.0Ti 77%
> 1713096884 529421373 76% /Volumes/hoge
> --------------------------------------------------------------------------------------------------------------
>
> 10.Macminiからrsync
> -EでLinuxのnetatalkで作成した「netatalk」というフォルダをMacminiにコピーし、lsした結果は次のとおりです
>
> --------------------------------------------------------------------------------------------------------------
> dc-macmini:netatalk aid-dcc$ ls -la@
> total 64
> drwxrwxrwx 3 aid-dcc staff 102 Sep 18 17:37 .
> drwxrwxrwx 13 aid-dcc staff 442 Sep 18 17:58 ..
> -rwxrwxrwx@ 1 aid-dcc staff 5 Sep 18 17:37 a.txt
> com.apple.FinderInfo 32
> com.apple.ResourceFork 1338
> com.apple.TextEncoding 15
> --------------------------------------------------------------------------------------------------------------
> ※._a.txtはみえません
もしNetatalk 2.xが動いていたとすると、私の方では対処できません。
もう忘れてしまいました。
メンテも止まっているので、本家でもサポートできないでしょう。
--
HAT
netatalk-ja メーリングリストの案内