[zfs-discuss] Re: directory is not empty

jess jesslpete at gmail.com
Tue Dec 6 13:10:03 EST 2011

Thanks.  The problematic filesystem had indeed been mounted on an OS X
system and your hint was enough to fix the problem even though I never
found out exactly what the problem was.  It may have been that the
pool was not exported on the Mac.  It could also have been some quirk
caused by setting the mountpoint of one of the filesystems in the pool
but not the mountpoint of the pool itself.  I removed all the
mountpoints "zfs inherit mountpoint..." and exported from the Mac
after which it imported fine.

On Dec 5, 12:14 pm, Darik Horn <dajh... at vanadac.com> wrote:
> On Mon, Dec 5, 2011 at 11:07, jess <jesslp... at gmail.com> wrote:
> > I have two pools.  When I "zfspool import pool1" the filesystems are
> > happily mounted under /pool1.  When I "zfspool import pool2" the pool
> > is imported but the filesystems do not mount under /pool2 but rather
> > give the error message that each filesystem "cannot mount ...
> > directory is not empty".  Neither /pool1 nor /pool2 exist before the
> > import command.  None of the filesystems have the mountpoint set.  The
> > problem is that with pool2, there is a 0 length file in each of the
> > filesystem mount points named ".autodiskmounted".
> > Workaround: If I set the mountpoint ( "zfs set mountpoint=/mnt/fs1
> > pool2/fs1" ) then the pool2 import works as expected.
> > The workaround is OK but it is annoying not know what is making the
> > one pool fail with the default mount points while the other works as
> > expected.  Can anyone suggest something to look for that might be
> > causing this behavior?
> > Thanks
> > P.S.  Great work zfsonlinux!
> Are you sharing the pool with a Mac OS X system?  The
> ".autodiskmounted" file is a cookie that Mac OS X uses to keep track
> of ZFS mount points.
> Delete all autodiskmounted files and try again.  If these files
> reappear and prevent ZoL from importing the pool, then you've probably
> found a bug in either MacZFS or ZoL.
> --
> Darik Horn <dajh... at vanadac.com>

More information about the zfs-discuss mailing list