From owner-freebsd-fs@FreeBSD.ORG Fri Nov 15 18:59:21 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E4854AC for ; Fri, 15 Nov 2013 18:59:21 +0000 (UTC) Received: from mail-oa0-f45.google.com (mail-oa0-f45.google.com [209.85.219.45]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0DC732E46 for ; Fri, 15 Nov 2013 18:59:20 +0000 (UTC) Received: by mail-oa0-f45.google.com with SMTP id m1so4424621oag.32 for ; Fri, 15 Nov 2013 10:59:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=ZuzZW4SDwQ3PqNXCglBynQduaLwXPm5e3Kdi3WdJxhI=; b=ftZKOp+nR7xMICUxBzhAT7h4+lDg7SghhE6p4abaVztWvmc5RKRPt3NE/xjLSNIT6/ L6tKzkwWOTNjE94FcYQZmSjnp1+4KKoGQUUx50/2LHUR/LwMRxb8yCtb5iD0pUDSM7AT QHSh1OS0oUaAljIUTOzbtNYvXBCe21xfzFDSQRMH3xPxZ11tJ0Wn+mR5UZpE9yG1lPe3 b1n7tYlLZ1kUS5QxDi2nhzZnqbiFP5Y+U1CtP8oO3GotZdPanOnR0V/f8Sx7aMRAcUcG AbUpq61am80J0zwHqq6xkVIxtvCrsBB5VEvBfdpalQPxjlu4QBlr109j8jpU4ptas4rr ou+g== X-Gm-Message-State: ALoCoQmr9uF5AENuJZBjpWbc7TEUgt2wetNL0Ay7HCReWNxxH6YATBZQmlvcFE9uyf19Li8YxINR MIME-Version: 1.0 X-Received: by 10.60.155.240 with SMTP id vz16mr1949893oeb.102.1384541954121; Fri, 15 Nov 2013 10:59:14 -0800 (PST) Received: by 10.60.165.40 with HTTP; Fri, 15 Nov 2013 10:59:13 -0800 (PST) X-Originating-IP: [217.15.27.35] Date: Fri, 15 Nov 2013 22:59:13 +0400 Message-ID: Subject: What is the way to determine owner of zfs jailed filesystem From: Oleg Ginzburg To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.16 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Nov 2013 18:59:21 -0000 Hi maillist, I've playing with zfs jail and could not find out what kind of jail have this or that FS For example: % jls -h jid name path jid name path 1 jail1 /usr/jails/jails/jail1 2 jail2 /usr/jails/jails/jail2 3 testempjail /usr/jails/jails/testempjail % zfs create zroot/j1fs % zfs set jailed=on zroot/j1fs % zfs jail jail2 zroot/j1fs % jexec 2 login -f root root@jail2:~ # zfs list NAME USED AVAIL REFER MOUNTPOINT zroot 39.5G 2.62T 31K none zroot/j1fs 31K 2.62T 31K none root@jail2:~ # zfs set mountpoint=/tmp/zfs zroot/j1fs root@jail2:~ # zfs mount -a root@jail2:~ # logout % zfs list NAME USED AVAIL REFER MOUNTPOINT zroot 39.5G 2.62T 31K none zroot/j1fs 51K 2.62T 51K /tmp/zfs zroot/root 37.4G 2.62T 36.2G / % zfs mount zroot/j1fs cannot mount 'zroot/j1fs': dataset is exported to a local zone On the master system i see that zroot/j1fs has a mount point /tmp/zfs (actually /tmp/zfs) However, documentation and zfs get does not answer how to find out that the owner of zroot/j1fs is jail2 (or jid 2) % zfs get all zroot/j1fs NAME PROPERTY VALUE SOURCE zroot/j1fs type filesystem - zroot/j1fs creation Fri Nov 15 22:41 2013 - zroot/j1fs used 51K - zroot/j1fs available 2.62T - zroot/j1fs referenced 51K - zroot/j1fs compressratio 1.00x - zroot/j1fs mounted yes - zroot/j1fs quota none default zroot/j1fs reservation none default zroot/j1fs recordsize 128K default zroot/j1fs mountpoint /tmp/zfs local zroot/j1fs sharenfs off default zroot/j1fs checksum on default zroot/j1fs compression off default zroot/j1fs atime on default zroot/j1fs devices on default zroot/j1fs exec on default zroot/j1fs setuid on default zroot/j1fs readonly off default zroot/j1fs jailed on local zroot/j1fs snapdir hidden default zroot/j1fs aclmode discard default zroot/j1fs aclinherit restricted default zroot/j1fs canmount on default zroot/j1fs xattr off temporary zroot/j1fs copies 1 default zroot/j1fs version 5 - zroot/j1fs utf8only off - zroot/j1fs normalization none - zroot/j1fs casesensitivity sensitive - zroot/j1fs vscan off default zroot/j1fs nbmand off default zroot/j1fs sharesmb off default zroot/j1fs refquota none default zroot/j1fs refreservation none default zroot/j1fs primarycache all default zroot/j1fs secondarycache all default zroot/j1fs usedbysnapshots 0 - zroot/j1fs usedbydataset 51K - zroot/j1fs usedbychildren 0 - zroot/j1fs usedbyrefreservation 0 - zroot/j1fs logbias latency default zroot/j1fs dedup off default zroot/j1fs mlslabel - zroot/j1fs sync standard default zroot/j1fs refcompressratio 1.00x - zroot/j1fs written 51K - zroot/j1fs logicalused 35.5K - zroot/j1fs logicalreferenced 35.5K -