blob: 5e2277218ff226ce20e36a8b01609af0a80cba05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<!doctype html>
<html lang="EN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/style.css">
<title>Bloggings</title>
</head>
<body>
<header>
<h1>Bloggings</h1>
<a href="/index.php">Back</a>
</header>
<main>
<article>
<h2>Periodic fstrim on SSD drives</h2>
<h3>05-11-2023</h3>
<p>
The util-linux package provides fstrim.service and fstrim.timer systemd unit files.
</p><p>
Enabling the timer will activate the service weekly. The service executes fstrim(8) on all mounted filesystems on devices that support the discard operation.
</p><p>
The timer relies on the timestamp of /var/lib/systemd/timers/stamp-fstrim.timer (which it will create upon first invocation) to know whether a week has elapsed since it last ran.
</p><p>
Therefore there is no need to worry about too frequent invocations, in an anacron-like fashion. systemctl enable fstrim.timer
</p><p>
To query the units activity and status, see journalctl.
</p><p>
To change the periodicity of the timer or the command run, edit the provided unit files.
</p>
<a href="https://wiki.archlinux.org/title/Solid_state_drive">https://wiki.archlinux.org/title/Solid_state_drive</a>
</article>
</main>
<footer>
<p> </p><p>§</p></footer>
</body></html>
|