From owner-freebsd-fs@FreeBSD.ORG Wed Mar 28 09:26:45 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 04548106566C for ; Wed, 28 Mar 2012 09:26:45 +0000 (UTC) (envelope-from rsb@berentweb.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6BA3C8FC0A for ; Wed, 28 Mar 2012 09:26:44 +0000 (UTC) Received: by lagv3 with SMTP id v3so1380033lag.13 for ; Wed, 28 Mar 2012 02:26:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=berentweb.com; s=google; h=mime-version:sender:x-originating-ip:date:x-google-sender-auth :message-id:subject:from:to:content-type; bh=ptULYrTOOjDr2AD+mFcRy/E49rT0SlrgiuVhAy2vsUQ=; b=YpR/Y22zNV64hXShgGOMsmp14aNG4cy66thvkg2Cr1zlNZuKxxBZpzpEwh76dpvTdZ IGafbrxGGfsEg1al3ZeaVGbgt6NSayz2o+yh+2V5TOuT+775yM9EHq5eLLZUVT3RPNb1 B67GbeUXSBMrmDD0t+tBIfaMTh2i/OAS4rQzw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:date:x-google-sender-auth :message-id:subject:from:to:content-type:x-gm-message-state; bh=ptULYrTOOjDr2AD+mFcRy/E49rT0SlrgiuVhAy2vsUQ=; b=TZhK1f8pND4uHq0HVP9B3+dM5t/Zf/dzrHneo2JvrtES1aRX6w8BiEgOT4JGipLVou qHYPdtIu7+JDul3R2WD/6sZhWVcOYaOUHQ6C3KoOzY40Mvo9o77lMVor0gWYR/SsGtPs qZlAcyfafDudGwhqzQ/WN3QzxxoTo05PSX586x0E+ihGjuA7sUZUyth+Wl0NniU0OwCo broQzzCTjkJlYD5xI2EbEp0zCVpCvNOtuZmExW7sSSY7iU8RbSRcH5kFGKf2erQaU244 SJiyyuP1rkbu3dHuC4A9awOLxC23TnPYASSZglW1lF8rUbJNSnEWasUrHCnKtn2Az9Bw r8uQ== MIME-Version: 1.0 Received: by 10.152.110.170 with SMTP id ib10mr24604968lab.7.1332926802956; Wed, 28 Mar 2012 02:26:42 -0700 (PDT) Sender: rsb@berentweb.com Received: by 10.112.77.15 with HTTP; Wed, 28 Mar 2012 02:26:42 -0700 (PDT) X-Originating-IP: [85.110.15.53] Date: Wed, 28 Mar 2012 12:26:42 +0300 X-Google-Sender-Auth: _Njl4CENt9EaS4FRJC_J7SlqbLk Message-ID: From: Beeblebrox To: freebsd-fs@freebsd.org X-Gm-Message-State: ALoCoQnVAWs6OSuGCc1JbAqhwkmR0Z29MTAm1ct0bFUHGvCJquCA6e27bdrNJa7pUsynWPUcdg0B Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: unionfs: strange error when mounted in jail. 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: Wed, 28 Mar 2012 09:26:45 -0000 I am using ezjail to setup some jailed services. Ezjail sets up a light-jail and a base(fat)-jail which is mounted "ro" under the light-jail. I modified this to experiment with an idea. In addition to the standard mount_nullfs ezjail does, I placed in /etc/fstab.pxe: > > /data/jails/base/usr/local /data/jails/pxe/usr/local unionfs rw,below,noatime,copymode=masquerade 0 0 > > /data/jails/base/var/db/pkg /data/jails/pxe/var/db/pkg unionfs rw,below,noatime,copymode=masquerade 0 0 What this does, is it allows to create a "base ports" fat-jail where all "base ports" will be included in subsequently created thin-jails, not as copy but as a unionfs layer. When updating ports in the jails, the "base ports" package will have to be updated only once, instead of repeated update for each thin-jail. I also have zfs dedup=on for the /data/jails folder. I install jail-specific ports into the thin-jail by normal process -> start the jail normally & pkg_add. I then shut-down jail, modify the jail's fstab (fstab.pxe) and re-start jail. The problem I run into: Start the jail, then #jexec into jailed env. Execute an app or service like portmaster (installed into /data/jails/base) or dhcpd installed into /data/jails/pxe) portmaster will start-up, but hangs after a short run. dhcpd hangs and freezes the jail immediately - I cannot kill any of the processes and have to do a poweroff. Both executables run normally without the unionfs structure. Regards.