Date: Sat, 31 May 2014 02:43:06 +0200 From: Bernd Walter <ticso@cicely7.cicely.de> To: freebsd-arm@freebsd.org Cc: Bernd Walter <ticso@cicely7.cicely.de> Subject: TRIM on SD cards Message-ID: <20140531004306.GI26883@cicely7.cicely.de>
next in thread | raw e-mail | index | archive | help
It seems SD cards support a delete command, which FreeBSD supports with the mmcsd driver. newfs and tunefs support TRIM in that new filesystems are trim'ed and the filesystems automatically trim free'ed blocks. So far so good. On the practical side with SD based ARM you don't write filesystems directly via mmcsd. We either create an image, which id dd'ed onto SD or in some cases we use an USB SD drive. With dd the unused blocks are written as well, which effectively hurts by writing data. Is there some kind of dd, which actually don't write zero blocks, or even better does a trim call for them? Is there a tool to trim a filesystem after creation? Ok - even then there is the option to directly newfs on the SD card. But in any case I need to be able to issue trim requests to the card. It seems there is support in our da driver, but will it be transported to the USB reader and even if - how can I find out if my reader actually supports trim commands? A newfs -t -E with my older transcend multireader and a new class10 Intenso micro-SD issues no error. But is it save to assume the card actually got trim'ed? Trim is enabled on the filesystem, but not shown in mount list: [189]gw1# tunefs -t enable /dev/da0 tunefs: issue TRIM to the disk remains unchanged as enabled [190]gw1# mount /dev/da0 /mnt [191]gw1# mount | grep mnt /dev/da0 on /mnt (ufs, local, soft-updates) FreeBSD gw1.cicely.de 10.0-STABLE FreeBSD 10.0-STABLE #0: Thu Apr 17 11:47:45 CEST 2014 ticso@gw1.cicely.de:/usr/obj/home/builder/gw1/10/sys/GW1 i386 -- B.Walter <bernd@bwct.de> http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140531004306.GI26883>