Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2720776rwb; Mon, 3 Oct 2022 04:50:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6FdCP9owgugr8yW/al816C6Z4JxedlVxZqKtUbvSQGU/kyiH72yexPKrRrOj9p4lmF3RMd X-Received: by 2002:a05:6402:36b:b0:458:5ac2:8d56 with SMTP id s11-20020a056402036b00b004585ac28d56mr16107666edw.25.1664797854239; Mon, 03 Oct 2022 04:50:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664797854; cv=none; d=google.com; s=arc-20160816; b=Sz+bJlWJmdcf19on+3PZYVc3VTTPJRKoffukYF2fsnc+LW48Ph/uJJDPHHcKdwEBHx 5zSD/sHA9MfE01dbmBvwi/mrdHDRA/JBAjPl+eUiedFbE4LMr+ossTD/pu0oexD59sDC xPOxkR9rij4XFF2255uWHYdoVwU1Q53UmXBDZMlPOPllOu3lYLZh6WcuLYQOuUEwepbm i4Ps9J5PgJ00U1GPQEEW2GDNY+aNFdHJeKLWx1JZk5AJsJXKNNReiIfzNL0/6Dt3gu3W /uWLXhxTthEXPINC4FCGZ54eANfcqr6k/anYxL3KCneCpnuIxQUvTBVbwzkl5LmlIvJl rJ/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:to:from :subject:message-id:dkim-signature; bh=kS1R8kHMe+ILE6S0DqCLh1a2Q+6tx4t5illVCgUm4RU=; b=0WRz8VSuyHdwGq9cy2iAi6MMSKkIikj0EYJvYUrc1PWl4SyirlTpQovzqrl5Bq/Vv8 32cMa/SE+6JHDGMZYUBKQkuYKYCAjssLCTawMZK3ApLs4iy8JE8XtsXn2th3oo0hxvYq iY6a+qJxSXS6kBfW+RmvzGVnkr1/1hnHCGZHe1Zb3CwGBZasmEpGg3XeUT0Pger/37q1 qtQO/jUFUGGKTa0O9AZ9il4SX5x4BiSeKgc4XI2j1GYzbnG6fzc50kxVWinR1dgo7LnT kJ6PeDCt8o+GKFMP+ueKzS/fEoAC+ODRIymiBhZSaX/TZfz6Iodob5y4wtLDZbOUd5aC Mjhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Xw2o/piA"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k2-20020a1709063fc200b00718c7b4cbeasi6019011ejj.991.2022.10.03.04.50.21; Mon, 03 Oct 2022 04:50:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Xw2o/piA"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229741AbiJCLjN (ORCPT + 99 others); Mon, 3 Oct 2022 07:39:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229904AbiJCLjH (ORCPT ); Mon, 3 Oct 2022 07:39:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7290EE0F for ; Mon, 3 Oct 2022 04:39:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6C013B8106E for ; Mon, 3 Oct 2022 11:39:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D141FC433D6; Mon, 3 Oct 2022 11:39:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664797144; bh=Hn7dwJdMjfjwj64RrVYMraCigdGyaiUEZKiIc3cfoCU=; h=Subject:From:To:Date:In-Reply-To:References:From; b=Xw2o/piAQ3bKX/00ZYZeJLu4wDithvikWPxWuw4pcncwwuxXwTKRsUJlyYPgAGWcf gclYd3MfQrKAMVgOs+dYi2S237qGqqlJM61cvAMyQgg4kXiIOPYJwsaBMegP2lTfOZ jWfYF3XogbM7pLdI+o2Hx/ya0o1Vc2IlvkckBJi92JD9izI3E18sKfaPVLkZiZjq8L Kq5END2gZHLUjgY5KAssJ0xXTYr6iTf4LFjwmNnw7xvL5xA1ZWOcYshKLF5HGgGXbi 5OukBAFoAkDPxacxtQ7R7mXmNJWlyip2s9TIYlvxVa8FArYkxP1QZm+lduFYYnJNIE NXGEIwMnMbNIg== Message-ID: <8cd63730f7b5f3e2aa3bde98587de0c6a42b384b.camel@kernel.org> Subject: Re: nfs4.1+: workaround for defunct clientaddr? From: Jeff Layton To: Manfred Schwarb , linux-nfs@vger.kernel.org Date: Mon, 03 Oct 2022 07:39:02 -0400 In-Reply-To: <39bf58c7-47d9-744b-6d26-d672aa713024@gmx.ch> References: <39bf58c7-47d9-744b-6d26-d672aa713024@gmx.ch> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Sun, 2022-10-02 at 14:35 +0200, Manfred Schwarb wrote: > Hi, >=20 > I have 2 boxes connected with 2 network cards each, one > crossover connection and one connection via LAN. > I want to use the crossover connection for backup, > so I want to be able to select exactly this wire when > doing my NFS backup transfers. Everything interconnected via NFS4.1 > and automount. >=20 > Now the thing is, if there is an already existing connection > via LAN, I am not able to select the crossover connection, > there is some session reuse against my will. >=20 > automount config: > /net/192.168.99.1 -fstype=3Dnfs4,nfsvers=3D4,minorversion=3D1,clientaddr= =3D192.168.99.100 / 192.168.99.1:/ > /net2/192.168.98.1 -fstype=3Dnfs4,nfsvers=3D4,minorversion=3D1,clientaddr= =3D192.168.98.100 / 192.168.98.1:/ >=20 > mount -l: > 192.168.99.1:/data on /net/192.168.99.1/data type nfs4 (...,clientaddr=3D= 192.168.99.100,addr=3D192.168.99.1) > 192.168.99.1:/data on /net2/192.168.98.1/data type nfs4 (...,clientaddr= =3D192.168.99.100,addr=3D192.168.99.1) >=20 > As you see, both connections are on "192.168.99.1:/data", and the backup = runs > over the same wire as all user communication, which is not desired. > This even happens if I explicitly set some clientaddr=3D option. >=20 > Now I found two workarounds: > - downgrade to NFS 4.0, clientaddr seems to work with it > - choose different NFS versions, i.e. one connection with > minorversion=3D1 and the other with minorversion=3D2 >=20 > Both possibilities seem a bit lame to me. > Are there some other (recommended) variants which do what I want? >=20 > It seems different minor versions result in different "nfs4_unique_id" va= lues, > and therefore no session sharing occurs. But why do different network > interfaces (via explicitly set clientaddr=3D by user) not result in diffe= rent > "nfs4_unique_id" values? >=20 > Thanks for any comments and advice, > Manfred That sounds like a bug. We probably need to compare the clientaddr values in nfs_compare_super or nfs_compare_mount_options so that it doesn't match if the clientaddrs are different. As a workaround, you can probably mount the second mount with -o nosharecache and get what you want. --=20 Jeff Layton