Kimmo Paasiala
2014-Jun-13 06:49 UTC
Odd problem with find(1) on FUSE sshfs mounted filesystems
I?m on FreeBSD stable/10 r267390 on one of my systems and on FreeBSD 10.0-RELEASE-p5 i386 on another one. Both exhibit a strange behaviour when find(1) is used on a FUSE sshfs mounted filesystems. This an excerpt of a log from such run (I mounted FreeBSD sources on /mnt using sshfs): ... mnt/contrib/ofed/libmlx4/autogen.sh^M /mnt/contrib/ofed/libmlx4/mlx4.driver^M /mnt/contrib/ofed/libmlx4/config^M /mnt/contrib/ofed/libmlx4/Makefile.am^M /mnt/contrib/openresolv^M find: /mnt/contrib/openresolv/pdnsd.in: No such file or directory^M find: /mnt/contrib/openresolv/resolvconf.8.in: No such file or directory^M find: /mnt/contrib/openresolv/resolvconf.conf.5.in: No such file or directory^M find: /mnt/contrib/openresolv/configure: No such file or directory^M find: /mnt/contrib/openresolv/unbound.in: No such file or directory^M find: /mnt/contrib/openresolv/named.in: No such file or directory^M find: /mnt/contrib/openresolv/resolvconf.conf: No such file or directory^M find: /mnt/contrib/openresolv/dnsmasq.in: No such file or directory^M find: /mnt/contrib/openresolv/Makefile: No such file or directory^M find: /mnt/contrib/openresolv/libc.in: No such file or directory^M find: /mnt/contrib/openresolv/README: No such file or directory^M find: /mnt/contrib/openresolv/resolvconf.in: No such file or directory^M find: /mnt/contrib/openresolv: No such file or directory^M /mnt/contrib/ntp^M ? I can rsync(1) the files from the mounted filesystem just fine without any errors/corruption so clearly all the files and directories are there and accessible. Is this a problem in FUSE/sshfs or find(1) and how to start debugging this? I have tested with both FreeBSD and OS X as SSH servers and the same problem is present using both systems. In all of the tests I?ve done there are no mountpoints crossed, each mounted directory tree is on a single filesystem on the server. -Kimmo -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 496 bytes Desc: Message signed with OpenPGP using GPGMail URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20140613/c047a508/attachment.sig>
Kimmo Paasiala
2014-Jun-15 10:28 UTC
Odd problem with find(1) on FUSE sshfs mounted filesystems
On 13.6.2014, at 9.49, Kimmo Paasiala <kpaasial at icloud.com> wrote:> I?m on FreeBSD stable/10 r267390 on one of my systems and on FreeBSD 10.0-RELEASE-p5 i386 on another one. Both exhibit a strange behaviour when find(1) is used on a FUSE sshfs mounted filesystems. This an excerpt of a log from such run (I mounted FreeBSD sources on /mnt using sshfs): > > ... > mnt/contrib/ofed/libmlx4/autogen.sh^M > /mnt/contrib/ofed/libmlx4/mlx4.driver^M > /mnt/contrib/ofed/libmlx4/config^M > /mnt/contrib/ofed/libmlx4/Makefile.am^M > /mnt/contrib/openresolv^M > find: /mnt/contrib/openresolv/pdnsd.in: No such file or directory^M > find: /mnt/contrib/openresolv/resolvconf.8.in: No such file or directory^M > find: /mnt/contrib/openresolv/resolvconf.conf.5.in: No such file or directory^M > find: /mnt/contrib/openresolv/configure: No such file or directory^M > find: /mnt/contrib/openresolv/unbound.in: No such file or directory^M > find: /mnt/contrib/openresolv/named.in: No such file or directory^M > find: /mnt/contrib/openresolv/resolvconf.conf: No such file or directory^M > find: /mnt/contrib/openresolv/dnsmasq.in: No such file or directory^M > find: /mnt/contrib/openresolv/Makefile: No such file or directory^M > find: /mnt/contrib/openresolv/libc.in: No such file or directory^M > find: /mnt/contrib/openresolv/README: No such file or directory^M > find: /mnt/contrib/openresolv/resolvconf.in: No such file or directory^M > find: /mnt/contrib/openresolv: No such file or directory^M > /mnt/contrib/ntp^M > ? > > > I can rsync(1) the files from the mounted filesystem just fine without any errors/corruption so clearly all the files and directories are there and accessible. > > Is this a problem in FUSE/sshfs or find(1) and how to start debugging this? > > I have tested with both FreeBSD and OS X as SSH servers and the same problem is present using both systems. > > In all of the tests I?ve done there are no mountpoints crossed, each mounted directory tree is on a single filesystem on the server. > > -KimmoNo one else has seen this behaviour? I?d like to use sshfs as a secure and less complicated replacement for NFS but if I can?t trust it to work with standard utilities like find(1) I?ll have to pass for now. -Kimmo -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 496 bytes Desc: Message signed with OpenPGP using GPGMail URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20140615/0836b688/attachment.sig>
Jilles Tjoelker
2014-Jul-01 19:21 UTC
Odd problem with find(1) on FUSE sshfs mounted filesystems
On Fri, Jun 13, 2014 at 09:49:13AM +0300, Kimmo Paasiala wrote:> I?m on FreeBSD stable/10 r267390 on one of my systems and on FreeBSD > 10.0-RELEASE-p5 i386 on another one. Both exhibit a strange behaviour > when find(1) is used on a FUSE sshfs mounted filesystems. This an > excerpt of a log from such run (I mounted FreeBSD sources on /mnt > using sshfs):> ... > mnt/contrib/ofed/libmlx4/autogen.sh^M > /mnt/contrib/ofed/libmlx4/mlx4.driver^M > /mnt/contrib/ofed/libmlx4/config^M > /mnt/contrib/ofed/libmlx4/Makefile.am^M > /mnt/contrib/openresolv^M > find: /mnt/contrib/openresolv/pdnsd.in: No such file or directory^M > find: /mnt/contrib/openresolv/resolvconf.8.in: No such file or directory^M > find: /mnt/contrib/openresolv/resolvconf.conf.5.in: No such file or directory^M > find: /mnt/contrib/openresolv/configure: No such file or directory^M > find: /mnt/contrib/openresolv/unbound.in: No such file or directory^M > find: /mnt/contrib/openresolv/named.in: No such file or directory^M > find: /mnt/contrib/openresolv/resolvconf.conf: No such file or directory^M > find: /mnt/contrib/openresolv/dnsmasq.in: No such file or directory^M > find: /mnt/contrib/openresolv/Makefile: No such file or directory^M > find: /mnt/contrib/openresolv/libc.in: No such file or directory^M > find: /mnt/contrib/openresolv/README: No such file or directory^M > find: /mnt/contrib/openresolv/resolvconf.in: No such file or directory^M > find: /mnt/contrib/openresolv: No such file or directory^M > /mnt/contrib/ntp^M > ?> I can rsync(1) the files from the mounted filesystem just fine without > any errors/corruption so clearly all the files and directories are > there and accessible.> Is this a problem in FUSE/sshfs or find(1) and how to start debugging > this?> I have tested with both FreeBSD and OS X as SSH servers and the same > problem is present using both systems.> In all of the tests I?ve done there are no mountpoints crossed, each > mounted directory tree is on a single filesystem on the server.This is likely a problem in FUSE or sshfs. A potentially important difference between rsync(1) and find(1) is that find(1) changes directory as it traverses (except with -L or if it cannot open the current directory) while rsync(1) does not change directories and accesses all files using pathnames that start with the pathname you give it. Try running find(1) under ktrace(1) and looking for the exact situation where failures occur. Apart from -L (follow all symlinks), find(1) may also significantly change its behaviour when it needs to stat(2) everything, such as when -ls is given. Most base system utilities that support recursive directory traversal (usually the -R option) use the same fts(3) code as find(1), though some never change directory or stat everything always or never. -- Jilles Tjoelker