From 443ee9a98aea5619fd7f801cbde9b2689681b83f Mon Sep 17 00:00:00 2001 From: "rick.chan" Date: Thu, 24 Dec 2020 13:47:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E4=B8=B4=E6=97=B6?= =?UTF-8?q?=E5=A2=9E=E5=A4=A7=20tmp=20=E7=A9=BA=E9=97=B4=E6=96=B9=E6=B3=95?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: rick.chan --- Software/System/Linux/临时增大_tmp_空间.md | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Software/System/Linux/临时增大_tmp_空间.md diff --git a/Software/System/Linux/临时增大_tmp_空间.md b/Software/System/Linux/临时增大_tmp_空间.md new file mode 100644 index 0000000..184b567 --- /dev/null +++ b/Software/System/Linux/临时增大_tmp_空间.md @@ -0,0 +1,25 @@ +# 临时增大 tmp 空间 + +Linux tmp 空间主要在 /tmp 目录下,很多程序会使用到该空间。这个临时空间一般会被分配一个固定值,可用: + +```bash +df -h +``` + +查看所分配的空间大小和使用情况。 + +有的程序会大量占用该空间,导致临时空间被 100% 消耗,程序无法继续执行,此时可使用: + +```bash +mount -o remount,size=15G /tmp +``` + +临时增大 tmp 空间。或修改 /etc/fstab 文件: + +```ini +# /etc/fstab +# +tmpfs /tmp tmpfs defaults,size=15G,noatime,mode=1777 0 0 +``` + +在 option 部分增加 size=15G 字段,来永久增大 tmp 空间。