From owner-freebsd-questions@FreeBSD.ORG Wed Jun 17 14:32:21 2015 Return-Path: Delivered-To: freebsd-questions@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74025DB8 for ; Wed, 17 Jun 2015 14:32:21 +0000 (UTC) (envelope-from paul@kraus-haus.org) Received: from mail-qc0-f180.google.com (mail-qc0-f180.google.com [209.85.216.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3847E83D for ; Wed, 17 Jun 2015 14:32:20 +0000 (UTC) (envelope-from paul@kraus-haus.org) Received: by qcej3 with SMTP id j3so14042468qce.3 for ; Wed, 17 Jun 2015 07:32:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:content-transfer-encoding:date :subject:to:message-id:mime-version; bh=d1RsDcVjBamDqSV78Kt0JqxwSKklpF8sQV4+Um1RWYE=; b=CR1Fgr54PTCa5jwngmGyI7vUuArN8SWgssnlwGgiHj61YY7ttm2eW3CNheCfZaYD5U XmruDqQ0saqMcVSbQ0CCw0gGmQ2ZL8Ptiy96gJjFHXRBsWtqJMJmXhhPQkkrR5bxob38 e3W2nSGF9XUU9ENa5I2d4EGVvXVOHGQRi4Qj3tGMxUNN66qa+a6/2NALMmhlatTrdN5B gxebhJz9MXlKXyjn9UfnKF3k7dZoH9vvOKf5aJ1rmoeBfdZBMdoWm+tQjjNAed086P4m zY9HEVT9bw7mZufAHOcD1kVbRaJ0Pq4hX5mCXwxHKaZmXXjC0Z06wY7v2JN6TS0NqpuP lU7Q== X-Gm-Message-State: ALoCoQnD7B+wWjBOPZZW7V6SashEZ+LzlFzy/jFrOKxH69rwC8pcE4Da2H6oEMDNrnz0bLotN/a9 X-Received: by 10.140.192.1 with SMTP id n1mr8571155qha.3.1434551534526; Wed, 17 Jun 2015 07:32:14 -0700 (PDT) Received: from mbp-1.thecreativeadvantage.com (mail.thecreativeadvantage.com. [96.236.20.34]) by mx.google.com with ESMTPSA id f137sm2211106qhc.41.2015.06.17.07.32.13 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Jun 2015 07:32:13 -0700 (PDT) From: Paul Kraus Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Wed, 17 Jun 2015 10:32:11 -0400 Subject: ZFS booting from MBR Question To: FreeBSD Questions Message-Id: <5718BB29-A9E3-4551-807E-FB9575C1EA04@kraus-haus.org> Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) X-Mailer: Apple Mail (2.1878.6) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2015 14:32:21 -0000 I have an older system that did not want to boot from ZFS/GPT, so I = installed it ZFS/MBR and it boots and runs fine, with one small = exception. It is configured as a 4-way mirror (for read performance) but = when the system boots it is clear that all of the parts of the boot = loader are only installed on ONE of the four drives. I can watch it try = to boot from each of the four drives and only succeeded from one of = them. This is running 10.1 and I installed via bsdinstall and the = ZFS-on-root option changing partition type from the ZFS Configuration = screen. The error echoes to the console and confers not being able to = find a zfs label, but zdb -l shows all 4 copies of the label intact on = both part ions with zpools on them (bootpool and rootpool, yes, I use = root pool instead of the FreeBSD default because I started with ZFS = under Solaris in 2006 or so). I have not been able to find any documentation for how to write all the = components of the boot loader for ZFS/MBR manually. Does someone here = know what bsdinstall is doing under the covers ? I am assuming the issue is the phase 1 boot loader on adas1 = partition, but am not sure how to write that correctly, and I am afraid = of overwriting the one good one I have. Relevant info below root@m2:/dev # gpart show ada0 =3D> 63 976773105 ada0 MBR (466G) 63 976773105 1 freebsd [active] (466G) root@m2:/dev # gpart show ada0s1 =3D> 0 976773105 ada0s1 BSD (466G) 0 4194304 1 freebsd-zfs (2.0G) 4194304 4194304 2 freebsd-swap (2.0G) 8388608 968384497 4 freebsd-zfs (462G) root@m2:/dev # zpool status pool: bootpool state: ONLINE scan: scrub repaired 0 in 0h1m with 0 errors on Wed Jun 10 03:07:15 = 2015 config: NAME STATE READ WRITE CKSUM bootpool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ada0s1a ONLINE 0 0 0 ada1s1a ONLINE 0 0 0 ada2s1a ONLINE 0 0 0 ada3s1a ONLINE 0 0 0 errors: No known data errors pool: rootpool state: ONLINE scan: scrub repaired 0 in 1h53m with 0 errors on Wed Jun 10 05:00:12 = 2015 config: NAME STATE READ WRITE CKSUM rootpool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ada0s1d ONLINE 0 0 0 ada1s1d ONLINE 0 0 0 ada2s1d ONLINE 0 0 0 ada3s1d ONLINE 0 0 0 errors: No known data errors root@m2:/dev # zfs list NAME USED AVAIL REFER MOUNTPOINT bootpool 502M 1.43G 501M /bootpool rootpool 209G 237G 19K none rootpool/ROOT 6.33G 237G 19K none rootpool/ROOT/20150603 1K 237G 3.52G / rootpool/ROOT/default 6.33G 237G 817M / rootpool/software 3.63G 237G 3.63G /software rootpool/tmp 104K 237G 104K /tmp rootpool/usr 4.29G 237G 19K /usr rootpool/usr/home 28K 237G 19K /usr/home rootpool/usr/ports 3.94G 237G 3.00G /usr/ports rootpool/usr/src 359M 237G 359M /usr/src rootpool/var 194G 237G 19K /var rootpool/var/crash 19K 237G 19K /var/crash rootpool/var/log 42.4M 237G 400K /var/log rootpool/var/mail 194G 237G 190G /var/mail rootpool/var/spool 1.62M 237G 798K /var/spool rootpool/var/tmp 19K 237G 19K /var/tmp root@m2:/dev #=20 -- Paul Kraus paul@kraus-haus.org