Hide Forgot
Description of problem: fstrim on raid6 failed Version-Release number of selected component (if applicable): # rpm -qa mdadm mdadm-3.3.4-3.fc24.x86_64 # uname -r 4.5.0-0.rc7.git0.2.fc24.x86_64 How reproducible: 100% Steps to Reproduce: echo Y >/sys/module/raid456/parameters/devices_handle_discard_safely mdadm -CR /dev/md0 -l6 -n8 /dev/sdb[1-3] /dev/sdb[5-9] mdadm --wait /dev/md0 mkfs.ext4 /dev/md0 mount /dev/md0 /mnt fstrim /mnt Actual results: Expected results: Additional info: # cat /sys/block/sdb/queue/discard_zeroes_data 1 # cat /sys/module/raid456/parameters/devices_handle_discard_safely Y # mdadm -D /dev/md0 /dev/md0: Version : 1.2 Creation Time : Wed Mar 16 17:17:35 2016 Raid Level : raid6 Array Size : 31432704 (29.98 GiB 32.19 GB) Used Dev Size : 5238784 (5.00 GiB 5.36 GB) Raid Devices : 8 Total Devices : 8 Persistence : Superblock is persistent Update Time : Wed Mar 16 18:07:59 2016 State : clean Active Devices : 8 Working Devices : 8 Failed Devices : 0 Spare Devices : 0 Layout : left-symmetric Chunk Size : 512K Name : dhcp-12-149.nay.redhat.com:0 (local to host dhcp-12-149.nay.redhat.com) UUID : c1c01dd2:c07c109e:38b71f1e:ff3c587f Events : 17 Number Major Minor RaidDevice State 0 8 17 0 active sync /dev/sdb1 1 8 18 1 active sync /dev/sdb2 2 8 19 2 active sync /dev/sdb3 3 8 21 3 active sync /dev/sdb5 4 8 22 4 active sync /dev/sdb6 5 8 23 5 active sync /dev/sdb7 6 8 24 6 active sync /dev/sdb8 7 8 25 7 active sync /dev/sdb9 # mount | grep md0 /dev/md0 on /mnt type ext4 (rw,relatime,seclabel,stripe=768,data=ordered) # fstrim /mnt fstrim: /mnt: the discard operation is not supported
I believe this is fixed by this patch I already pushed to the upstream MD maintainer, and will rippled down into Fedora through upstream updates: commit e7597e69dec59b65c5525db1626b9d34afdfa678 Author: Jes Sorensen <Jes.Sorensen> Date: Tue Feb 16 16:44:24 2016 -0500 md/raid5: Compare apples to apples (or sectors to sectors) 'max_discard_sectors' is in sectors, while 'stripe' is in bytes. This fixes the problem where DISCARD would get disabled on some larger RAID5 configurations (6 or more drives in my testing), while it worked as expected with smaller configurations. Fixes: 620125f2bf8 ("MD: raid5 trim support") Cc: stable.org v3.7+ Signed-off-by: Jes Sorensen <Jes.Sorensen> Signed-off-by: Shaohua Li <shli> Cheers, Jes
*********** MASS BUG UPDATE ************** We apologize for the inconvenience. There is a large number of bugs to go through and several of them have gone stale. Due to this, we are doing a mass bug update across all of the Fedora 24 kernel bugs. Fedora 24 has now been rebased to 4.7.4-200.fc24. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel. If you have moved on to Fedora 25, and are still experiencing this issue, please change the version to Fedora 25. If you experience different issues, please open a new bug report for those.
Verified with [1], close as CURRENTRELEASE. [1] 4.7.5-200.fc24.x86_64 mdadm-3.4-2.fc24.x86_64 Thanks Yi