<div style="font-size:10pt; font-family:Gulim;"><br><p style="font-size:10pt;FONT-FAMILY: Gulim,AppleGothic,sans-serif;padding:0 0 0 10pt"><span>-----Original Message-----</span><br><b>From:</b> "trex"<seo@xsinc.co.kr> <br><b>To:</b> "Lars Ellenberg"<lars.ellenberg@linbit.com>; <br><b>Cc:</b> <br><b>Sent:</b> 2014-01-11 (토) 00:47:47<br><b>Subject:</b> Re: [DRBD-user] How to Trim ssd raid+ocfs2+drbd+dual primary?<br> </p><div style="font-size:10pt; font-family:Gulim;"><p>I was surprised when you said it works.</p><p>so i re-created drbd enviroments and tested it.</p><p style="font-size: 10pt;"> </p><p style="font-size: 10pt;">Ubuntu 13.04 (3.8.0-19-generic)</p><p style="font-size: 10pt;">DRBD 8.4.3</p><p style="font-size: 10pt;"> </p><p style="font-size: 10pt;">/etc/drbd.d/disk.res</p><p style="font-size: 10pt;"> </p><p>resource store {</p><p>protocol C;</p><p>startup {</p><p> wfc-timeout 20;</p><p> degr-wfc-timeout 10;</p><p>}</p><p> </p><p> disk {</p><p> fencing dont-care;</p><p> </p><p> }</p><p> </p><p> on node1 {</p><p> device /dev/drbd0;</p><p> disk /dev/sda;</p><p> meta-disk internal;</p><p> address 192.168.0.11:7789;</p><p> }</p><p> </p><p> on node2 {</p><p> device /dev/drbd0;</p><p> disk /dev/sda;</p><p> meta-disk internal;</p><p> address 192.168.0.12:7789;</p><p> }</p><p> </p><p>}</p><div>------------------------------------------------</div><div>I formatted /dev/drbd0 with ext4 and mount it on /store.</div><div>fstrim -v /store</div><div> </div><div><div>fstrim: /store: FITRIM ioctl failed: Operation not supported</div></div><div> </div><div> </div><div> </div><div> </div><div> </div><div>It still doesn't work.</div><div>What's your configuration?</div><div> </div><div> </div><div> </div><p style="font-size: 10pt;"> </p><p style="font-size: 10pt;"> </p><p style="font-size: 10pt;"> </p><p style="font-size:10pt;FONT-FAMILY: Gulim,AppleGothic,sans-serif;padding:0 0 0 10pt"> </p><div align="justify" style="text-align: justify;"><span style="font-size: 10pt; line-height: 1.5;">-----Original Message-----</span></div><b>From:</b> "Lars Ellenberg"<lars.ellenberg@linbit.com> <br><b>To:</b> <drbd-user@lists.linbit.com>; <br><b>Cc:</b> <br><b>Sent:</b> 2014-01-10 (금) 18:46:53<br><b>Subject:</b> Re: [DRBD-user] How to Trim ssd raid+ocfs2+drbd+dual primary?<br><br>On Fri, Jan 10, 2014 at 05:55:47PM +0900, trex wrote:<br>> On Wed, Jan 08, 2014 at 09:56:19PM +0900, trex wrote:<br>> >> I built HA iSCSI targets with ocfs2+dual primary.(Ubuntu 13.04)<br>> >> Each node has SSD raid with mdadm level0.<br>> >> few days later, ocfs2 became frozen sometimes.<br>> >> I figured out that it happens without TRIM.<br>> >> But, I couldn't TRIM ssd raid because ocfs2 only supports offline TRIM(fstrim) and drbd 8.4.4 only supports online TRIM(discard).<br>> >> Then, HOW CAN I TRIM SSDs on DRBD+OCFS2?<br>> <br>> > Uhm, to the linux block layer (including DRBD), there is no difference<br>> > between what you call "online" or "offline" here. And whether you call<br>> > it trim or discard or unmap, again, to the linux block layer, it is all<br>> > the same thing. The differences are implementation details in the low<br>> > level hardware drivers (scsi, fusion, etc.)<br>> <br>> > Did you actually try it?<br>> > What happened?<br>> > Error message?<br>> > Logs?<br>> <br>> > Are you sure your SSD *and* MD properly support and propagate the<br>> > discard capabilities and requests?<br>><br>> First, ocfs2 doesn't have discard mount option.<br>> It means you have to run FSTRIM for TRIM your ssd devices.<br>> And it actually works.Some other filesystems are supporting automatic TRIM with discard option.(ex. btrfs, ext4 )<br><br>Still, the IO requests generated by whatever you use to do that<br>are the same on the linux block level.<br><br>> Second, you cannot TRIM on DRBD devices with FSTRIM.<br><br>Yes I can.<br><br>> There's a error message:"fitrim ioctl failed operation not supported"<br>> Without DRBD, you can run FSTRIM on any filesystem.<br>> So question is 'How trim filesystem on drbd which doesn't support discard mount option?'<br><br>use fstrim ;-)<br><br>Admittedly, this was not an ocfs2, I just did not have one handy.<br>Still, it proves that fstrim works on top of DRBD.<br><br>mount /dev/drbd0 /mnt/something<br>fstrim -v /mnt/something<br>/mnt/something: 1038696448 bytes were trimmed<br><br>So if that does not work for you, something else is wrong.<br><br>-- <br>: Lars Ellenberg<br>: LINBIT | Your Way to High Availability<br>: DRBD/HA support and consulting <a href="http://www.linbit.com" target="_blank">http://www.linbit.com</a><br><br>DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.<br>__<br>please don't Cc me, but send to list -- I'm subscribed<br>_______________________________________________<br>drbd-user mailing list<br>drbd-user@lists.linbit.com<br><a href="http://lists.linbit.com/mailman/listinfo/drbd-user" target="_blank">http://lists.linbit.com/mailman/listinfo/drbd-user</a><br><br><br><p> </p></div>
</div>
<table style="display:none"><tr><td><img src="http://mail.naver.com/readReceipt/notify/?img=1Q%2BdbzkrWrwoFrMYarlTKxMXpxuqp4ulaxuZazKXMxgZFxMqpAC0FoJvM6kgMX%2B0MogZ74lR74lcWNFlbX30WLloWrdQar3ZM4tR%2BBF0bvIn1BFdbZln16lS1Bt5MreR.gif" border="0"></td></tr></table>