From owner-freebsd-fs@FreeBSD.ORG Mon Sep 19 15:29:42 2011 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 487BC106566B for ; Mon, 19 Sep 2011 15:29:42 +0000 (UTC) (envelope-from rabgvzr@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0EC198FC13 for ; Mon, 19 Sep 2011 15:29:41 +0000 (UTC) Received: by ywp17 with SMTP id 17so5196586ywp.13 for ; Mon, 19 Sep 2011 08:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=H4YGPFchLF+rysCWV4c1AX6C4i/HVslR+ONykAsKulQ=; b=ihz7GoALqdoe+l7PHog69VNmHryXLHBrXSuYqVBiRNnglPW3tvayeLwt5g4daNbUfF ziubWltz9vjc4QKd9VkzETw9ZCWyrX2DUjMpdN9t/rT/Uj4L7VnbC4LYMFEYGKY6KTV/ F1tXBfipWmFy4jvq9WA2/1DEA1KzeWqnFMztg= MIME-Version: 1.0 Received: by 10.236.80.74 with SMTP id j50mr14842979yhe.131.1316446181164; Mon, 19 Sep 2011 08:29:41 -0700 (PDT) Received: by 10.236.43.167 with HTTP; Mon, 19 Sep 2011 08:29:41 -0700 (PDT) Date: Mon, 19 Sep 2011 11:29:41 -0400 Message-ID: From: Rotate 13 To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=UTF-8 Subject: ZFS: deferring automounts/mounting root without bootfs [9.0-BETA2] 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: Mon, 19 Sep 2011 15:29:42 -0000 9.0-BETA2 system is booted off removable UFS volume, but root is mounted from ZFS. I try to meet the following two goals: 1. Not use bootfs property (too many limitations mentioned in docs) 2. Use ZFS inheritable mountpoints and management (not clutter up /etc/fstab... and not set mountpoint= on each child dataset!) Config info is below. Result: System boots, but hangs with init: can't exec getty '/usr/libexec/getty' for port /dev/ttyv0: No such file or directory (and many similar messages) I think I need some way other than bootfs to defer ZFS automatic mounting until after / is mounted. Apparently mount is not functioning right. I am guessing that ZFS tries to mount tank/usr, tank/var and so forth before root is mounted (thus mounts fail). However this is just a guess - based on what happens when I zpool import -f -o altroot. For obvious reason, I don't have logs of above problem; and I cannot review the messages that scrolled by, as this keyboard completely lacks a scroll lock key (guilty: Dell). Simplified config (have tried number of subtle variations): zpool create -O canmount=off -O mountpoint=/ setuid=off tank /path/to/disk zfs create -o mountpoint=legacy -o setuid=on tank/root [...create datasets for /usr, /var, and so forth, inheriting root mountpoint...] = On UFS volume: = /boot/etc/fstab: tank/root / zfs rw,noatime 0 0 /path/to/ufsboot /boot rw,noatime 0 0 /boot/loader.conf zfs_load="YES" vfs.root.mountfrom="zfs:tank/root" = On ZFS volume: = /etc/fstab: tank/root / zfs rw,noatime 0 0 /etc/rc.conf: zfs_enable="YES" (also tried placing this on UFS volume in /boot/etc/rc.conf) /boot on ZFS is kept in sync with /boot on UFS volume. Note, zpool is exported/imported and zpool.cache properly placed in /boot/zfs; before I did that, I got mountroot followed by panic. Off hand note: I get lots of lock order reversals mounting filesystems on 9.0-BETA2. But not specific only to ZFS. Thanks for any advices in making work an unusual, but very useful configuration.