https://github.com/chgen/hdparm-trimmer-scripts
ssd trimming (kind of) with hdparm
https://github.com/chgen/hdparm-trimmer-scripts
linux macos ssd trim
Last synced: about 1 month ago
JSON representation
ssd trimming (kind of) with hdparm
- Host: GitHub
- URL: https://github.com/chgen/hdparm-trimmer-scripts
- Owner: ChGen
- Created: 2020-11-22T16:19:48.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-22T16:25:43.000Z (over 5 years ago)
- Last Synced: 2025-01-19T15:51:55.621Z (over 1 year ago)
- Topics: linux, macos, ssd, trim
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hdparm-trimmer-scripts
ssd trimming (kind of) with hdparm
SSD trimmer enploys hdparm --trim-sector-ranges command,
when regular SATA TRIM not available in FS driver (for example in USB enclosure).
In this situation hdparm usually still works, and allows to send TRIM commands to disk "manually".
Creating (allocating) big file without extra writes on Linux:
`sudo hdparm --fallocate 1000 temp_file`
Creating (allocating) big file without extra writes on macOS:
Compile resize-mac.c
`gcc resize-mac.c -o resize-mac`
`./resize-mac /path/to/big_file 1000`
Run trimmer script:
`sudo ./trimmer.sh /path/to/trim_file /path/to/trim_dev`