From owner-freebsd-fs@freebsd.org Thu Mar 23 21:41:35 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 A43D2CA124C for ; Thu, 23 Mar 2017 21:41:35 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (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 3C4FC14B1 for ; Thu, 23 Mar 2017 21:41:35 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: by mail-wm0-x22d.google.com with SMTP id n11so7301017wma.0 for ; Thu, 23 Mar 2017 14:41:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=rOOvTFLETCDqt4HdeEJ8B9w4XN7XUe8WrytYHI2cKEE=; b=nynrAqVBYqT7AlpbwFbHeTVsOFjvkOtvg2dz/OrI1fifubZ+Q6iRJlFnYP3PCIaaci dhlhJfm/nFB/0S/aNeJgdoKwHyfyb8Qcdr900JEeqJSLlOAmqSmg/36sj1hlTBKSf8zS SKQ4P+C6dUJvMbqcfzABkL7gfuNOVPLVBS+tNwoUd9b9G9RhPDk71/Tvy+axSv2XMrpO oP837WoecS/h5hCPvYapHqtj7ATvRl7SlDnQRtIAj62f9zdlba4991VPtF80HScffzW1 tSWgg3CQhqcbDokBm6jfT83DaF0Y1+gs6lbX8+CZzr86AU8aZuTZifUTkkWfyqtWm1+g xfQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=rOOvTFLETCDqt4HdeEJ8B9w4XN7XUe8WrytYHI2cKEE=; b=LP/2Hb373dcFR+Fa8Nmiry7B2NRHLDMyuVxzRqRfD4mkztqUMyyYKm5hy/g/wnww71 dRseMYvNzZLAke3Ys+CKm1uonSUqENnKOxob60k2Jr7+6l1tEBllxJfNfclxW2+zXegg EnGEnSeLnQZPs2VeQNnaWCrb9YKTVRrjbPStq0z3JGDUNpQR6a19r8wPp6c3MUA4gKKw 5SmsZQCCetXmFzBck41fnJY+gd9dkIMsDUX7Yvg9NcyBnaA4TnjjLhSzABMFgu4PKNMO 4NCNrq0iq2tnjzmgNvW4NPS3FUW75E1Ry+C7gfjFOAT1y4GfbmUZJU0wsUB5kwRGrSNs dfKA== X-Gm-Message-State: AFeK/H2y1ZwUS3RnrGqlW0Tpb+wVdeGVZKdbqFwHwiWDR5nSCVcD1zDq5gRw61vN+b26iBw5 X-Received: by 10.28.186.70 with SMTP id k67mr4669194wmf.65.1490305289996; Thu, 23 Mar 2017 14:41:29 -0700 (PDT) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id u184sm313727wmb.29.2017.03.23.14.41.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Mar 2017 14:41:29 -0700 (PDT) Subject: Re: How to compile ZFS only ? To: freebsd-fs@freebsd.org References: <40633FF9-242F-48E1-8CE6-ADE4AC3C5C89@gmail.com> <4a7293c4-3a13-f865-bfb7-4d40581cfe3b@multiplay.co.uk> <34FDCEEF-99A8-4925-8BFA-BCB3CE0143D8@gmail.com> <063443FC-BD04-4CD1-911F-F62918D8B390@gmail.com> From: Steven Hartland Message-ID: <04ca6dc2-575b-dbc2-23aa-cb090049e482@multiplay.co.uk> Date: Thu, 23 Mar 2017 21:41:29 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <063443FC-BD04-4CD1-911F-F62918D8B390@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 21:41:35 -0000 When building are you building with -jXX where XX is the number of cores in your machine? If not then definitely do that on a dual E5 (24 cores) with our cut down kernel config (excludes devices / modules we never use) a full kernel build takes under 60 seconds. An example: make buildkernel KERNCONF=MULTIPLAY -j24 Regards Steve On 23/03/2017 19:22, Ben RUBSON wrote: > 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: >> >> 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"