[DRBD-user] How to Trim ssd raid+ocfs2+drbd+dual primary?

trex seo at xsinc.co.kr
Fri Jan 10 09:55:47 CET 2014

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.

On Wed, Jan 08, 2014 at 09:56:19PM +0900, trex wrote:
>> I built HA iSCSI targets with ocfs2+dual primary.(Ubuntu 13.04)
>> Each node has SSD raid with mdadm level0.
>> few days later, ocfs2 became frozen sometimes.
>> I figured out that it happens without TRIM.
>> But, I couldn't TRIM ssd raid because ocfs2 only supports offline TRIM(fstrim) and drbd 8.4.4 only supports online TRIM(discard).

> Uhm, to the linux block layer (including DRBD), there is no difference
> between what you call "online" or "offline" here.  And whether you call
> it trim or discard or unmap, again, to the linux block layer, it is all
> the same thing.  The differences are implementation details in the low
> level hardware drivers (scsi, fusion, etc.)

> Did you actually try it?
> What happened?
> Error message?
> Logs?

> Are you sure your SSD *and* MD properly support and propagate the
> discard capabilities and requests?First, ocfs2 doesn't have discard mount option.It means you have to run FSTRIM for TRIM your ssd devices.And it actually works.Some other filesystems are supporting automatic TRIM with discard option.(ex. btrfs, ext4 )
Second, you cannot TRIM on DRBD devices with FSTRIM.There's a error message:"fitrim ioctl failed operation not supported"
Without DRBD, you can run FSTRIM on any filesystem.
So question is 'How trim filesystem on drbd which doesn't support discard mount option?'

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20140110/661adb47/attachment.htm>

More information about the drbd-user mailing list