From owner-freebsd-fs@FreeBSD.ORG Fri Sep 21 21:18:21 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5819106564A for ; Fri, 21 Sep 2012 21:18:21 +0000 (UTC) (envelope-from tjg@soe.ucsc.edu) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id B6C168FC08 for ; Fri, 21 Sep 2012 21:18:21 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so9255341pbb.13 for ; Fri, 21 Sep 2012 14:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucsc.edu; s=ucsc-google; h=mime-version:date:message-id:subject:from:to:content-type; bh=mWjJELHmgZ+JzW5187eVF+ddUokUSpsU6bSkldKOVfY=; b=jk4zxD+TFAzFq9jCPa6FV5y5aiGz6lBDzbXqhhwcWcj7lpsKePmB8fpBGs5DTg6B6L l85x+Kg91MFFQnZHafZ02ae0aFLEU7ldzgigI2cymVjFmD9uSFyE00J11MbjYLnpex8D v6JpdeJmJPCtq66+9+R9UNVPKORymsf9E7srI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-gm-message-state; bh=mWjJELHmgZ+JzW5187eVF+ddUokUSpsU6bSkldKOVfY=; b=YgB7o2miftTx1VDTdIXH7QetRGVWfGtbnSW6aUBxM38s0Kv7/pvSLHGPWt1rSGiET0 8wM1zF8zhOh2BY0J1QA+Uz/pR+GV8n2Sq8RxrEWxkkxv4NK35vL15eSPlvaW0Uw1NWvl 22gBWH+zQ2LgCRoHme7hFox5w/fwCGxWMov/KTHpB7pho+7V/5UCyLNEW3kM24Z3jP5E eOPlkrFjJrJ5dwEfjLZ++WYyCPlkP8ajfFRBOVlc8uqTWvD77dYVLVO6luVUk8OOlq2a gLrPjoDalv592EMnvv2Si+Lsff6OgvWkFQmN6MvUYKXhwqcH9zNjOj1f746drtf9Moax lKKw== MIME-Version: 1.0 Received: by 10.68.218.196 with SMTP id pi4mr18418366pbc.128.1348262301144; Fri, 21 Sep 2012 14:18:21 -0700 (PDT) Received: by 10.68.25.69 with HTTP; Fri, 21 Sep 2012 14:18:21 -0700 (PDT) Date: Fri, 21 Sep 2012 14:18:21 -0700 Message-ID: From: Tim Gustafson To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQk2CUhno3qMOHE+AJg+ih/TPSqDoctWg+PStjxbVJSIYdTSCuoXXnIXVEnup/Ry6UMRHkI1 Subject: Exporting ZFS File System to Multiple Subnets X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 21:18:22 -0000 Hi, I Googled around about exporting ZFS file systems to multiple subnets, but most of what I found was years old, so I thought I'd ask to see what the current state of things are. We have about 2,000 file systems that we need to export to a handful of subnets. Most file systems are exported to the same set of subnets. If I were setting up /etc/exports, I would do something like: /export/home -alldirs -network=1.2.3.0/22 /export/home -alldirs -network=1.2.3.0/23 /export/projects -alldirs -network=4.5.6.0/22 /export/projects -alldirs -network=4.5.6.0/23 Perhaps followed by some additional lines to specify additional export networks for specific filesystems: /export/projects/foo -network 7.8.9.0/24 /export/projects/bar -network 9.8.7.0/24 But, FreeBSD's implementation of the "zfs sharenfs" property does not allow multiple subnets to be specified. And it seems that ZFS somehow gets in the way of /etc/exports for ZFS file systems, so that if I turn off sharenfs ("zfs inherit sharenfs tank/export; zfs inherit sharenfs tank/projects") it actually blocks the export lines in /etc/exports from being mounted. So, how can I use FreeBSD and ZFS to export file systems in this way? It seems like sharenfs is a dead end, and it also seems like /etc/exports doesn't work because ZFS gets in the way. This seems like a really significant impediment to using FreeBSD as a ZFS file server for anything other than the most basic of configurations. Is there some magic that I can use to at least work around this limitation for now? Ideally, we'd just move to NFSv4, but a significant portion of our clients are not NFSv4 ready, so that's not an option. -- Tim Gustafson tjg@soe.ucsc.edu 831-459-5354 Baskin Engineering, Room 313A