From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 14 15:38:06 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 845801065672; Sat, 14 Apr 2012 15:38:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 6AF428FC0A; Sat, 14 Apr 2012 15:38:04 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA01007; Sat, 14 Apr 2012 18:37:57 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SJ52z-0008Ut-FB; Sat, 14 Apr 2012 18:37:57 +0300 Message-ID: <4F8999D2.1080902@FreeBSD.org> Date: Sat, 14 Apr 2012 18:37:54 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120317 Thunderbird/10.0.3 MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org, freebsd-fs@FreeBSD.org X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=X-VIET-VPS Content-Transfer-Encoding: 7bit Cc: Subject: [review request] zfsboot/zfsloader: support accessing filesystems within a pool X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Apr 2012 15:38:06 -0000 I would like to ask for a review and/or testing of the following three patches: http://people.freebsd.org/~avg/zfsboot.patches.diff These patches add support for booting from an arbitrary filesystem of any detected ZFS pool. A filesystem could be selected in zfsboot and thus will affectfrom where zfsloader would be loaded. zfsboot passes information about the boot pool and filesystem to zfsloader, which uses those for loaddev and default value of currdev. A different pool+filesystem could be selected in zfsloader for booting kernel. Also if vfs.root.mountfrom is not explicitly set and is not derived from fstab, then it gets set to the selected boot filesystem. This should could be used as a foundation for the support of Solaris-like boot environment selection. I believe that other people have already developed scripts utilizing ZFS capabilities to provide other aspects of management of boot environments. I am particularly interested in reviews of my attempt to make ZFS boot support arch-independent. The arches, of course, would have to add some code to make use of that support. Currently I only enabled it for x86. Thank you very much! -- Andriy Gapon