Does LVM2 enable trimming of hard disks - does it really get zeroed?
0
votes
1
answer
674
views
I recently had to buy a new hard disk for my system. I'm running on a ssd, but for virtual machines i tend to use a hard disk. Since it had to be partitioned and formatted, i used LVM to add it to its own volume group and created one logical volume which was formatted with ext4.
Everything works fine. But when i trimmed my ssd with
fstrim
it took way too long. Turns out, that my hard disk was trimmed, too!
The filesystem is created with:
Default mount options: journal_data_ordered user_xattr acl
Mount options: barrier nodiscard utf8
I confirmed this later with the tool blktrace
which reports trimming calls to this logical volume. Somewhere between the lines i even saw a DEL or DL with some nummeric address.
My question is:
Does enable LVM2 hard disks to be trimmed? Could it be, that the hard disk supports this? (IIRC it would have to, so that fstrim can work on it)
I'm old enough to know PIO. The first optimization was to eradicate the zeroing. I'd like to trim my hard disks, so that everything gets zeroed. I could disable trim when mounting and issue it with fstrim
when the time fits.
Would be great, if it all works out as described.
Asked by WGRM
(828 rep)
Aug 2, 2021, 02:36 AM
Last activity: Mar 11, 2022, 07:55 PM
Last activity: Mar 11, 2022, 07:55 PM