From owner-freebsd-stable@FreeBSD.ORG Sat Dec 27 15:27:49 2014 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F5F9FDD for ; Sat, 27 Dec 2014 15:27:49 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 01C4EFC3 for ; Sat, 27 Dec 2014 15:27:48 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id sBRFRlng070585 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 27 Dec 2014 08:27:47 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id sBRFRljQ070582; Sat, 27 Dec 2014 08:27:47 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Sat, 27 Dec 2014 08:27:47 -0700 (MST) From: Warren Block To: Dr Josef Karthauser Subject: Re: Creating a bootable ZFS disk? In-Reply-To: <1548B1FF-36E2-4AE4-ADD4-3B8872A9DF55@tao.org.uk> Message-ID: References: <1548B1FF-36E2-4AE4-ADD4-3B8872A9DF55@tao.org.uk> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Sat, 27 Dec 2014 08:27:47 -0700 (MST) Cc: stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2014 15:27:49 -0000 On Sat, 27 Dec 2014, Dr Josef Karthauser wrote: > I?m trying to create a new ZFS pool from an existing one (the new one is 4k aligned and the old one is legacy 512b). > > But, I can?t get it to boot! Not sure what I?m doing wrong. > > I thought I could create the new pool, and use ?zfs send/recv? to copy the existing pool and then boot onto the new disk, but the kernel doesn?t load? :(. > > Does anyone know what I?m doing wrong? > > Here?s my recipe: > > # gpart create -s gpt diskid/DISK-NEW-DISK > # gpart add -s 64K -t freebsd-boot diskid/DISK-NEW-DISK > # gpart add -t 8G freebsd-swap diskid/DISK-NEW-DISK > # gpart add -t freebsd-zfs diskid/DISK-NEW-DISK > # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 diskid/DISK-NEW-DISK Those partitions are probably not aligned to 4K. Add "-a4k" to the gpart add commands. (Remember that ashift is filesystem block size, not alignment.)