Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

what is /net used for in OS X?

I ask because canon (Digital Photo Professional) DPP hangs for a while while it lstat's /net. I don't particularly want to implement the workaround discussed in this link: http://luminous-landscape.com/forum/index.php?s=0f16e1b119e7e3b03bd84969919a4e32 &showtopic=23582&pid=187194&st=0&#

Destroying properties, reinstalling app, upgrading app have not helped.

From my system:

monkey $ cat /etc/auto_master

#

# Automounter master map

#

+auto_master # Use directory service

/net -hosts -nobrowse,nosuid

/home auto_home -nobrowse

/Network/Servers -fstab

/- -static

monkey $ mount | grep net

map -hosts on /net (autofs, automounted)

monkey $ df

Filesystem 512-blocks Used Available Capacity Mounted on

/dev/disk1s2 976101344 515170696 460418648 53% /

devfs 220 220 0 100% /dev

fdesc 2 2 0 100% /dev

/dev/disk3s2 1464477344 1069201144 395276200 74% /Volumes/pdisk4

/dev/disk2s2 1464477344 1081259016 383218328 74% /Volumes/pdisk3

/dev/disk0s2 976101344 540829384 435271960 56% /Volumes/pdisk2

map -hosts 0 0 0 100% /net

map auto_home 0 0 0 100% /home

mac pro, Mac OS X (10.5.3)

Posted on Jun 15, 2008 8:04 AM

Reply
4 replies

Jun 15, 2008 9:02 PM in response to Andrew Semple

/net is built into the automounter in OS X and uses the special map -hosts. This built in map will consist of the exports from the named server, when that server is accessed via the /net path. For example, if I have an NFS server at the IP address 192.168.1.10 and it exports a directory /exports, then if I do this from my Mac:

prompt$ cd /net/192.168.1.10/exports

the Mac automounter will contact the server, mount the export, and put me in that directory. All without me having to issue any "mount" command.

I haven't really read that other thread, but what's likely happening is that since your app is trying to stat something on an NFS server (since it's trying to go down the /net path), you are either hanging trying to resolve the server's name, or it's hanging because the server is not responding. Normally, if an application tries to go down the /net path using the name of a server that doesn't exist, or the name of machine that is not exporting anything over NFS, the command (e.g. lstat) will fail almost immediately.

Your problem may not be with the Mac, but with the application itself. If you can figure out what your application is stat'ing, you could then run a simple test from your command line to see if a regular stat (using "ls -l" or the "stat" command) also hangs. You can use the "dtruss" command from the command line to trace your application. (Note that dtruss may only be there if you have the development tools installed, I'm not sure).

If it is your app, your best bet may just be to comment out the /net entry in your auto_master file...

Jun 16, 2008 6:42 PM in response to glsmith

thanks. this is really helpful, specific information. Couple of questions.

1. will disabling /net in my auto_master file affect smb sharing? For example, using the command-k "connect to server" dialog in finder.

2. an 'ls -l /net' hangs in a similar manner. I did a 'sudo dtrace ls -l /net' and in the output I get a series of lines:

lstat64("host1\0", 0x100E24, 0x1000) = 0 0
lstat64("host2\0", 0x100E24, 0x1000) = 0 0
lstat64("alias2\0", 0x100E24, 0x1000) = 0 0 ...

indicating to me (hostnames changed for clairity) that ls is walking my /etc/hosts file and trying each in this directory. Does that indicate a DNS lookup problem (host file first, not DNS?) and could I reorder that? Or is this OS X intercepting the lstat on /net and itself walking /etc/hosts?

Also, in the dtrace, I get a bunch of errors of the form:

dtrace: error on enabled probe ID 875 (ID 18406: syscall::select_nocancel:entry): invalid user access in predicate at DIF offset 12

but I am assuming this is noise of some sort.

thanks again.

Jun 16, 2008 9:15 PM in response to Andrew Semple

1. will disabling /net in my auto_master file affect smb sharing? For example, using the command-k "connect to server" dialog in finder.


No, your SMB mounts will still work as expected.

2. an 'ls -l /net' hangs in a similar manner. I did a 'sudo dtrace ls -l /net' and in the output I get a series of lines:


Yep, that's pretty telling trace information. On an OS X client (assuming no other outside directory servers are in play), your /etc/hosts file will be consulted before DNS. So, yes, your system is parsing your /etc/hosts and trying to set up mounted directory structure under /net consisting of the specified hosts, and any exports they may have. Even if there aren't really servers on the other end.

I did a quick test on my system, a standalone G4 PB on a closed network. I added a handful of fake hosts to my /etc/hosts. An "ls -l /net" took over two minutes to return, and when it did I had a nice, albeit fake, directory structure under /net.

I then commented out the /net and /home entries in /etc/auto_master, and the same "ls -l /net" returned in seconds. Of course, I just removed a little bit of functionality, but it's not something I think you'll miss.

I don't know of any other way you can workaround this problem besides commenting out /net and /home...

what is /net used for in OS X?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.