From owner-freebsd-questions@FreeBSD.ORG Wed Jul 24 03:00:10 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7D19AB77 for ; Wed, 24 Jul 2013 03:00:10 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email2.allantgroup.com (email2.emsphone.com [199.67.51.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2F4A0238E for ; Wed, 24 Jul 2013 03:00:09 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [172.17.17.101]) by email2.allantgroup.com (8.14.5/8.14.5) with ESMTP id r6O2tmOX045332 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Jul 2013 21:55:48 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.7/8.14.6) with ESMTP id r6O2tl2B063107 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Jul 2013 21:55:47 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.7/8.14.7/Submit) id r6O2tlpC063106; Tue, 23 Jul 2013 21:55:47 -0500 (CDT) (envelope-from dan) Date: Tue, 23 Jul 2013 21:55:47 -0500 From: Dan Nelson To: aurfalien Subject: Re: TRIM and changing mount options Message-ID: <20130724025547.GC82464@dan.emsphone.com> References: <316706C7-F038-4110-BB36-8EDFF9DC6A6B@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <316706C7-F038-4110-BB36-8EDFF9DC6A6B@gmail.com> X-OS: FreeBSD 9.1-STABLE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97.8 at email2.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (email2.allantgroup.com [172.17.19.78]); Tue, 23 Jul 2013 21:55:48 -0500 (CDT) X-Spam-Status: No, score=-3.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on email2.allantgroup.com X-Scanned-By: MIMEDefang 2.73 Cc: FreeBSD Questions 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: Wed, 24 Jul 2013 03:00:10 -0000 In the last episode (Jul 23), aurfalien said: > I've some what blindly followed a how to on installing FreeBSD 9.1 on a > ZFS mirror. > > My typing is horrid so I simply ssh'd to a live CD env and pasted line by > line as per the how to found here; > > http://wp.strahlert.net/wordpress/zfs-2/installing-freebsd-9-1-using-root-on-zfs-and-gpt-disks/ > > All is well, no issues with replacing disks, testing failures etc... > > But seeing that my system drives are SSDs, I thought to perhaps add > noatime, etc... to avoid slow downs common in excessive SSD usage. > > However my fstab is only mounting swap partitions and I have no idea how > my file system is being mounted :) > > Also, I would like to use tunefs in finding if I have TRIM enabled as I > did load it via boot.conf > > I kinda feel like I'm willy nilly adding load lines w/o seeing if I > actually have the TRIM patch installed :) > > At any rate, could some one; > > a) Explain how I am loading my file system as I'm used to fstab? > b) How to run tunefs on my zroot > c) How to determine if I actually have the needed TRIM support in my kernel ZFS automatically opens pools that were previously imported ( this info is stored in /boot/zfs/zpool.cache ), and automatically mounts any filesystems that have a mountpoint specified, so fstab isn't needed. Tunefs is a UFS-only command, so it won't help you here. Most zfs properties can be set on the fly with the "zfs" command. You can disable atime on your ZFS filesytem with "zfs set atime=off zroot". All the filesystems created in zpool will inherit the value. I'm not sure if there's a way to query TRIM status on arbitrary geom providers, but you can see whether zfs successfully sent any TRIM requests by watching the output of "sysctl kstat.zfs.misc.zio_trim". If .zio_trim.success increments and .unsupported (or .failed) doesn't, then you know that it's working. -- Dan Nelson dnelson@allantgroup.com