FileSharing

Q. How can I define multiple share points under Mac OS X?

A. SharePoints.


Q. How can I share files with Windows users?

A. Look in the FileSharingWindows section.


Q. How do I automount servers like I did in Mac OS 9?

A. You'll have to write an AppleScript that opens all the servers you want, and make it run at login (AppleMenu --> SystemPreferences --> LoginPreferences --> LoginItems).

tell application "Finder" 
    open location "afp://username:password@idisk.mac.com/username" 
end tell 

A. In Panther (10.3), drag the mounted network volume from the desktop or a finder window into the list of (AppleMenu --> SystemPreferences --> AccountsPreferences --> StartUpItemsPreferences). The server volume will get added as a "Folder".


Q. How do I connect to my iDisk without navigating through the iTools site?

A. ConnectToServer (command-K in Finder), then type this:

afp://idisk.mac.com/username 


Q. How can I ssh into my Mac OS X (or Mac OS X Server) machine from Mac OS 9?

A. NiftyTelnet.


Q. When I browse in the ConnectToServer window, I see lots of ghost servers that no longer exist.

A. If you're running a DirectoryAgent on your network, delete its SLP registration database. From the CommandLine on your DirectoryAgent server:

[localhost:~] you$ sudo rm /private/var/slp.regfile 


Q. Is there any way I can increase the performance of File Sharing (aside from buying Mac OS X Server)?

A. You can increase performance of the machine in general by putting your swap file on another disk. See also: VirtualMemory


Q. How do you connect to a NovellNetWare server?

A. Answer moved to NovellNetWare.


Q. I sometimes connect to a Windows machine's SMB share and access the data on it very easily. The only problem happens when I put the computer into sleep without unmounting the share disk first. Upon waking my Mac again, the Finder is unbelievably slow, so slow that I can't even manage to logout, and more often than not I just have to reboot. This doesn't happen when I log into a different Windows server using AppleShare. Any idea of why and how to avoid the problem?

A. AnswerMe


Mac OS X exported NFS share mounted on Linux randomly hangs the Linux file system.

I've recently upgraded our Mac OS X file server from Jaguar (10.2) to the latest release of Panther (10.3). I've got three linux machines currently NFS mounting various exports.

Intermittently we now experience a problem where commands "hangs" and don't seem to do anything.

However, strace reveals:
$ strace ls
...
brk(0) = 0x805a000
brk(0x805d000) = 0x805d000
open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOTDIR (Not a directory)
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0775, st_size=272, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
brk(0) = 0x805d000
brk(0x805e000) = 0x805e000
getdents64(3, /* 8 entries */, 4096) = 288
getdents64(3, /* 7 entries */, 4096) = 264
getdents64(3, /* 7 entries */, 4096) = 264
getdents64(3, /* 7 entries */, 4096) = 264
getdents64(3, /* 7 entries */, 4096) = 264
getdents64(3, /* 7 entries */, 4096) = 264
getdents64(3, /* 7 entries */, 4096) = 264
getdents64(3, /* 7 entries */, 4096) = 264
getdents64(3, /* 7 entries */, 4096) = 264
getdents64(3, /* 7 entries */, 4096) = 264
getdents64(3, /* 7 entries */, 4096) = 264
getdents64(3, /* 7 entries */, 4096) = 264
...
and so on, the getdents64 call keep being repeated against the same directory.

Searching around I found that a very similar problem have been discussed in the past. http://www.uwsg.iu.edu/hypermail/linux/kernel/0211.3/0503.html

Using tcpdump I can see some initial NFS traffic which then stops when the loops begins.

Unmounting the NFS volume and remounting it sometimes fixes the problem until it occurs again.

Worth mentioning is that the Mac OS X server is hooked up to an XServe RAID cabinet with lots of space in the partition where the NFS is being served from: $ df -k .
Filesystem 1K-blocks Used Available Use% Mounted on
lemon:/export2/home/martin

    1470545880 59722020 1410823860 5% /home/martin

I've tried various nfs mount options such as udp/tcp, nfsvers=2, noac all to no avail.

Below are the kernel versions:

linux$ uname -a Linux myclient.domain.com 2.4.20-20.9 #1 Mon Aug 18 11:45:58 EDT 2003 i686 i686 i386 GNU/Linux

macosx$ martin$ uname -a Darwin myserver.domain.com 7.4.0 Darwin Kernel Version 7.4.0: Wed May 12 16:58:24 PDT 2004; root:xnu/xnu-517.7.7.obj~7/RELEASE_PPC Power Macintosh powerpc

Q. Has anyone got a solution to this?