Created
March 26, 2021 07:46
-
-
Save coldfire7/4d1bc812b581abcc21c22cc78b6cb0ac to your computer and use it in GitHub Desktop.
Enable SSD TRIM on pfSense
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Enable SSD TRIM on pfSense | |
### Get your device ID frmo fstab | |
[2.5.1][[email protected]]/root: cat /etc/fstab | |
/dev/gptid/82155eb7-884a-11eb-92c9-33fce6ee9433 / ufs rw,noatime 1 1 | |
/dev/gptid/8216f4a4-884a-11eb-92c9-33fce6ee9433 none swap sw 0 0 | |
### Before enabling TRIM the partition must be unmounted | |
### So use a pfSense ISO / bootable USB and "Boot [S]ingle User" mode | |
__ ____ | |
_ __ / _/ ___| ___ _ __ ___ ___ | |
| '_ \| |_\___ \ / _ \ '_ \/ __|/ _ \ | |
| |_) | _|___) | __/ | | \__ \ __/ | |
| .__/|_| |____/ \___|_| |_|___/\___| | |
|_| | |
+------------Welcome to pfSense-----------+ | |
| | ______ | |
| 1. Boot Multi User [Enter] | / \ | |
| 2. Boot [S]ingle User | _____/ f \ | |
| 3. [Esc]ape to loader prompt | / \ / | |
| 4. Reboot | / p \______/ Sense | |
| | \ / \ | |
| Options: | \_____/ \ | |
| 5. [K]ernel: kernel (1 of 2) | \ / | |
| 6. Configure Boot [O]ptions... | \______/ | |
| | | |
| | | |
| | | |
+-----------------------------------------+ | |
... | |
Enter full pathname of shell or RETURN for /bin/sh: | |
# /sbin/tunefs -t enable /dev/gptid/82155eb7-884a-11eb-92c9-33fce6ee9433 | |
tunefs: issue TRIM to the disk set | |
# /sbin/reboot | |
### Remove ISO / bootable USB and boot pfsense in normal mode | |
### Go in shell and check if TRIM activated | |
[2.5.1][[email protected]]/root: tunefs -p / | |
tunefs: POSIX.1e ACLs: (-a) disabled | |
tunefs: NFSv4 ACLs: (-N) disabled | |
tunefs: MAC multilabel: (-l) disabled | |
tunefs: soft updates: (-n) enabled | |
tunefs: soft update journaling: (-j) enabled | |
tunefs: gjournal: (-J) disabled | |
tunefs: trim: (-t) enabled | |
tunefs: maximum blocks per file in a cylinder group: (-e) 4096 | |
tunefs: average file size: (-f) 16384 | |
tunefs: average number of files in a directory: (-s) 64 | |
tunefs: minimum percentage of free space: (-m) 8% | |
tunefs: space to hold for metadata blocks: (-k) 6408 | |
tunefs: optimization preference: (-o) time | |
tunefs: volume label: (-L) | |
[2.5.1][[email protected]]/root: tunefs -p /var | |
tunefs: POSIX.1e ACLs: (-a) disabled | |
tunefs: NFSv4 ACLs: (-N) disabled | |
tunefs: MAC multilabel: (-l) disabled | |
tunefs: soft updates: (-n) enabled | |
tunefs: soft update journaling: (-j) enabled | |
tunefs: gjournal: (-J) disabled | |
tunefs: trim: (-t) enabled | |
tunefs: maximum blocks per file in a cylinder group: (-e) 4096 | |
tunefs: average file size: (-f) 16384 | |
tunefs: average number of files in a directory: (-s) 64 | |
tunefs: minimum percentage of free space: (-m) 8% | |
tunefs: space to hold for metadata blocks: (-k) 6408 | |
tunefs: optimization preference: (-o) time | |
tunefs: volume label: (-L) | |
# EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment