0

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 fstrimwhen the time fits.

Would be great, if it all works out as described.

3
  • 1
    Some HDDs do support TRIM: documents.westerndigital.com/content/dam/doc-library/en_us/… Commented Aug 2, 2021 at 8:09
  • Looks like it's (useful) for SMR. Some companies (including Westerndigital) keep the fact that they are selling a SMR drive in the first place not very clear to the non business customer. Commented Aug 2, 2021 at 8:14
  • If someone uses this and confirmed that the specific HD area gets blanked. Let me now! :) I will search later to confirm this. I guess I may use dump or something like that. Commented Aug 5, 2021 at 4:10

1 Answer 1

0

Well, seems like i was blinded by having the disk formated with LVM. FSTRIM mentioned only this disk. I didn't consider, that it was also a new drive and could have support for TRIM, like "Tom Yan" mentioned.

I thought about it, again. But this time i checked ith smartctl and it DOES have TRIM support. This is new to me. Although i still wonder, if it works correctly, this question should be answered.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.