SSD and gmirror

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

SSD and gmirror

Dmitry Zamaruyev
Hello list,

I'm looking for clarification regarding gmirror/geom behavior in
current 8-STABLE.
I want to use couple of SSD drives in mirror RAID configuration with
UFS on top. I know that UFS now supports TRIM (BIO_DELETE) on plain
disks.
But will gmirror propagate BIO_DELETE event to lower driver, so both
SSDs will get trimmed when UFS issue this command?

--
Best regards,
Dmitry Zamaruev
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: SSD and gmirror

Steven Hartland
Be aware that you need to be using ata or another driver which supports
this for it to work even on a standard disk.

----- Original Message -----
From: "Dmitry Zamaruyev"


> Hello list,
>
> I'm looking for clarification regarding gmirror/geom behavior in
> current 8-STABLE.
> I want to use couple of SSD drives in mirror RAID configuration with
> UFS on top. I know that UFS now supports TRIM (BIO_DELETE) on plain
> disks.
> But will gmirror propagate BIO_DELETE event to lower driver, so both
> SSDs will get trimmed when UFS issue this command?


================================================
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it.

In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
or return the E.mail to [hidden email].

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: SSD and gmirror

Dmitry Zamaruyev
SSD will be attached to Intel ESB2 chip, that using standard ata/ahci
drivers (I guess):

atapci1: <Intel 63XXESB2 SATA300 controller> port 0x18a0-0x18a7,0x1874-0x1877,0x1878-0x187f,0x1870-0x1873,0x1880-0x189f mem 0xd8500800-0xd8500bff irq 19 at device 31.2 on pci0
atapci1: AHCI called from vendor specific driver
atapci1: AHCI v1.10 controller with 6 3Gbps ports, PM supported


В Thu, 4 Aug 2011 11:33:01 +0100
"Steven Hartland" <[hidden email]> пишет:

> Be aware that you need to be using ata or another driver which
> supports this for it to work even on a standard disk.
>
> ----- Original Message -----
> From: "Dmitry Zamaruyev"
>
>
> > Hello list,
> >
> > I'm looking for clarification regarding gmirror/geom behavior in
> > current 8-STABLE.
> > I want to use couple of SSD drives in mirror RAID configuration with
> > UFS on top. I know that UFS now supports TRIM (BIO_DELETE) on plain
> > disks.
> > But will gmirror propagate BIO_DELETE event to lower driver, so both
> > SSDs will get trimmed when UFS issue this command?
>
>
> ================================================
> This e.mail is private and confidential between Multiplay (UK) Ltd.
> and the person or entity to whom it is addressed. In the event of
> misdirection, the recipient is prohibited from using, copying,
> printing or otherwise disseminating it or any information contained
> in it.
>
> In the event of misdirection, illegible or incomplete transmission
> please telephone +44 845 868 1337 or return the E.mail to
> [hidden email].
>



--
Best regards,
Dmitry Zamaruyev,
System administrator.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: SSD and gmirror

Dmitry Zamaruyev
In reply to this post by Dmitry Zamaruyev
Having troubles using gmirror device with TRIM.

Two SSDs on 8.2-STABLE, supports TRIM on device:

# camcontrol identify ada1
pass1: <OCZ-VERTEX2 1.33> ATA-8 SATA 2.x device
pass1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)

protocol              ATA/ATAPI-8 SATA 2.x
device model          OCZ-VERTEX2
...
data set management (TRIM)     yes

And if I create UFS directly on SSD with TRIM enabled all goes OK (-E
uses trim to erase SSD):

# newfs -U -E -t /dev/ada1
/dev/ada1: 57241.9MB (117231408 sectors) block size 16384, fragment
size 2048 using 312 cylinder groups of 183.72MB, 11758 blks, 23552
inodes. with soft updates
Erasing sectors [128...117231407]
super-block backups (for fsck -b #) at:
 160, 376416, .....

# mount -t ufs /dev/ada1 /mnt

But if I add device to gmirror, situation is different. Newfs passed
ok (so TRIM call propagated to devices?), but mount complaints:

# newfs -U -E -t /dev/mirror/gm0s1a
/dev/mirror/gm0s1a: 57239.9MB (117227312 sectors) block size 16384,
fragment size 2048 using 312 cylinder groups of 183.72MB, 11758 blks,
23552 inodes. with soft updates
Erasing sectors [128...117227311]
super-block backups (for fsck -b #) at:
 160, 376416, ........

# mount -t ufs /dev/mirror/gm0s1a /mnt
WARNING: /mnt: TRIM flag on fs but cannot get whether disk supports TRIM

If we look at UFS source, after such warning received - TRIM got
disabled at FS level:

ufs/ffs/ffs_vfsops.c:
  996         if ((fs->fs_flags & FS_TRIM) != 0) {
  997                 size = sizeof(int);
  998                 if (g_io_getattr("GEOM::candelete", cp, &size,
  999                     &ump->um_candelete) == 0) {
 1000                         if (!ump->um_candelete)
 1001                                 printf(
 1002 "WARNING: %s: TRIM flag on fs but disk does not support TRIM\n",
 1003                                     mp->mnt_stat.f_mntonname);
 1004                 } else {
 1005                         printf(
 1006 "WARNING: %s: TRIM flag on fs but cannot get whether disk supports TRIM\n",
 1007                             mp->mnt_stat.f_mntonname);
 1008                         ump->um_candelete = 0;
 1009                 }
 1010         }

How I could achieve that call g_io_getattr("GEOM::candelete"...) will return without
errors and stating that underlying disks support TRIM ?

В Thu, 4 Aug 2011 13:00:14 +0300
Dmitry Zamaruyev <[hidden email]> пишет:

> Hello list,
>
> I'm looking for clarification regarding gmirror/geom behavior in
> current 8-STABLE.
> I want to use couple of SSD drives in mirror RAID configuration with
> UFS on top. I know that UFS now supports TRIM (BIO_DELETE) on plain
> disks.
> But will gmirror propagate BIO_DELETE event to lower driver, so both
> SSDs will get trimmed when UFS issue this command?
>



--
Best regards,
Dmitry Zamaruyev,
System administrator.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "[hidden email]"