From owner-freebsd-questions@FreeBSD.ORG Mon Sep 8 14:08:53 2014 Return-Path: <owner-freebsd-questions@FreeBSD.ORG> Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88C674EA for <freebsd-questions@freebsd.org>; Mon, 8 Sep 2014 14:08:53 +0000 (UTC) Received: from avasout08.plus.net (avasout08.plus.net [212.159.14.20]) by mx1.freebsd.org (Postfix) with ESMTP id 182DF11A0 for <freebsd-questions@freebsd.org>; Mon, 8 Sep 2014 14:08:52 +0000 (UTC) Received: from curlew.milibyte.co.uk ([84.92.153.232]) by avasout08 with smtp id oe8n1o003516WCc01e8qHM; Mon, 08 Sep 2014 15:08:50 +0100 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=fsVSZTIf c=1 sm=1 tr=0 a=lfSX4pPLp9EkufIcToJk/A==:117 a=lfSX4pPLp9EkufIcToJk/A==:17 a=D7rCoLxHAAAA:8 a=0Bzu9jTXAAAA:8 a=OOzCJWdBeL0A:10 a=0R8PxKIE1KYA:10 a=F0HPXGjtK9kA:10 a=ZTb9aqGL9YkA:10 a=8nJEP1OIZ-IA:10 a=6I5d2MoRAAAA:8 a=N96l0QHW3whUqaKtV6QA:9 a=wPNLvfGTeEIA:10 a=lzMc082ZMwYA:10 Received: from curlew.lan ([192.168.1.13]) by curlew.milibyte.co.uk with esmtp (Exim 4.84) (envelope-from <jmc-freebsd2@milibyte.co.uk>) id 1XQzcL-0000dr-Mg; Mon, 08 Sep 2014 15:08:47 +0100 From: Mike Clarke <jmc-freebsd2@milibyte.co.uk> To: freebsd-questions@freebsd.org Date: Mon, 08 Sep 2014 15:08:26 +0100 Message-ID: <3289227.doeQfn2zmQ@curlew.lan> User-Agent: KMail/4.12.5 (FreeBSD/9.3-RELEASE; KDE/4.12.5; amd64; ; ) In-Reply-To: <CA+tpaK0UpDCvBuMpnOkDXNfcnkuBfB-6tv2cMuyRjah5Z3xPRQ@mail.gmail.com> References: <3415139.ffIAe6AYm2@curlew.lan> <CA+tpaK0UpDCvBuMpnOkDXNfcnkuBfB-6tv2cMuyRjah5Z3xPRQ@mail.gmail.com> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 192.168.1.13 X-SA-Exim-Mail-From: jmc-freebsd2@milibyte.co.uk X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on curlew.lan X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 Subject: Re: TRIM considerations when repartitioning a SSD Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="iso-8859-1" X-SA-Exim-Version: 4.2 X-SA-Exim-Scanned: Yes (on curlew.milibyte.co.uk) Cc: Adam Vande More <amvandemore@gmail.com> X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions <freebsd-questions.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/> List-Post: <mailto:freebsd-questions@freebsd.org> List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 08 Sep 2014 14:08:53 -0000 On Thursday 28 Aug 2014 17:24:04 Adam Vande More wrote: > On Thu, Aug 28, 2014 at 4:54 PM, Mike Clarke > <jmc-freebsd2@milibyte.co.uk> > wrote: > > FreeBSD 9.3-RELEASE > > > > I may soon need to repartition a SSD which has a zpool on it and > > was wondering what is the best method of ensuring that all blocks > > get marked as no longer in use. > > > > Is gpart sufficiently TRIM aware to be able to just use gpart > > delete? > Extremely doubtful that it is. You generally must reset the drive > eg > > camcontrol security da4 -s buhbyesweetdata -e buhbyesweetdata I've tried this but it failed curlew:/root# uname -a FreeBSD curlew.lan 9.3-RELEASE FreeBSD 9.3-RELEASE #0 r268512: Thu Jul 10 23:44:39 UTC 2014 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 curlew:/root# camcontrol security ada0 -s buhbyesweetdata -e buhbyesweetdata pass1: <SanDisk SD6SB2M128G1022I X210400> ATA-8 SATA 3.x device pass1: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 512bytes) You are about to ERASE ALL DATA from the following device: pass1,ada0: <SanDisk SD6SB2M128G1022I X210400> ATA-8 SATA 3.x device Are you SURE you want to ERASE ALL DATA? (yes/no) yes Issuing SECURITY_SET_PASSWORD password='buhbyesweetdata', user='master', mode='high' Issuing SECURITY_ERASE_PREPARE Issuing SECURITY_ERASE_UNIT password='buhbyesweetdata', user='master' ata2: timeout waiting for write DRQ ata2: timeout waiting for write DRQ camcontrol: ATA SECURITY_ERASE_UNIT failed: 0 How do I get round this? -- Mike Clarke