From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id DAB6413877A for ; Sun, 27 Jul 2014 19:44:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 55C61E0BB9; Sun, 27 Jul 2014 19:44:07 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 509C1E0B91 for ; Sun, 27 Jul 2014 19:44:06 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by gateway1.nyi.internal (Postfix) with ESMTP id C455E20F42 for ; Sun, 27 Jul 2014 15:44:05 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Sun, 27 Jul 2014 15:44:05 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.co.uk; h= message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=bTnzudwfLl7pXSSDTaKQQTJOhTo=; b=hkPAE/4UH41GJBvXbifrIXbDixnz r+76npUebs5dsj73DwF1HtkTw+LmwO/YfbjwP8yy7znEe6Od/RjvtHrYpFT6Fa8j 1CWjeNFHGnf6H1hrJy1J7gSFIdWTiSRmy62JQFouXxoyu29LvQWvcRuYCJzadoBD 3o/sv3DD4k9g2No= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=bTnzudwfLl7pXSSDTaKQQT JOhTo=; b=rfrLMZ7iQU1z2W+6q77mEyQzc7y7mTQAwHT8l9HuriG0e9wKal/3sw qxhfSIfx6CKtREb2sbiS0NIOrOh5Y99hoilPewbqHKXT6rM+J1+bO6y5eT0mKdip YXwTz1iIpm/XCu/tIqN/vwHfgMQJkYnOjVPx3T2DzRW81SZkZtIoo= X-Sasl-enc: lj2AlaC9DrfrfP5Rv7O5Sv7k+45nw6qfRvGE9Rs8tRtE 1406490244 Received: from [192.168.1.146] (unknown [77.101.146.254]) by mail.messagingengine.com (Postfix) with ESMTPA id A217D680190 for ; Sun, 27 Jul 2014 15:44:04 -0400 (EDT) Message-ID: <53D55682.2090607@fastmail.co.uk> Date: Sun, 27 Jul 2014 20:44:02 +0100 From: Kerin Millar User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20140623 FossaMail/24.6.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] NFS tutorial for the brain dead sysadmin? References: <53D527F4.5080108@xunil.at> <065b33b7-e8ad-48d4-8e83-7743b8da7d02@email.android.com> In-Reply-To: <065b33b7-e8ad-48d4-8e83-7743b8da7d02@email.android.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 32553d65-e6b7-4cb5-979e-dc4520387bda X-Archives-Hash: 52a5aa51dca26e6c4fda01e875d164d8 On 27/07/2014 17:55, J. Roeleveld wrote: > On 27 July 2014 18:25:24 CEST, "Stefan G. Weichinger" wrote: >> Am 26.07.2014 04:47, schrieb walt: >> >>> So, why did the "broken" machine work normally for more than a year >>> without rpcbind until two days ago? (I suppose because nfs-utils was >>> updated to 1.3.0 ?) >>> >>> The real problem here is that I have no idea how NFS works, and each >>> new version is more complicated because the devs are solving problems >>> that I don't understand or even know about. >> >> I double your search for understanding ... my various efforts to set up >> NFSv4 for sharing stuff in my LAN also lead to unstable behavior and >> frustration. >> >> Only last week I re-attacked this topic as I start using puppet here to >> manage my systems ... and one part of this might be sharing >> /usr/portage >> via NFSv4. One client host mounts it without a problem, the thinkpads >> don't do so ... just another example ;-) >> >> Additional in my context: using systemd ... so there are other >> (different?) dependencies at work and services started. >> >> I'd be happy to get that working in a reliable way. I don't remember >> unstable behavior with NFS (v2 back then?) when we used it at a company >> I worked for in the 90s. >> >> Stefan > > I use NFS for filesharing between all wired systems at home. > Samba is only used for MS Windows and laptops. > > Few things I always make sure are valid: > - One partition per NFS share > - No NFS share is mounted below another one > - I set the version to 3 on the clients > - I use LDAP for the user accounts to ensure the UIDs and GIDs are consistent. These are generally good recommendations. I'd just like to make a few observations. The problems associated with not observing the first constraint (one filesystem per export) can be alleviated by setting an explicit fsid. Doing so can also help to avoid stale handles on the client side if the backing filesystem changes - something that is very useful in a production environment. Therefore, I tend to start at 1 and increment with each newly added export. For example:- /export/foo *(async,no_subtree_check,fsid=1) /export/foo/bar *(async,no_subtree_check,fsid=2) /export/baz *(async,no_subtree_check,fsid=3) If using NFSv3, I'd recommend using "nolock" as a mount option unless there is a genuine requirement for locks to be co-ordinated. Such locks are only advisory and are of questionable value. Using nolock simplifies the requirements on both server and client side, and is beneficial for performance. NFSv3/UDP seems to be limited to a maximum read/write block size of 32768 in Linux, which will be negotiated by default. Using TCP, the upper bound will be the value of /proc/fs/nfsd/max_block_size on the server. Its value may be set to 1048576 at the most. NFSv3/TCP is problematic so I would recommend NFSv4 if TCP is desired as a transport protocol. NFSv4 provides a useful uid/gid mapping feature that is easier to set up and maintain than nss_ldap. > > NFS4 requires all the exports to be under a single foldertree. This is a myth: http://linuxcostablanca.blogspot.co.uk/2012/02/nfsv4-myths-and-legends.html. Exports can be defined and consumed in the same manner as with NFSv3. > > I haven't had any issues in the past 7+ years with this and in the past 5+ years I had portage, distfiles and packages shared. > /etc/portage is symlinked to a NFS share as well, allowing me to create binary packages on a single host (inside a chroot) which are then used to update the different machines. > > If anyone wants a more detailed description of my setup. Let me know and I will try to write something up. > > Kind regards > > Joost > --Kerin