From owner-freebsd-questions@freebsd.org Wed Oct 21 16:55:22 2015 Return-Path: Delivered-To: freebsd-questions@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 46621A1B2B6 for ; Wed, 21 Oct 2015 16:55:22 +0000 (UTC) (envelope-from brandon.wandersee@gmail.com) Received: from mail-io0-f172.google.com (mail-io0-f172.google.com [209.85.223.172]) (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 19E2A623 for ; Wed, 21 Oct 2015 16:55:21 +0000 (UTC) (envelope-from brandon.wandersee@gmail.com) Received: by ioll68 with SMTP id l68so64334978iol.3 for ; Wed, 21 Oct 2015 09:55:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; bh=7CGmRSqpLptlnbEQz7M1zFMqMWiQyx14LCsdRRJhPdw=; b=h+04rJuZo5f8NS18TE9+FxiFZRYbQpHQk8X8JhR96D2hjr54IIkjy7uJUE2DldxwlN cu+PvKQwBms3vOj58ttouu8vt+qH5U2Nm+RAXxOc5D/FjBJZzt0mb9a83+ZraP/Ca8uF WIK77VURzLW55gkNarPItH3m2+7G91oBAXxfku56eMh0Vc/mkEk0iFNS4Ez5VSGj/UC5 6Ix8k5y6LmM+yIMiN0XrXICZo6WomS7BiZ35f2D3t33A/1DdGY2uQcbxpW2PGWw3zef3 yCWxtZ3ncfcWjaAIBsFwy8yiKyjZhC3a9KrUT5fITF9eSZHXmfwtevikFKOisJsdINji 5f6Q== X-Received: by 10.107.34.149 with SMTP id i143mr12722214ioi.195.1445446515311; Wed, 21 Oct 2015 09:55:15 -0700 (PDT) Received: from WorkBox.Home.gmail.com (63-231-132-20.mpls.qwest.net. [63.231.132.20]) by smtp.gmail.com with ESMTPSA id j38sm4049177ioo.1.2015.10.21.09.55.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Oct 2015 09:55:14 -0700 (PDT) References: <867fmh12nq.fsf@WorkBox.Home> <86pp081glq.fsf@WorkBox.Home> From: Brandon J. Wandersee To: Adam Vande More Cc: krad , FreeBSD Questions Subject: Re: gjournal and TRIM: A safe combination? In-reply-to: Date: Wed, 21 Oct 2015 11:55:13 -0500 Message-ID: <86oafs17ri.fsf@WorkBox.Home> MIME-Version: 1.0 Content-Type: text/plain 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: Wed, 21 Oct 2015 16:55:22 -0000 Adam Vande More writes: > There is a fundamental difference between them. Don't you think you should > investigate the differences prior to deciding what to use? I did. What I found was that apparently more people dislike SUJ than like it, SUJ is virtually undocumented, and it is not intended to protect data on a filesystem but merely shorten boot times after a crash.The most recent information on gjournal outside the man page are the Handbook and a years-old article that makes no mention of SSDs.[1] Since I've seen nothing but complaints about SUJ, and SUJ isn't well-documented, and SUJ apparently isn't intended to do what I'd like journaling to do, and gjournal *is* reasonably well-documented and does what I want, I went with gjournal. > It's not at clear what your goal is here. Do you want to minimize writes > to the ssd or do you want to ensure the fs is always consistent from both a > meta-data and data perspective. These options are mutually exclusive in > the parameters you've laid out. My goal is to format a disk partition and stick data on it. If possible, I'd like to protect that data with something more than just backups. Journaling is the way that's done. The one thing that is *not* documented is whether gjournal will play nice with TRIM (which has absolutely nothing to do with minimizing writes--a practice that's outdated at this point). I've no idea whether TRIM and filesystem journaling via gjournal are mutually exclusive; that's what I'm here to find out. There's no documentation on the matter. The four scenarios I laid out are simply the four possible combinations of TRIM and journaling (use either, use neither, use both). I simply got a warning message and want to know if that warning message carries any weight. I want to know if using journaling with UFS on a TRIM-enabled filesystem is potentially dangerous (as the warning implies), or if the inability of the system to detect TRIM when gjournal is enabled means that gjournal actually interferes with the TRIM operation. If the combination of TRIM and gjournal--a combination intended to preserve both data integrity and disk performance--can actually cause more potential harm than good, then protecting data would entail disabling TRIM while gjournal is enabled. On the other hand, if TRIM is disabled then that means that performance on the disk will gradually degrade, meaning that, journaling or no journaling, I'll need to periodically wipe the filesystem and restore a backup in order to restore performance. In short, if gjournal interferes with TRIM in any way, or if TRIM becomes potentially dangerous when used in conjunction with gjournal, it's a no-win scenario. The ultimate result is effectively the same: remake the filesystem and restore the data. I get the feeling that I'm the first person to ever bring this up. There are no current or previous bug reports on the matter. If a bug report is warranted, I'll file one. [1]: https://www.freebsd.org/doc/en_US.ISO8859-1/articles/gjournal-desktop/index.html -- ================================================================= :: Brandon Wandersee :: :: brandon.wandersee@gmail.com :: ================================================================== 'A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.' - Douglas Adams ==================================================================