Lvm2 + ext4 & trim?

EricMartello

Senior member
Apr 17, 2003
910
0
0
If I use LVM to partition my drive and format them as EXT4, will I be able to safely enable TRIM on my SSD drives or not?

My drive would be like this:

1) Software Raid Partition
2) LVM
3) Volumes within LVM as EXT4
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Do you know if it's the LVM or MD drivers that are messing with TRIM? I've been considering getting a SSD myself but haven't done any real research yet.
 

EricMartello

Senior member
Apr 17, 2003
910
0
0
Do you know if it's the LVM or MD drivers that are messing with TRIM? I've been considering getting a SSD myself but haven't done any real research yet.

From what I gathered reading usenet conversations, anything aside form a pure ext4 partition will not work with the kernel's automatic trim support. You can trim an LVM group using the latest version of HDParm and its included "wiper" script, but it doesn't seem 100% safe to me yet. It will not work on a striped partition (either LVM stripes or MD).

In any case, I have two current-gen X25M in my server and I don't plan on filling them up to the top, so that should leave plenty of unused cells for wear leveling as well as the drive's internal GC to keep their performance up. I think trim becomes more of a necessity when you start filling the SSD drives above 60% of their rated capacity.