This utility configures a Linux system to automatically run fstrim on a weekly basis. This is essential for maintaining the performance and lifespan of Solid State Drives (SSDs) by informing the drive which blocks of data are no longer in use.
Automated Installation
To install, run the following command in your terminal. This will download and execute the installation script with sudo privileges.
Using curl:
curl -sL https://random.clusterlabs.dev/scripts/fstrim-setup/install.sh | sudo bash
Using wget:
wget -qO- https://random.clusterlabs.dev/scripts/fstrim-setup/install.sh | sudo bash
Installation Script Content:
Automated Uninstallation
To remove the configuration, run the corresponding command below. This will download and execute the uninstallation script with sudo.
Using curl:
curl -sL https://random.clusterlabs.dev/scripts/fstrim-setup/uninstall.sh | sudo bash
Using wget:
wget -qO- https://random.clusterlabs.dev/scripts/fstrim-setup/uninstall.sh | sudo bash
Uninstallation Script Content:
Monitoring and Verification
You can check that the timer is running and view logs to ensure everything is working as expected.
Check Timer Status
sudo systemctl status fstrim.timer
View Logs
sudo journalctl -u fstrim.service -f