TRIM over iSCSI/NFS

I’ve taken this post from Reddit, which you can find here. The author is BloodyIron.

So I just went down a rabbit hole for about 3hrs, as I NEEDED to know if iSCSI and NFS can pass TRIM over their protocols to SSD-backed storage. And here are my findings.

  1. iSCSI is capable of passing TRIM correctly
  2. NFS requires v4.2 on server and client to pass TRIM correctly, otherwise earlier versions DO NOT

I cobbled this together from an eye-spinning number of sources on the internet. So if you feel you can conclusively prove me wrong, by all means.

I’m primarily posting this for myself (as my blog/website is not yet production ready), and maybe it can help some other people who are looking.

Furthermore:

  1. RHEL 7.4+ has official support for NFS v4.2
  2. FreeBSD, unsure when it will get NFS v4.2, I’m trying to find out, so far I haven’t found info
  3. Proxmox, to get it to use NFS v4.2 (not sure if it can or not) you have to change NFS options for mounts at the CLI, I’ve opened a feature request to add options/settings like this to the webGUI
  4. FreeNAS seems to conclusively not be NFS v4.2 capable, as of this writing (since it also relies on FreeBSD)

Hope this helps someone! 😀

WinSXS Cleanup on Windows8 & Server 2012

*** UPDATED *** Check the new post using Patch Cleaner *** UPDATED ***

WinSX has been the bane of many system engineers, including me. There have been many hacks and workarounds to try and shrink the size of the WinSX folder. None of them really worked, and at worst, caused significant problems with the Windows operating system.

We now have hope. There is finally a way to cleanup the WinSXS folder on Windows8 and Server 2012. I must stress, this is most beneficial for Server 2012 operating systems.

With current versions of Windows, all roles and files are available on the system. This means when you go to add a new role or feature, you’re not prompted to supply media to copy system files. This was very common with Windows 2000 and 2003, and a real pain.

The downside to this approach is when Windows checks for updates, updates are downloaded for all roles and features currently available on the system, regardless of whether you are using them or not. What this leads to is a huge WinSXS folder.

To clean up a Windows 2012 server, find out what roles are currently available:

  1. Open an administrative PowerShell command prompt
  2. Type Get-WindowsFeature to get a list of Windows Roles
    Capture
  3. To uninstall a role, use the following command
    Uninstall-WindowsFeature –name <name of role/feature> -remove
  4. Example: Uninstall-WindowsFeature -name Web-Server -remove
  5. Run Get-WindowsFeature again to see what has changed
    Capture
    That looks a bit better

This alone will save around 1.5GB of disk space.

But what about all the updates that have been applied to the various components of Web-Server? These need to be marked and removed. Run the following command:

dism.exe /online /cleanup-image /startcomponentcleanup

This scans all updates and checks if they are no longer needed. If they are no longer needed, the update is marked. However, this command does not remove them. To remove the updates:

  1. Run DiskCleanup
  2. Select C: drive and click OK
  3. One the scan is complete, select Cleanup System Files
    Capture
  4. This will run the scan again. You should see the following
    Capture
  5. Once the scan has finished again, select Windows Update Cleanup
    Capture
  6. Now click OK

In our testing, when the web server role was removed from a terminal server, with the updates removed, we freed up 20GB. Yes that’s right, 20GB!

For more information, please see the following links: