how do i enable trim?

ghost001985a

New Member
Feb 21, 2016
7
0
1
39
i everywhere look all i get is how to enable trim on etx4, or on fedora. ive seen all the posts that trim is supported on proxmox, my question is how?

currently im running 3.4, because 4.0 or 4.1 wont fully install, keep geting the "command chroot /target dpkg" error. once i can get trim enabled then ill try to upgrade it.
 
For working TRIM you need
  • a host storage that supports TRIM (e.g. SSD)
  • If there's a hardware raid controller involved, it needs to understand TRIM, too
  • You have to use VIRTIO SCSI as SCSI controller (OPTIONS tab)
  • You have to use SCSI as disk type (HARDWARE tab)
then it works like a charm.
 
For working TRIM you need
  • a host storage that supports TRIM (e.g. SSD)
  • If there's a hardware raid controller involved, it needs to understand TRIM, too
  • You have to use VIRTIO SCSI as SCSI controller (OPTIONS tab)
  • You have to use SCSI as disk type (HARDWARE tab)
then it works like a charm.

so i dont have to go into fstab and change to "defaults,noatime,discard" or anything like that?
 
For working TRIM you need
  • a host storage that supports TRIM (e.g. SSD)
  • If there's a hardware raid controller involved, it needs to understand TRIM, too
  • You have to use VIRTIO SCSI as SCSI controller (OPTIONS tab)
  • You have to use SCSI as disk type (HARDWARE tab)
then it works like a charm.

You're conflating two situations. 1) you want the host to use TRIM on the hardware devices. For that you need your first two points. 2) For the VM to use TRIM, you need the second two points, and to ensure that the proper checkbox on the virtual drive is selected to enable "discard" feature. For the VM to use TRIM does not require the base system to be using TRIM and vice versa. TRIM on the VM only matters when the storage is "thin", otherwise it is using the full size of the disk image anyway and it makes no sense to TRIM.