Is TRIM working with gmirror?

Miroslav Lachman 000.fbsd at quip.cz
Tue Jan 7 00:38:59 UTC 2014


Steven Hartland wrote:
[...]
> Delete's are only support by CAM currently so if your device is
> not connected to a CAM based driver e.g. daX or adaX then its
> likely not getting through to the device.

It was mentioned in an original message:

mirror/gm1ssdp2  COMPLETE  ada2p2 (ACTIVE)
                            ada3p2 (ACTIVE)

So disks are using CAM (devices ada2 + ada3, with ahci_load="YES" in 
loader.conf)

# camcontrol devlist
..
..
<Samsung SSD 840 PRO Series DXM05B0Q>  at scbus2 target 0 lun 0 (pass2,ada2)
<Samsung SSD 840 PRO Series DXM05B0Q>  at scbus3 target 0 lun 0 (pass3,ada3)

> Not sure if this has been mentioned but you also need to have
> filesystem support, as your talking about gmirror I assume your
> using UFS which would need to be TRIM enabled using tunefs -t enable,
> see man tunefs for more info.

Gmirror and FS was created on testmachine with FreeBSD 9.2 with 
following commands:


     gmirror label -v -b load gm1ssdp2 ada2p2 ada3p2

     newfs -U -L Rtzt0ssddb -t mirror/gm1ssdp2

And as WARNING message says, FS is flagged with TRIM support enabled:

--------------
WARNING: /ssd_db: TRIM flag on fs but disk does not confirm that it 
supports TRIM
--------------


Thank you for your time anyway.

Miroslav Lachman


More information about the freebsd-geom mailing list