TRIM support in the distro
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 11 Feb 2024 15:59:26 +0200
changeset 2583 1eb4d7b161be
parent 2582 113841c80a9a
child 2584 c3dcc61e9e3d
TRIM support in the distro
wsl.rst
--- a/wsl.rst	Sat Feb 10 23:25:12 2024 +0200
+++ b/wsl.rst	Sun Feb 11 15:59:26 2024 +0200
@@ -191,3 +191,19 @@
 
 https://devblogs.microsoft.com/commandline/windows-subsystem-for-linux-september-2023-update/#automatic-disk-space-clean-up-set-sparse-vhd
   Automatic disk space clean up (Set sparse VHD).
+
+Legacy solutions were based on re-importing existing image, like:
+
+https://github.com/okibcn/wslcompact
+  Compacts the size of the ever-growing WSL vhdx images.
+
+or filling with zeros and processing VHD:
+
+https://github.com/bendover94/reclaim_wsl_mem
+  ``sudo dd if=/dev/zero of=/0bits bs=20M`` + ``Optimize-VHD``.
+
+Check TRIM support in the distro::
+
+  sudo apt install hdparm
+  sudo hdparm -I /dev/sdc
+