From owner-freebsd-fs@FreeBSD.ORG Mon Sep 19 15:37:39 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 BC78A1065672 for ; Mon, 19 Sep 2011 15:37:39 +0000 (UTC) (envelope-from rabgvzr@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 842A08FC12 for ; Mon, 19 Sep 2011 15:37:39 +0000 (UTC) Received: by gxk28 with SMTP id 28so5693143gxk.13 for ; Mon, 19 Sep 2011 08:37:39 -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=KBnjVQcAk34hZY25kSyrfvBWpGWcccedn0b4XO4X7t9ZPgk2evBciaC9zJ0iR+zQWd 7iZKf4IA2E3DwQSfFRKjpVm33MjknRjrm1j3NpMMbUP9czmxSfc4cO+p4tZ1yTFAyWNM uAEDLHAkXHfUUaEZPFeaoyTQ5FeqMO5nRwEIs= MIME-Version: 1.0 Received: by 10.236.185.4 with SMTP id t4mr14719644yhm.121.1316445162076; Mon, 19 Sep 2011 08:12:42 -0700 (PDT) Received: by 10.236.43.167 with HTTP; Mon, 19 Sep 2011 08:12:42 -0700 (PDT) Date: Mon, 19 Sep 2011 11:12:42 -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:37:39 -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.