From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: fstrim and SSDs and cron; was: Re: cron-service Date: Wed, 18 May 2016 07:21:18 +0200 Message-ID: <20160518072118.6039bd22@scratchpost.org> References: <20160430192744.1fbe081f@scratchpost.org> <871t5lc432.fsf@gnu.org> <20160517192857.0bab0560@scratchpost.org> <87zirotm2n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2tvD-0004yR-Mq for guix-devel@gnu.org; Wed, 18 May 2016 01:21:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2tv9-0007Ys-GF for guix-devel@gnu.org; Wed, 18 May 2016 01:21:26 -0400 In-Reply-To: <87zirotm2n.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?UTF-8?B?Q291cnTDqHM=?= Cc: guix-devel@gnu.org > I had never thought of it, but maybe it=E2=80=99s a good idea. How do ot= her > distros handle it? On they say: >Ubuntu 14.10 onwards: >In Ubuntu 14.10 and 15.04, TRIMming happens automatically every week on al= l SSDs supported by fstrim. >$ tail -n1 /etc/cron.weekly/fstrim=20 >/sbin/fstrim --all || true >Automatic TRIM (Deprecated, Slow): > [fstab...] >Encrypted Filesystems >The last step is not enough though. As long as LUKS is not aware that you = want to use TRIM it will effectively block all TRIM operations coming from = the LVM partition's file system, for security reasons. Add discard paramete= r to the cryptdevice options in /etc/crypttab to make LUKS accept the disca= rd behavior of the LVM partition. >sda5_crypt UUID=3De364d03f-[...]6cd7e none luks,discard More info about the latter: http://blog.neutrino.es/2013/howto-properly-activate-trim-for-your-ssd-on-l= inux-fstrim-lvm-and-dmcrypt/ Note that guix /gnu/store/8vg9124cgm8d36zsy9ldcw53b1vrfy2w-lvm2-2.02.109/et= c/lvm/lvm.conf explicitly disables (!) "discard".