From owner-freebsd-fs@freebsd.org Tue Sep 19 09:54:52 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF1E1E097AA for ; Tue, 19 Sep 2017 09:54:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 867FE750DE for ; Tue, 19 Sep 2017 09:54:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v8J9slnD040667 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 19 Sep 2017 12:54:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v8J9slnD040667 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v8J9slKC040664; Tue, 19 Sep 2017 12:54:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 19 Sep 2017 12:54:47 +0300 From: Konstantin Belousov To: Andreas Longwitz Cc: freebsd-fs@freebsd.org Subject: Re: nullfs with double mount is broken in FreeBSD 10 Stable Message-ID: <20170919095447.GZ78693@kib.kiev.ua> References: <59C0E45E.3070603@incore.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59C0E45E.3070603@incore.de> User-Agent: Mutt/1.9.0 (2017-09-02) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 09:54:53 -0000 On Tue, Sep 19, 2017 at 11:33:18AM +0200, Andreas Longwitz wrote: > The described problem does not exist in V8, but in V10 Stable r317936. > > I use a device /dev/md2 defined in /etc/rc.conf: > > mdconfig_md2="-t swap -s 384m" > mdconfig_md2_newfs="-n" > mdconfig_md2_owner="root:wheel" > mdconfig_md2_perms="750" > > In /etc/fstab I have: > > /dev/md2 /tmp1 ufs rw,async,noatime,noauto 0 0 > /tmp1 /home/tmp1 nullfs rw,noauto 0 0 > /tmp1 /var/tmp1 nullfs rw,noauto 0 0 > > Now I run: > > mount /home/tmp1 > mount /var/tmp1 > while true; do > rm -f /home/tmp1/* > cpdup /boot/kernel /home/tmp1 > cp /var/tmp1/kernel /dev/null > df -h /tmp1 > done > > The output is > > Filesystem Size Used Avail Capacity Mounted on > /dev/md2 372M 88M 254M 26% /tmp1 > Filesystem Size Used Avail Capacity Mounted on > /dev/md2 372M 100M 242M 29% /tmp1 > Filesystem Size Used Avail Capacity Mounted on > /dev/md2 372M 112M 229M 33% /tmp1 > Filesystem Size Used Avail Capacity Mounted on > /dev/md2 372M 125M 217M 36% /tmp1 > ..... > > The "Used" space grows quickly until "No space available". > After umount /var/tmp1 the space is back again. > > I see the same behaviour when md is replaced by tmpfs. > > I have tried the patch from commit 317936 (V11) without success. > The problem exists on i386 and amd64. In production (V8) I use this > double mount construction for jail communication without any problems. Can you try the _latest_ stable/11 ? It is enough to only install the kernel, keep the userspace. If it does not help, perhaps you will need the -o nocache mount option.