From owner-freebsd-questions@FreeBSD.ORG Tue Feb 19 02:34:16 2013 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D4AC3A46 for ; Tue, 19 Feb 2013 02:34:16 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 9DC0F6B0 for ; Tue, 19 Feb 2013 02:34:16 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.17]) by ltcfislmsgpa03.fnfis.com (8.14.5/8.14.5) with ESMTP id r1J2Y2Dg013717 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 18 Feb 2013 20:34:02 -0600 Received: from LTCFISWMSGMB21.FNFIS.com ([10.132.99.23]) by LTCFISWMSGHT06.FNFIS.com ([10.132.206.17]) with mapi id 14.02.0309.002; Mon, 18 Feb 2013 20:34:01 -0600 From: "Teske, Devin" To: Fbsd8 , Polytropon Subject: RE: How to add zfs support to FreeBSD? Thread-Topic: How to add zfs support to FreeBSD? Thread-Index: AQHODh3l9GcWtM8phkiuPGHY+9FEzZiAjisAgAAx8gCAAAypgP//qEgD Date: Tue, 19 Feb 2013 02:34:01 +0000 Message-ID: <13CA24D6AB415D428143D44749F57D7201EAACAE@ltcfiswmsgmb21> References: <51229B47.4070605@a1poweruser.com> <5122A3BA.2000907@a1poweruser.com> <20130219015600.68050fb2.freebsd@edvax.de>, <5122D83F.6090107@a1poweruser.com> In-Reply-To: <5122D83F.6090107@a1poweruser.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.132.253.120] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.9.8327, 1.0.431, 0.0.0000 definitions=2013-02-18_05:2013-02-18,2013-02-18,1970-01-01 signatures=0 Cc: FreeBSD questions , "Teske, Devin" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2013 02:34:16 -0000 The tool for checking rc.conf(5) is my sysrc(8). It will eventually be part of base (it's already checked into HEAD at usr.s= bin/sysrc -- but not installed by default unless WITH_BSDCONFIG is enabled = when performing a build(7) or release(7) process). Currently, also available via ports in sysutils/sysrc I definitely recommend giving it a shot. There's essentially two ways to use it for your needs: 1. sysrc -n zfs_enable Returns YES for example. or... 2. For better performance, use the includes... #!/bin/sh . /usr/local/share/sysrc/sysrc.subr f_sysrc_get zfs_enable Returns YES for example. --=20 Devin ________________________________________ From: owner-freebsd-questions@freebsd.org [owner-freebsd-questions@freebsd.= org] on behalf of Fbsd8 [fbsd8@a1poweruser.com] Sent: Monday, February 18, 2013 5:41 PM To: Polytropon Cc: FreeBSD questions Subject: Re: How to add zfs support to FreeBSD? Polytropon wrote: > On Mon, 18 Feb 2013 16:57:14 -0500, Fbsd8 wrote: >> Fbsd8 wrote: >>> The handbook does not cover how to add zfs support. >>> >>> How is it done? >> >> Let me reword. If zfs is in the base system why does it not show up >> when I look for it this way? >> >> if config -x $( sysctl -n kern.bootfile ) | grep -q >> '^[[:space:]]*options[[:space:]]\{1,\}ZFS\>'; then >> echo "yes zfs is in the kernel" >> fi > > Without the ability to check this, I strongly assume that > if you enable ZFS as described in the Handbook, the module > /boot/kernel/zfs.ko (part of the default system) will be > loaded. That's why it won't show up in a sysctl query > aimed at the _kernel_ itself -- because it isn't in the > kernel. > > Also, "sysctl -n kern.bootfile" will return the actual > kernel file, /boot/kernel/kernel, which is a binary. If > the exact config list (from the kernel _configuration_ > file) is not plain-text part of that file, grep will not > find the text you're grepping for. > So the next question is there any sh script code I can use to check if zfs has been enabled by the rc.conf zfs_enable statement. I need to determine if zfs is enabled on the host. Thanks _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you.