防止“鬼”AFP挂载点

我们遇到OSX 10.6客户端在AFP上通过OSX Server 10.5的“虚拟”挂载点出现问题。 有时候(过去一个月里有5次),客户端机器似乎和服务器有某种连接问题,并重新分配这个共享。 Finder在整个过程中看起来都不错,但是在/Volumes/ ,旧的mount仍然是一个目录,新的point point出现在/Volumes/并带有递增的后缀。 例如:

 lrwxr-xr-x 1 root admin 1 Feb 3 12:39 Macintosh HD -> / dr-x------@ 9 cutter staff 264 Jun 4 2008 Produktion drwxrwxr-x 10 cutter staff 408 Jan 5 07:44 Simplex TimeMachine dr-x------@ 7 cutter staff 264 Jun 4 2008 Transfer drwxr-xr-x+ 3 cutter admin 102 Jan 13 14:24 Voyager drwxr-xr-x+ 3 cutter admin 102 Jan 18 10:28 Voyager-1 drwxr-xr-x+ 3 cutter admin 102 Jan 25 09:20 Voyager-2 drwxr-xr-x+ 3 cutter admin 102 Jan 25 16:31 Voyager-3 drwxr-xr-x+ 3 cutter admin 102 Feb 3 08:30 Voyager-4 drwx------@ 10 cutter staff 296 Jan 13 13:12 Voyager-5 

但Finder向用户显示一个正常的“旅行者”份额,并没有迹象表明任何gremlins在工作。

OSX Finder Bug http://www.dietpizza.ch/images/finder-bug.png

虽然Finder允许用户导航到共享上的目标文件(我们看到的是/Voyager/myfile.txt ),但我们软件中使用的任何文件path都有编号后缀(如/Voyager-5/myfile.txt )。 一旦挂载点被重新装入一个新的后缀( /Voyager-6 ),旧的path将变为无效。 我们的软件对文件进行永久性引用,当它试图访问它时,繁荣! 但是对于查看Finder的用户来说,没有明显的问题。

我已经在系统日志中寻找线索,但是看起来并没有太多的东西可以继续下去:

 manoa:Logs stu$ grep mount * system.log.4:Feb 3 08:53:33 Streaming1-MacPro fseventsd[38]: check_vol_last_mod_time:XXX failed to get mount time (25; &mount_time == 0x10043f8b8) system.log.4:Feb 3 09:31:44 Streaming1-MacPro UnmountAssistant[811]: Volume unmounted successfully system.log.5:Feb 2 09:28:56 Streaming1-MacPro UnmountAssistant[10763]: Volume unmounted successfully system.log.6:Feb 1 12:26:17 Streaming1-MacPro UnmountAssistant[2277]: system.log.7:Jan 28 13:54:05 Streaming1-MacPro fseventsd[38]: check_vol_last_mod_time:XXX failed to get mount time (25; &mount_time == 0x10077f8b8) system.log.7:Jan 28 13:55:34 Streaming1-MacPro UnmountAssistant[27673]: Volume unmounted successfully system.log.7:Jan 28 13:55:36 Streaming1-MacPro UnmountAssistant[27673]: Volume unmounted successfully 

并为最后的“重影”分享时间戳:

 system.log.4:Feb 3 08:30:33 localhost com.apple.launchd[1]: *** launchd[1] has started up. *** system.log.4:Feb 3 08:30:37 localhost mDNSResponder[17]: mDNSResponder mDNSResponder-214 (Oct 16 2009 06:09:30) starting system.log.4:Feb 3 08:30:38 Streaming1-MacPro configd[15]: setting hostname to "Streaming1-MacPro.local" system.log.4:Feb 3 08:30:38 Streaming1-MacPro configd[15]: network configuration changed. system.log.4:Feb 3 08:30:42 Streaming1-MacPro bootlog[44]: BOOT_TIME: 1265182233 0 system.log.4:Feb 3 08:30:45 Streaming1-MacPro configd[15]: network configuration changed. system.log.4:Feb 3 08:30:46 Streaming1-MacPro com.apple.usbmuxd[26]: usbmuxd-176 built for iTunesNineDot on Sep 24 2009 at 16:11:05, running 32 bit system.log.4:Feb 3 08:30:46 Streaming1-MacPro configd[15]: network configuration changed. system.log.4:Feb 3 08:30:46 Streaming1-MacPro com.intego.commonservices.daemon[53]: Using preferences format 3 system.log.4:Feb 3 08:30:46 Streaming1-MacPro com.apple.SystemStarter[27]: Starting Qmaster services system.log.4:Feb 3 08:30:47 Streaming1-MacPro blued[45]: Apple Bluetooth daemon started system.log.4:Feb 3 08:30:47 Streaming1-MacPro /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow[34]: Login Window Application Started system.log.4:Feb 3 08:30:49 Streaming1-MacPro loginwindow[34]: Login Window Started Security Agent system.log.4:Feb 3 08:30:49 Streaming1-MacPro WindowServer[72]: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged. system.log.4:Feb 3 08:30:49 Streaming1-MacPro com.apple.WindowServer[72]: Wed Feb 3 08:30:49 Streaming1-MacPro.local WindowServer[72] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged. 

在那里有networking的东西,但没有什么可怕的。

有关类似问题的Intertubes上有一些信息,大多数人似乎在说:

  • 卸载共享
  • 删除/ Volumes /
  • 重新开始
  • 添加共享回来

这些机器一般在新闻编辑室24/7全天候运行,告诉我的生产用户只需要完成这四项技术任务,而且几天/每周就可以了,而且你必须在某个时候再做一次“过得很好。

我想要一个永久的解决scheme – 那些讨厌的鬼卷应该消失,永远不会回来!

客户信息:

mount的输出:

 /dev/disk0s2 on / (hfs, local, journaled) devfs on /dev (devfs, local, nobrowse) map -hosts on /net (autofs, nosuid, automounted, nobrowse) map auto_home on /home (autofs, automounted, nobrowse) /dev/disk1s2 on /Volumes/Simplex TimeMachine (hfs, local, nodev, nosuid, journaled) afp_4gqctq000egI0000oM0000VU-1.2d000003 on /Volumes/Produktion (afpfs, nodev, nosuid, mounted by cutter) afp_4gqctq000egI0000oM0000VU-2.2d000004 on /Volumes/Voyager-5 (afpfs, nodev, nosuid, mounted by cutter) afp_4gqctq000egI0000oM0000VU-3.2d000005 on /Volumes/Transfer (afpfs, nodev, nosuid, mounted by cutter) 

看似相关的系统configuration文件片段:

  Model Identifier: MacPro4,1 Processor Name: Quad-Core Intel Xeon Processor Speed: 2.66 GHz Number Of Processors: 2 Memory: 8 GB Boot ROM Version: MP41.0081.B03 SMC Version (system): 1.39f5 SMC Version (processor tray): 1.39f5 Type: afpfs Mount Point: /Volumes/Voyager-5 Automounted: No 

服务器上的信息:

看似相关的系统configuration文件片段:

  Model Identifier: Xserve1,1 Processor Name: Dual-Core Intel Xeon Processor Speed: 2.66 GHz Number Of Processors: 2 Boot ROM Version: XS11.0080.B03 SMC_version: 1.11f5 LOM Revision: 1.2.8 Fibre Channel Domain 2: Vendor: LSILogic Product: LSI7404EP Revision: Firmware 1.3.14.0 Speed: 2 Gigabit SCSI Target Device @ 0: Manufacturer: APPLE Model: Xserve RAID Revision: 1.50 SCSI Logical Unit @ 0: Capacity: 2,18 TB Manufacturer: APPLE Model: Xserve RAID Revision: 1.50 Mac OS 9 Drivers: No Partition Map Type: APM (Apple Partition Map) Volumes: R_Xraid-Mars: Capacity: 2,18 TB Writable: Yes File System: Journaled HFS+ Mount Point: /Volumes/R_Xraid-Mars 

原因可能是特定于您的某个应用程序。

对于我们来说,它与Vectorworks 2008有关。它是一个跨平台的应用程序,似乎在保存/打开对话框中保留当前目录的副本,而不是使用OS X系统工具。 我们发现之前有一些与未转义path相关的错误(例如,用户在文件名中放入斜线,这被解释为path分隔符等)。

重现的步骤是:

  1. 在Vectorworks Open / Save对话框中导航到服务器
  2. 退出应用程序
  3. 断开与服务器的连接
  4. 清理/卷,并打开一个Finder窗口/音量来观看新的鬼魂
  5. 开始申请
  6. 使用“文件”>“打开”,一旦出现“打开/保存”对话框,即可立即观看创build的共享。 请注意,在这个阶段,我们没有连接到服务器,所以打开/保存对话框会redirect到用户的主目录。

在步骤6中创build的ghost共享与最后一个真实共享具有相同的数字后缀,强烈暗示这是应用程序内部代码的问题。 IE浏览器。 如果最后一个真正的连接是“活动项目-4”,那么应用程序将创build一个-4文件夹,但实际上重新连接到服务器将创build一个-5,或其他任何挂载点。

我猜你必须经历试验和错误,无论你的应用程序是什么样的组合。 一个暗示:强烈build议我们在查看这些鬼股份的内容时看看Vectorworks。 我们将子文件夹嵌套到一个通常只包含Vectorworks文档的path中(即通过mkdir -p /path/to/subfolder )。