From nobody Sun May 7 14:16:28 2023 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDmgc6KFJz490sR for ; Sun, 7 May 2023 14:16:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDmgc5C2jz3KdX for ; Sun, 7 May 2023 14:16:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683468988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=65eR6AlPBnVP2Q0VtMGORxozmg9pABqZJr5c5HsqWek=; b=tSc7Xo0xQrUTDNveN3riI7GbSN7To31MUWo7guGFd9p36DofP7QR35JBw38A/Zc59Xod+1 WjNa9bNadygoYWBlvQ4CtZdLQsJtatwVJNu5TC4bP5yOqLt/rzYrRgOJOjagLeOdqYhKDx hhIe6sEO2pCYPefwy4ySbbuWOyW4wbpqpaqbL6B6UH+ckF7BIo4ZtQ7ZPwJwDFyb8o9nKE y8/L6vjb7BLrQ4ezyyusevqZOP6fwsJxNzrwDOXgB1zsGOSB1QSJqzaMXwllOcfyDZCTAF JUK0ULi6n6NulKyPcAhyOayJQ1FVlJjlcStrwzqwmbwPJ1jDotB+tfzQrbnWEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683468988; a=rsa-sha256; cv=none; b=DzpLFdfnIgBbA0NhO73m41n5O4Gan56Wim8BMGK3pSdu8WmibXt/7xIKLMO81zFwS0Qaj7 Cx8/Yd2KjzxheJxWDxtPusQAwosmeGYXyX/gmoET/ppXFRbjGqRRZxI9XrfIBA9NgTkB9q Gd6882VdS/4krG+w308CZ1n7G1WoYe0Q0xTmyItfQjVsMULWkoQ2xEw5fFFRaefxlkCgc+ 3RykDPOaHPwcGdbo+NbDqFVeD0qMt2qZnNTqNxuGGqlJW3xozjyyJLkT2YxeR9p8lWQkQ3 yTXb8ntBI0tZyER2m3uyW/NCbUeaj69/5Zq3Jm5nfAsKX0fiCldYHKETlWxjUw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDmgc48p4zLcV for ; Sun, 7 May 2023 14:16:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 347EGSAu097305 for ; Sun, 7 May 2023 14:16:28 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 347EGSic097304 for ports-bugs@FreeBSD.org; Sun, 7 May 2023 14:16:28 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 271296] sysutils/fusefs-sshfs: hard linking files gives input/ouput errors Date: Sun, 07 May 2023 14:16:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: gkroon@maelstrom.ninja X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bofh@freebsd.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271296 Bug ID: 271296 Summary: sysutils/fusefs-sshfs: hard linking files gives input/ouput errors Product: Ports & Packages Version: Latest Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: bofh@freebsd.org Reporter: gkroon@maelstrom.ninja Assignee: bofh@freebsd.org Flags: maintainer-feedback?(bofh@freebsd.org) Hi all, I just upgraded my server (let's call it "server A") from FreeBSD 1= 3.1 to FreeBSD 13.2. But now my system produces input/output errors when I try to make hard link= s in an SSHFS mounted directory. # Summary Example to reproduce on server A: ``` $ cd ~/Maildir # this is the SSHFS mount, on "server B" $ echo "foo" > foo $ ln foo bar ln: bar: Input/output error ``` It seems to create a new file with a new inode instead (see first column): ``` 771 -rw-r--r-- 1 user user 4 May 3 10:58 /home/user/Maildir/bar 774 -rw-r--r-- 1 user user 4 May 3 10:58 /home/user/Maildir/foo ``` Server A is using FreeBSD 13.2, on which I executed the above commands. Server B is using TrueNAS-13.0-U4 (based on FreeBSD 13.1-RELEASE-p7), on wh= ich the remote directory exists I'm mounting on the client. This is the /etc/fstab entry on server A, which worked using FreeBSD 13.1: ``` user@server-b.lan:/mnt/tank/home/user/Maildir /home/user/Maildir fusefs rw,allow_other,mountprog=3D/usr/local/bin/sshfs,port=3D1116,IdentityFile=3D= /root/.ssh/id_ed25519,reconnect,ServerAliveInterval=3D15,ServerAliveCountMa= x=3D3,late 0 0 ``` Creating hard links works on both the servers' own filesystems (ZFS), but n= ot anymore when I upgraded server A to FreeBSD 13.2, using the same SSHFS moun= ted directory. ## Setup SSHFS is installed on my system: ``` $ pkg info | grep fusefs-sshfs fusefs-sshfs-3.7.3_1 Mount remote directories over ssh ``` I'm using the following entry in /boot/loader.conf: ``` $ grep fuse /boot/loader.conf fusefs_load=3D"YES" ``` I can also see the FUSE kernel module being loaded (at boot): ``` $ kldstat | grep fuse 2 1 0xffffffff8213f000 262f0 fusefs.ko ``` And the SSHFS mount is still being mounted (at boot): ``` $ mount | grep home zroot/usr/home on /usr/home (zfs, local, noatime, nfsv4acls) user@server-b.lan:/mnt/tank/home/user/Maildir on /usr/home/user/Maildir (fusefs.sshfs) ``` Please note that /home is of course a symlink to /usr/home: ``` $ ls -ld /home lrwxr-xr-x 1 root wheel 8 Dec 5 12:58 /home@ -> usr/home ``` ## Background I found out the above when my MDA (Dovecot) on server A produced the follow= ing errors in the mail logs: ``` May 3 10:35:08 mail dovecot[3349]: imap(user)<73981>: Er= ror: Mailbox INBOX: link(/home/user/Maildir/cur/1683098837.M45130P81809.mail,S=3D44503,W=3D4521= 7:2,, /home/user/Maildir/.Trash/tmp/1683102908.M640256P73981.mail) failed: Input/output error ``` These errors popped up after the upgrade to FreeBSD 13.2, and it is making = it impossible to move mails around in my MUAs (e.g. Thunderbird). Interestingly, my MTA (Postfix) can still receive and store mails on the SS= HFS mount. No problem at all. So it seems only Dovecot is hard linking files, which is now causing input/output errors when I upgraded to FreeBSD 13.2. Also, the Dovecot user still has permissions to perform read and write operations on the SSHFS mount. But hard linking is still troublesome: ``` # sudo -u dovecot touch /home/user/Maildir/foo # sudo -u dovecot rm /home/user/Maildir/foo # sudo -u dovecot touch /home/user/Maildir/foo # sudo -u dovecot ln /home/user/Maildir/foo /home/user/Maildir/bar ln: /home/user/Maildir/bar: Input/output error ``` Can anyone reproduce this by trying to make a hard link on an SSHFS mount u= sing FreeBSD 13.2? Thanks in advance! P.S. I copied the above from my original post on [Reddit](https://www.reddit.com/r/freebsd/comments/136ewci/upgraded_to_free= bsd_132_using_sshfs_hard_linking/). I have also since given up on SSHFS, and replaced it with NFS over WireGuar= d. --=20 You are receiving this mail because: You are the assignee for the bug.=