ssd_trim trims the same filesystem once per bind mount
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 25/100
調査の方向性
Start with emhttp/plugins/dynamix/scripts/ssd_trim, especially xfs_btrfs_trim(), and inspect how findmnt -lnt btrfs,xfs -J results are filtered and passed to fstrim. The issue describes selecting one mount per MAJ:MIN and preferring FSROOT == "/"; PR #2797 is already open. Done means each filesystem is trimmed once through its root mount when available.
索引モデルが issue の本文から書いたものです。
説明
Summary
The scheduled SSD trim (emhttp/plugins/dynamix/scripts/ssd_trim, xfs_btrfs_trim()) runs fstrim once per mount of a filesystem instead of once per filesystem. Every bind mount of a pool is trimmed again, and since fstrim always trims the whole filesystem, a pool with three bind mounts is trimmed four times in a row.
Why it happens
The mount list comes from findmnt -lnt btrfs,xfs -J, filtered on .source | test("^/dev/"). A bind mount of a directory on the pool has a source like /dev/nvme0n1p1[/docker], which matches too.
On a 7.4.0-rc.1 server with a 4-device btrfs cache pool, findmnt lists the pool four times:
/mnt/cache 0:55 /
/var/lib/docker 0:55 /docker
<plugin bind mount> 0:55 /appdata/...
<plugin bind mount> 0:55 /appdata/...
/var/lib/docker alone is enough to get two passes on any server that uses a Docker directory on a pool.
Impact
On this server one pass over the cache pool takes about 3.5 hours (the 05:00 run reached the second mount at 08:33), so the whole run would last over 14 hours and overlap with normal use. The array was stopped during it, and the running fstrim held a bind mount, so umount /mnt/cache failed with "target is busy" until it was lazily unmounted by hand.
Expected
Each filesystem is trimmed once, preferably through the mount of its root.
Fix
Select MAJ:MIN and FSROOT from findmnt, keep one entry per MAJ:MIN, and prefer FSROOT == "/". PR: #2797
- 主要言語
- PHP
- スター
- 266
- フォーク
- 116
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 4
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
unraid/webgui のほかの issue
-
CPU core labels missing for Low-Power E-cores on hybrid Intel CPUs (Arrow Lake-H) — get_intel_core_types() ignores /sys/devices/cpu_lowpower対応中かも @dgongut が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
unraid/webgui#2785 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
rsyslog_config: "Mirror syslog to flash" rule is appended again on every Apply — each line written to the boot device N times対応中かも @junkerderprovinz が 38 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
Notification e-mails are sent without Date and Message-ID headers対応中かも @nofuturekid が 56 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
unraid/webgui#2781 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Static asset caching misses the Connect plugin's hashed bundle: ~144 JS chunks (8.5 MB) revalidate on every page load対応中かも @davidcoulson が 55 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
area: tests area: user refactoring
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
nplhse/collaborative-ivena-statistics#1845 ·
メンテナーはふだん 1 日以内に返信
-
[Sync EN] filesystem: document the ValueError of fgets(), file_get_contents(), and touch() (#6167)オープンsync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信
-
Перевод устарел
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
Documentation Feature: Events / Calendar
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信