Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Feb 2012 16:52:09 -0500
From:      Robert Banfield <rbanfield@weogeo.com>
To:        freebsd-questions@freebsd.org
Subject:   "find" not traversing all directories on a single zfs file system
Message-ID:  <4F4BFB09.9090002@weogeo.com>

Next in thread | Raw E-Mail | Index | Archive | Help
Summary: I am executing the command "find . > ../file_list" and it is 
not traversing all the subdirectories it encounters along the way.  
There is no separate file system mounted along the path.

Long version:  I'm new to FreeBSD and ZFS (many years of linux 
experience though), so my apologies if I'm missing something 
straightforward here.  This is a tile server which has tens of millions 
of mostly small files.  I'm logged in as root, and there is no networked 
file system anywhere in the mix.  I'm using the version of find 
installed with FreeBSD 9.0-RELEASE amd64.

cd /zfs_mount_point/mydir
find . &> ../file_list

I would presume that file_list contains a list of every file and 
directory inside of /zfs_mount_point/mydir, however some directories 
contain only the directory entry without any of the file and 
subdirectories it contains.

As an example, file_list contains:

./dataset_tiles
./dataset_tiles/token1
./dataset_tiles/token1/kml
./dataset_tiles/token1/kml/kml.png
./dataset_tiles/token2
./dataset_tiles/token3
./dataset_tiles/token3/kml
...

The problem is "./dataset_tiles/token2" is a directory, and none of its 
entries appear anywhere in the file_list.  Yet if I do the following:

find ./dataset_tiles/token2

I get a list of everything that I would expect to have been in 
file_list, but did not. "ls -l" shows the entry type character as 'd'.  
token2 is just a subdirectory of dataset_tiles, not a separate mount 
point.  I should have all the requisite permissions to access the files 
in that directory, and I can run find successfully if I specify any of 
the directories which do not seem to be working.  Here's an actual 'ls 
-ld' on one of the directories not working:

ls -ld 967c4f32-8a9e-0459-8e94-c911e41be43b/
drwxr-xr-x  10 root  wheel  10 Feb  4 21:45 
967c4f32-8a9e-0459-8e94-c911e41be43b/

The only other tidbit of information I can think to add is I also tried 
running "find -d ." with no overall change in output other than the 
order the directories were searched.

Any idea what's going on?

Thanks!



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?4F4BFB09.9090002>