Skip to content
This repository

TRIM support for Linux software RAID-1

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 test Initial commit October 18, 2011
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 mdtrim.py
README
This is an experiment in TRIM support for MD devices. It basically creates a large file (using the fallocate() syscall),
then uses hdparm tool to get information about file extents, maps them to physical device addresses and calls TRIM on them.

To make sure that we're really trimming the right data, mdtrim writes random data at the beginning, end and some 
middle parts of the extent and makes sure that this data is read correctly using direct IO on the block device.

Should be fairly safe if I haven't messed up with logical-to-physical sector translation too much.


The test/test.sh script can be used to test it. WARNING! While mdtrim.py is fairly safe, test.sh script is 
definitely NOT safe as it formats the drive which is used to do testing.
Something went wrong with that request. Please try again.