[PC-BSD Dev] ZFS 'Device Busy' error

Claudio L. claudio at hpgcc3.org
Wed Jul 10 16:17:10 PDT 2013

Following up on this issue:

I've found that the process that is keeping the filesystems locked is 
gam_server is a file monitoring deamon used to get notifications of file 
 From what I read, gam_server needs to, by design (this is 
FreeBSD-specific), obtain a file descriptor for every file on every 
directory it monitors, and keep the file descriptor open forever. This 
is in order to receive notifications of file changes.

As a side effect, when it starts it gets a file descriptor on the ZFS 
volume, effectively "locking" it.

Disabling it would be bad for the GUI's, since at least XFCE is using it 
to discover changes in folders.

I guess I'll have to work around it with a nasty hack, get gam_server's 
process ID, then use 'fuser' to make sure the only process using the 
filesystem is gam_server, then issue a 'zfs unmount -f'.

Does anyone know of another solution? Is there any other alternative to 
using gam_server?

PS: This gam_server deamon is evil, keeps so many descriptors open... 
what a waste of resources.


More information about the Dev mailing list