correct_way_to_enable_trim_for_ssd_s_on_centos_6.5
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
correct_way_to_enable_trim_for_ssd_s_on_centos_6.5 [2014/05/26 05:50] – [Test] admin | correct_way_to_enable_trim_for_ssd_s_on_centos_6.5 [2014/05/26 07:57] – admin | ||
---|---|---|---|
Line 7: | Line 7: | ||
===Scheduled trim with fstrim=== | ===Scheduled trim with fstrim=== | ||
- | For example, configure a weekly fstrim job. Create **/ | + | For example, configure a weekly fstrim job. Create **/ |
- | for mount in `lsblk -ro "name,kname, | + | #this script will run weekly, will overwrite log. |
- | fstrim $mount | + | |
+ | trimlog=/ | ||
+ | echo > $trimlog | ||
+ | for mount in `lsblk -ro "rota,rm,fstype,mountpoint" | egrep "0 0 ext[2|3|4]" | ||
+ | | ||
done</ | done</ | ||
correct_way_to_enable_trim_for_ssd_s_on_centos_6.5.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1