Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am setting up a notebook for software demo purpose. The machine has a Intel Core i7 CPU, 8GB RAM, a 128GB SSD, and runs Ubuntu 12.04 LTS 64bit desktop. As it is, the SSD is configured to have a single volume group, with /boot, /swap, and / all in their respective logical volume. They collectively consume 30GB space. I plan to use the remaining for logical volumes for KVM guests, all run Ubuntu 12.04 Server

I would like to ensure that the SSD is utilized optimally. Although on this site, there are some great info about setting up TRIM support for file system setups that do not involve LVM, I have not found explicit guide regarding my planned setup.

I did found this page which talks about adding issue_discards in /etc/lvm/lvm.conf. But in said file on my machine, I didn't find the cited content. I double-checked man lvm.conf(5), didn't see any mentioning of this option either.

Thus, I'm not sure what to do. Furthermore, even say adding the option is the right thing to do, should I in my machine's /etc/fstab still add mount options such as noatime etc?

Any tips, pointers, and/or further guidance are greatly appreciated.

share|improve this question

1 Answer

The option issue_discards is currently not supported on the version of LVM shipped with 12.04.

From the LVM Changelog:

Version 2.02.85 - 29th April 2011

Add new obtain_device_list_from_udev setting to lvm.conf.
Obtain device list from udev by default if LVM2 is compiled with udev support.
Add test for vgimportclone and querying of vgnames with duplicate pvs.
Avoid use of released memory when duplicate PV is found.
Add "devices/issue_discards" to lvm.conf.
...

In 12.04 the LVM version is 2.02.66 (12.10 comes with 2.02.95).

To set this option already now makes no harm, because it is silently ignored.
See Red Hat Bugzilla 820203

share|improve this answer
Thanks for the info! Does it mean that with 12.04 LTS, and how I plan setup these KVM guests (each in a separate logical volume), I don't have a way to optimize the usages of the SSD? --Zack – Zack Perry Sep 23 '12 at 4:03
However, these 'discards' will only trigger on remove or reduce operations on LVs. Discards on the filesystem on top of a LV will not propagate! From the same LVM changelog: "Issue discards on lvremove and lvreduce etc. if enabled and supported." – gertvdijk Sep 23 '12 at 13:52
Thanks again for chipping in with more info. It seems to me that given what we have collectively seen so far, there is no good way for me to configure my KVM setup to use the computer's SSD with TRIM :-( At this stage, it seems to me that we either forget about LVM, use image based KVM guests, and be able to use TRIM, or use LVM (perhaps nested), and forget about "trimming" the SSD. Oh, well! – Zack Perry Sep 23 '12 at 18:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.