From owner-freebsd-fs@freebsd.org Thu Mar 23 13:02:41 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30CCED18511 for ; Thu, 23 Mar 2017 13:02:41 +0000 (UTC) (envelope-from kraduk@gmail.com) Received: from mail-qk0-x229.google.com (mail-qk0-x229.google.com [IPv6:2607:f8b0:400d:c09::229]) (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 DD6A416BB for ; Thu, 23 Mar 2017 13:02:40 +0000 (UTC) (envelope-from kraduk@gmail.com) Received: by mail-qk0-x229.google.com with SMTP id p64so179028504qke.1 for ; Thu, 23 Mar 2017 06:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=y5ukTX3TT6RfdE01dP7DZ+alODy615M0pRf8igMr41A=; b=NB3fpuHNMU9h5ZrOBJaIf7xQw6CnA/yCeryB4jkPxCl5kU333SCSQVh+ceRV8179x5 ScJEZUWQym+yL0/oXs3S1GjBX7xdjDi0RgW0mY3E13gVLOeHTQt7/gvISebJXqtBU3X+ Yvq+wzMB9xkO7l3mUIOpzUEEccsiSo+r7fnTLNiOISZ/+HILKoVmc0Jo2dtqqKL7pkUX wmXP/NzfRLFV3zm5VwfhAufHIoKeOAa9wTNtuw8/QelcZt4lzBt8wDK/kpR8cMCmjqyM 9h3qzegiLRfdWs4fcVPlB9zoS/kot4viGDsbxemzvVbH4rzD//oZa4zWS4IGOZCQRbaM bvZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=y5ukTX3TT6RfdE01dP7DZ+alODy615M0pRf8igMr41A=; b=kSuyIA/U3VSSUEkIh1uR67Ns1zBIw5Dnp6YfpXO0622MDH2KAbvry99kliGp4Vr5pu FpPLTzIuAGt9yJWv1Xj44eJejcE+DOykvuBx23pQrTYTBARins/Lxt1zrgS5y28yHIC2 vJUPU1C4Mlg/yrCfQcdp6rEo4mz+LIFloaODg2RSbo4npCwnJgnrDtTqQbXytHjqpCoS H+JjaCZNwTDZuhELr0ewV+4cngX1qp/jMtk90nWahvhX6WHmJFCrP1RnoeEDFHFaFC12 O+hZpsUhTsRMKqJJIsDBCuNj3B/cHAyQ28PJ+hCBfB5vmPMBs7kxKzU/V54G6TgFReNS qhMw== X-Gm-Message-State: AFeK/H1455OEAbzPX+UdUnk4F9uj2m2do17UR6gVfa5pMXG9IbwRGer9a3YHnK0+djxCi0Ki/LRnse+Cp/PZ8w== X-Received: by 10.55.20.217 with SMTP id 86mr1895759qku.35.1490274159868; Thu, 23 Mar 2017 06:02:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.180.6 with HTTP; Thu, 23 Mar 2017 06:02:39 -0700 (PDT) In-Reply-To: References: <40633FF9-242F-48E1-8CE6-ADE4AC3C5C89@gmail.com> <4a7293c4-3a13-f865-bfb7-4d40581cfe3b@multiplay.co.uk> <34FDCEEF-99A8-4925-8BFA-BCB3CE0143D8@gmail.com> From: krad Date: Thu, 23 Mar 2017 13:02:39 +0000 Message-ID: Subject: Re: How to compile ZFS only ? To: Steven Hartland Cc: Ben RUBSON , Xin LI , Freebsd fs Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Mar 2017 13:02:41 -0000 It wont help this time but you could try enabling meta mode on you builds, this will make things generally much quicker, and there is no messing around in the tree, just do a buildkernel # cat /etc/src-env.conf WITH_META_MODE=yes also try these in your src.conf WITH_FAST_DEPEND=yes WITH_CCACHE_BUILD=yes WITH_SYSTEM_COMPILER=yes On 22 March 2017 at 23:51, Steven Hartland wrote: > In addition to the main zfs module there are also dependency modules which > are required. > > If you're able to test loading the module on a non-zfs root machine by > manually loading it, it should detail any issues in /var/log/messages. > > That said the method listed by Xin is the quickest and easiest solution. > > On Wed, 22 Mar 2017 at 22:43, Xin LI wrote: > > > Why not just -DNO_CLEAN= with 'make buildkernel'? > > > > But to answer your question, 'make buildkernel' will take e.g. > > 'KERNCONF' aka kernel build configuration into account, while if you > > do make directly, it's not (and sometimes build options in the kernel > > build configuration, like WITNESS, etc., have material impact to data > > structure layouts). > > > > On Wed, Mar 22, 2017 at 2:47 PM, Ben RUBSON > wrote: > > > Thank you for your answer Steven. > > > Unfortunately it did not help, same behaviour : > > > Module with you method has the same smaller size, 2323000 bytes vs > > 2500544. > > > (I then did not try to boot with it) > > > > > > Ben > > > > > >> On 22 Mar 2017, at 22:09, Steven Hartland > > wrote: > > >> > > >> cd /usr/src > > >> make buildenv > > >> cd sys/modules/zfs/ > > >> make > > >> make install > > >> > > >> On 22/03/2017 20:57, Ben RUBSON wrote: > > >>> Hi, > > >>> > > >>> I'm trying to rebuild ZFS (with some patches) without having to > > rebuild whole kernel. > > >>> > > >>> What I then try : > > >>> # cd /usr/src/sys/modules/zfs/ > > >>> # make > > >>> # cp zfs.ko /boot/kernel/ #to replace current zfs module > > >>> > > >>> But then server does not reboot properly (/ is on ZFS). > > >>> > > >>> If I do : > > >>> # cd /usr/src/ > > >>> # make buildkernel KERNCONF=GENERIC > > >>> # cp > > /usr/obj/usr/src/sys/GENERIC/modules/usr/src/sys/modules/zfs/zfs.ko > > /boot/kernel/ > > >>> > > >>> Then server correctly reboot. > > >>> > > >>> I clearly see that zfs.ko in method 1 is slightly smaller that in > > method 2. > > >>> > > >>> Am I missing something ? (of course yes, but what ? :) > > >>> > > >>> Many thanks ! > > >>> > > >>> Best regards, > > >>> > > >>> Ben > > >>> > > >>> _______________________________________________ > > >>> freebsd-fs@freebsd.org mailing list > > >>> https://lists.freebsd.org/mailman/listinfo/freebsd-fs > > >>> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org > " > > >> > > >> _______________________________________________ > > >> freebsd-fs@freebsd.org mailing list > > >> https://lists.freebsd.org/mailman/listinfo/freebsd-fs > > >> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > > > > > > _______________________________________________ > > > freebsd-fs@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/freebsd-fs > > > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > > _______________________________________________ > > freebsd-fs@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-fs > > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > > > _______________________________________________ > freebsd-fs@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" >