From owner-freebsd-fs@FreeBSD.ORG Mon Sep 2 09:18:24 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7E520C37 for ; Mon, 2 Sep 2013 09:18:24 +0000 (UTC) (envelope-from maurizio.vairani@cloverinformatica.it) Received: from smtpdg12.aruba.it (smtpdg7.aruba.it [62.149.158.237]) by mx1.freebsd.org (Postfix) with ESMTP id 748912B05 for ; Mon, 2 Sep 2013 09:18:22 +0000 (UTC) Received: from cloverinformatica.it ([188.10.129.202]) by smtpcmd04.ad.aruba.it with bizsmtp id L9JA1m00a4N8xN4019JBNL; Mon, 02 Sep 2013 11:18:13 +0200 Received: from [192.168.0.81] (ASUS-TERMINATOR [192.168.0.81]) by cloverinformatica.it (Postfix) with ESMTP id D9E0117EDD; Mon, 2 Sep 2013 11:18:10 +0200 (CEST) Message-ID: <522457D2.1070304@cloverinformatica.it> Date: Mon, 02 Sep 2013 11:18:10 +0200 From: Maurizio Vairani User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Andriy Gapon Subject: Re: Boot problem if a ZFS log device is missing References: <521F05F0.4090607@cloverinformatica.it> <521F0DEB.20408@FreeBSD.org> <522075D6.70600@FreeBSD.org> <52207800.2060901@FreeBSD.org> In-Reply-To: <52207800.2060901@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org, freebsd-stable@FreeBSD.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 09:18:24 -0000 On 30/08/2013 12.46, Andriy Gapon wrote: > on 30/08/2013 13:37 Andriy Gapon said the following: >> on 30/08/2013 00:38 Charles Sprickman said the following: >>> If one is willing to accept that data is lost (like the log device is totally smoked), is there a way to boot knowing that you may have some data loss, or is the only option to boot alternate media and force a pool import (assuming that works without the log device)? >> I think it's the latter. I am not aware of any way to select a behavior similar >> to import -m or import -F during boot. >> Perhaps... ZFS_IMPORT_MISSING_LOG should be a default behavior for a root pool >> or maybe the behavior could be controllable by a tunable. >> > Maurizio, > > you might want to try the following patch as an interim solution for your > environment: > > --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c > +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c > @@ -4112,6 +4112,7 @@ spa_import_rootpool(const char *name) > } > spa->spa_is_root = B_TRUE; > spa->spa_import_flags = ZFS_IMPORT_VERBATIM; > + spa->spa_import_flags |= ZFS_IMPORT_MISSING_LOG; /* XXX make tunable */ > > /* > * Build up a vdev tree based on the boot device's label config. > > HI all, unfortunately the patch don't works. The laptop returns the same error message: "Mounting from zfs:tank0 failed with error 6" and the same "mountroot>" prompt. I am available for further testing if needs. Thanks anyway, Maurizio