From owner-freebsd-questions@FreeBSD.ORG Fri May 8 18:39:52 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53C7A879 for ; Fri, 8 May 2015 18:39:52 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C8F91051 for ; Fri, 8 May 2015 18:39:51 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id t48Idoah001495 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 8 May 2015 12:39:50 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id t48IdoJL001492; Fri, 8 May 2015 12:39:50 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Fri, 8 May 2015 12:39:50 -0600 (MDT) From: Warren Block To: Mike Tancsa cc: freebsd-questions Subject: Re: enabling TRIM on an existing UFS file system ? In-Reply-To: <554CCE55.9090307@sentex.net> Message-ID: References: <554CCE55.9090307@sentex.net> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Fri, 08 May 2015 12:39:50 -0600 (MDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2015 18:39:52 -0000 On Fri, 8 May 2015, Mike Tancsa wrote: > > I noticed TRIM was not enabled on an existing SSD drive, so I thought I would > shut the box to single usermode and enable it. > > # tunefs -t enable /dev/ada0p2 > # tunefs -p /dev/ada0p2 > tunefs: POSIX.1e ACLs: (-a) disabled > tunefs: NFSv4 ACLs: (-N) disabled > tunefs: MAC multilabel: (-l) disabled > tunefs: soft updates: (-n) enabled > tunefs: soft update journaling: (-j) enabled > tunefs: gjournal: (-J) disabled > tunefs: trim: (-t) enabled > tunefs: maximum blocks per file in a cylinder group: (-e) 4096 > tunefs: average file size: (-f) 16384 > tunefs: average number of files in a directory: (-s) 64 > tunefs: minimum percentage of free space: (-m) 8% > tunefs: space to hold for metadata blocks: (-k) 6408 > tunefs: optimization preference: (-o) time > tunefs: volume label: (-L) > # exit > > But once I boot up, it seems to be disabled again ? Right. Don't 'exit' there after changing a setting. Instead, 'shutdown -r now' and check it again. Once the setting has been changed, it will stick. (Something about the filesystem details not being reread, but I forget the exact details.)