From owner-freebsd-fs@freebsd.org Thu Mar 23 19:22:30 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 BFC6ACBB398 for ; Thu, 23 Mar 2017 19:22:30 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (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 60F5617F8 for ; Thu, 23 Mar 2017 19:22:30 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: by mail-wm0-x233.google.com with SMTP id n11so4737305wma.0 for ; Thu, 23 Mar 2017 12:22:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:references:to:in-reply-to; bh=vJcJO+o5vhyky7BeGc8zkB7cBqN1O9AhGjRWny0Mato=; b=jtmHZJ1fUzih6hQShujgPViHS4tiyISpZ2gH5BSv/KlpQRapVlmO4GBsPdRszNwVfL OIV8uurNDrY0T/f+0Vjc8ImKGY0Lx/VoCRSRGu9XmYPKtN259KbtBqEu9vG+uawvVgSP zf7NQGOqoZE5HG22FxYRH8ZgRO1mz3+6sDYILr1z0UUYo2kX/5JNk3SPQcwjZrQI+5e3 a1lmp+apKwvSoLN1sMRdZx/X7DCLbZZaEPtot5QkWWmuRzB4+o8ij+6x/yIOjsMbJR84 6y0CSP5Ih7ZJZVlGYxZmXszQzr398o8Q+bX01o6Ey5HJ+pGrmiEfZ8vUq/n5wVlwQVnv lXlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :references:to:in-reply-to; bh=vJcJO+o5vhyky7BeGc8zkB7cBqN1O9AhGjRWny0Mato=; b=H1JfpOr/KJi8mdqaGFregLAVx52frY492/eu4nxj5YiMy2jZYi+NoArIRXz8HGXknp zECICvM2byrIcWOyO9FItLFq581R+gpm6Sn9sePzulzbrAxsI6hgC7t/4eUM4i7J0aLe 1ApD07ozyJjrWxtwz1iZvvuiRRLkhHDP+rFdI4N4YT8mJ2y3dImDYFdpqaIr8vLYND/3 GtFO+9ZY5n4c+Pn4+zIO28Z2jumQX6mZg1P/D9BOYlWrms2ruFc4g9/ebkwwgbxWBMKe GW/JhApQuOBGqvEi15hxfs2jWIZq6/T5j9EsFGmlPobLSrYBifT6QLIrqPLAm95w+vpD 3VPw== X-Gm-Message-State: AFeK/H1OvAJtzJrcmPSZY1pjivnds9GJFXk+mQNLfpRKKPeClzBOLrQ/Cho7sQUqIBFiCw== X-Received: by 10.28.139.195 with SMTP id n186mr4719132wmd.139.1490296948228; Thu, 23 Mar 2017 12:22:28 -0700 (PDT) Received: from ben-1.home (LFbn-1-7159-4.w90-116.abo.wanadoo.fr. [90.116.90.4]) by smtp.gmail.com with ESMTPSA id q72sm3262855wrb.54.2017.03.23.12.22.27 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Mar 2017 12:22:27 -0700 (PDT) From: Ben RUBSON Message-Id: <063443FC-BD04-4CD1-911F-F62918D8B390@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: How to compile ZFS only ? Date: Thu, 23 Mar 2017 20:22:27 +0100 References: <40633FF9-242F-48E1-8CE6-ADE4AC3C5C89@gmail.com> <4a7293c4-3a13-f865-bfb7-4d40581cfe3b@multiplay.co.uk> <34FDCEEF-99A8-4925-8BFA-BCB3CE0143D8@gmail.com> To: Freebsd fs In-Reply-To: X-Mailer: Apple Mail (2.3124) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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 19:22:30 -0000 I'm not sure other modules are missing : my server correctly starts, I = then only overwrite ZFS module (/boot/kernel/zfs.ko), I think it should = then work. But server hangs during startup, certainly because module compiled = directly using make is different from the one built with make = buildkernel (which works). As says Xin below, some options from sys/*/conf/GENERIC may not be taken = into account with the quick make method... I'll try to give the faulty module a try on a non-zfs root machine. The -DNO_CLEAN method is interesting if src tree has not been cleaned = before :) (I always do a make clean to leave the tree cleaned ^^) So sounds like there is no solution but trying to speed-up a whole = kernel build. Thank you ! Ben > On 23 Mar 2017, at 00:51, Steven Hartland = wrote: >=20 > In addition to the main zfs module there are also dependency modules = which are required. >=20 > 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. >=20 > That said the method listed by Xin is the quickest and easiest = solution. >=20 > On Wed, 22 Mar 2017 at 22:43, Xin LI > wrote: > Why not just -DNO_CLEAN=3D with 'make buildkernel'? >=20 > 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). >=20 > 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=3DGENERIC > >>> # 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 = "