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

trex seo at xsinc.co.kr
Mon Jan 13 03:17:30 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.


-----Original Message-----
From: "trex"<seo at xsinc.co.kr> 
To: "Lars Ellenberg"<lars.ellenberg at linbit.com>; 
Cc: 
Sent: 2014-01-11 (토) 00:47:47
Subject: Re: [DRBD-user] How to Trim ssd raid+ocfs2+drbd+dual primary?
 
I was surprised when you said it works.
so i re-created drbd enviroments and tested it.
 
Ubuntu 13.04 (3.8.0-19-generic)
DRBD 8.4.3
 
/etc/drbd.d/disk.res
 
resource store {
protocol C;
startup {
            wfc-timeout 20;
            degr-wfc-timeout 10;
}
 
 disk {
            fencing dont-care;
 
        }
 
  on node1 {
            device /dev/drbd0;
            disk /dev/sda;
            meta-disk internal;
            address 192.168.0.11:7789;
  }
 
  on node2 {
            device /dev/drbd0;
            disk /dev/sda;
            meta-disk internal;
            address 192.168.0.12:7789;
  }
 
}
------------------------------------------------I formatted /dev/drbd0 with ext4 and mount it on /store.fstrim -v /store fstrim: /store: FITRIM ioctl failed: Operation not supported     It still doesn't work.What's your configuration?    
 
 
 
-----Original Message-----From: "Lars Ellenberg"<lars.ellenberg at linbit.com> 
To: <drbd-user at lists.linbit.com>; 
Cc: 
Sent: 2014-01-10 (금) 18:46:53
Subject: Re: [DRBD-user] How to Trim ssd raid+ocfs2+drbd+dual primary?

On Fri, Jan 10, 2014 at 05:55:47PM +0900, trex wrote:
> 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).
> >> Then, HOW CAN I TRIM SSDs on DRBD+OCFS2?
> 
> > 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 )

Still, the IO requests generated by whatever you use to do that
are the same on the linux block level.

> Second, you cannot TRIM on DRBD devices with FSTRIM.

Yes I can.

> 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?'

use fstrim ;-)

Admittedly, this was not an ocfs2, I just did not have one handy.
Still, it proves that fstrim works on top of DRBD.

mount /dev/drbd0 /mnt/something
fstrim -v /mnt/something
/mnt/something: 1038696448 bytes were trimmed

So if that does not work for you, something else is wrong.

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
__
please don't Cc me, but send to list   --   I'm subscribed
_______________________________________________
drbd-user mailing list
drbd-user at lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


 

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


More information about the drbd-user mailing list