sync; echo 3> /proc/sys/vm/drop_caches
。
これが当てはまるかどうかはわかりませんが、ファイルシステムがNFSを介しているため、キャッシュを削除すると、ファイルキャッシュも失われます。
sync; echo 3 > /proc/sys/vm/drop_caches
ファイルの損失につながりますか?
承認された回答:
カーネルが正常に機能していれば、ファイルを失うことはありません。 man 5 proc
から :
/proc/sys/vm/drop_caches (since Linux 2.6.16)
Writing to this file causes the kernel to drop clean caches,
dentries, and inodes from memory, causing that memory to become
free ...
...
Because writing to this file is a nondestructive operation and
dirty objects are not freeable, the user should run sync(1)
first.
マニュアルに記載されているように、クリーンなキャッシュのみがフラッシュされ、drop_caches
に何かが書き込まれます。 非破壊操作です。汚れた物体はまったく邪魔されません。