Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Sep 2014 15:08:26 +0100
From:      Mike Clarke <jmc-freebsd2@milibyte.co.uk>
To:        freebsd-questions@freebsd.org
Cc:        Adam Vande More <amvandemore@gmail.com>
Subject:   Re: TRIM considerations when repartitioning a SSD
Message-ID:  <3289227.doeQfn2zmQ@curlew.lan>
In-Reply-To: <CA%2BtpaK0UpDCvBuMpnOkDXNfcnkuBfB-6tv2cMuyRjah5Z3xPRQ@mail.gmail.com>
References:  <3415139.ffIAe6AYm2@curlew.lan> <CA%2BtpaK0UpDCvBuMpnOkDXNfcnkuBfB-6tv2cMuyRjah5Z3xPRQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3289227.doeQfn2zmQ>