From owner-freebsd-fs@freebsd.org Wed Mar 22 23:51:21 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 18197D1854D for ; Wed, 22 Mar 2017 23:51:21 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::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 DD691D89 for ; Wed, 22 Mar 2017 23:51:20 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-io0-x229.google.com with SMTP id z13so73561979iof.2 for ; Wed, 22 Mar 2017 16:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZDVW9vD8jp9ZMU44MM/H9GMS344uPsuldmmxwBgn2Ik=; b=1ydJ4IotFRyFlM7J7/D1UmuW1PKxHI0l7R2N7qcf+Fw6MxMBZBAicePNPjkoh47Pm8 A8lQoA6eUc/0PYivw0lesN6aU++uf/pqr3+Z64VGdqJrjSXhFc2N1skFKB9gBI2y7JvW pRAwJgRuilkWn0zajuWt5Js+qLGPJ9buLXCsOX8xwUoZfDcQF9lLHj+jmgsvikDQYvDm tJGOUDrxDsnHeFAMyD6e04LuCQ0id+3Cf5njepf9C1KFL6+KDBbuIHcfNFhUivLHUsL3 JNjFJAxVPRqtGBTXkkBcKPtJtHox3rjsTJNLY9ZgZ7OR41ud/dllD9TWJzA64YSzs2Q7 yd6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZDVW9vD8jp9ZMU44MM/H9GMS344uPsuldmmxwBgn2Ik=; b=BV+ADVGv44/mO0FyrD9HjUrGqJ43JrG082soIW6CENXJKGd9VrbOM1lvMHxPbcA+ni jyTcm8zId6lbRC64nwGk+UjosqZshkNAQthnM3gvjBdFu9sr5GHt1W9q9dpzS6WZj0A6 NdvWOfOFkPraduG7+oF2vqS4WmdMEI9xmAp/cbI/pYAmRspqnlcAEopeLU3m3fG1fKy9 ubjsmMZIFOOsZpq7Iwm5uidII6IX5yXmvYY4XfL+gBbGK9e085i/ay7OySjjoMMzVkHH MWF1xDqg6lbnf/f9E5ZtRNPDxePHqnGF9k+6uZbhB1Kzxi9d/lN+94xODyaYCTvFXHhk yWEw== X-Gm-Message-State: AFeK/H23hmL3AAM965pf6/8XENVC+U6W9hX50TIPotTkQdTv0a2xQBjIOp70tPXOl4vdN/XpPlshB1WOdWQd5P47 X-Received: by 10.107.59.22 with SMTP id i22mr70724ioa.177.1490226680113; Wed, 22 Mar 2017 16:51:20 -0700 (PDT) MIME-Version: 1.0 References: <40633FF9-242F-48E1-8CE6-ADE4AC3C5C89@gmail.com> <4a7293c4-3a13-f865-bfb7-4d40581cfe3b@multiplay.co.uk> <34FDCEEF-99A8-4925-8BFA-BCB3CE0143D8@gmail.com> In-Reply-To: From: Steven Hartland Date: Wed, 22 Mar 2017 23:51:09 +0000 Message-ID: Subject: Re: How to compile ZFS only ? To: Ben RUBSON , Xin LI Cc: 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: Wed, 22 Mar 2017 23:51:21 -0000 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" >