[linux-lvm] Does LVM RAID1 have TRIM support?

Brassow Jonathan jbrassow at redhat.com
Mon Sep 8 17:47:57 UTC 2014


On Sep 4, 2014, at 6:06 AM, Jarkko Oranen wrote:

>> TRIM is not yet supported in LVM RAID.  However, if MD has a solid TRIM implementation, it should be simple to enable it for LVM.  (This is because the MD kernel modules are used to perform RAID for LVM.  There is only a thin wrapper layer (linux/drivers/md/dm-raid.c) in device-mapper used to set-up the device.)
> 
> Thanks for the reply! Unfortunately, "simple" is relative.

By "simple", I mean that from our side all we should need to do is set 'num_discard_bios = 1' in dm-raid.c.  That is, if things are working fine in MD.  We could even make that conditional depending on the type of RAID (e.g. discards for RAID1, but not RAID5).  It could end up being that simple, but I need to know if MD has proper support for discards and all the kinks have been worked out.

 brassow





More information about the linux-lvm mailing list