{"id":3012,"date":"2025-10-07T22:11:52","date_gmt":"2025-10-07T13:11:52","guid":{"rendered":"https:\/\/blog.id774.net\/entry\/?p=3012"},"modified":"2025-11-11T17:02:47","modified_gmt":"2025-11-11T08:02:47","slug":"debian-13-%e3%81%a7%e5%b0%8e%e5%85%a5%e3%81%95%e3%82%8c%e3%81%9f-tmp-%e3%81%ae-tmpfs-%e5%8c%96%e3%81%ab%e4%bc%b4%e3%81%86%e3%81%be%e3%81%a8%e3%82%81","status":"publish","type":"post","link":"https:\/\/blog.id774.net\/entry\/2025\/10\/07\/3012\/","title":{"rendered":"Debian 13 \u3067\u5c0e\u5165\u3055\u308c\u305f \/tmp \u306e tmpfs \u5316\u306b\u4f34\u3046\u307e\u3068\u3081"},"content":{"rendered":"<p>\n<a href=\"https:\/\/blog.id774.net\/entry\/2025\/09\/05\/2989\/\">Debian 13<\/a> \u201c<a href=\"https:\/\/blog.id774.net\/entry\/2025\/08\/13\/2940\/\">Trixie<\/a>\u201d \u3067\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067 \/tmp \u3092 tmpfs \u3068\u3057\u3066\u30de\u30a6\u30f3\u30c8\u3059\u308b\u4ed5\u69d8\u304c<a href=\"https:\/\/www.debian.org\/releases\/stable\/release-notes.en.pdf\">\u5c0e\u5165\u3055\u308c\u305f<\/a>\u3002<br \/>\n\u306a\u304a\u3001\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\uff08Debian 12 &#8220;Bookworm&#8221; \u4ee5\u524d\uff09\u304b\u3089<a href=\"https:\/\/blog.id774.net\/entry\/2025\/08\/31\/2974\/\">\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u305f\u30b7\u30b9\u30c6\u30e0<\/a>\u3067\u306f\u3001\u518d\u8d77\u52d5\u5f8c\u306b\u3053\u306e\u65b0\u3057\u3044 tmpfs \u30de\u30a6\u30f3\u30c8\u304c\u6709\u52b9\u306b\u306a\u308a\u3001\u65e2\u5b58\u306e \/tmp \u4e0a\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u898b\u3048\u306a\u304f\u306a\u308b\u3002<br \/>\n\u3053\u3053\u3067\u306f\u3053\u306e \/tmp \u306e tmpfs \u5316\u306b\u4f34\u3046\u60c5\u5831\u3092\u307e\u3068\u3081\u308b\u3002\n<\/p>\n<hr>\n<h2>\u5168\u4f53\u50cf\uff08\u8981\u70b9\uff09<\/h2>\n<ul>\n<li>Debian 13 \u304b\u3089\u3001\/tmp \u306f\u65e2\u5b9a\u3067 tmpfs\uff08RAM \u3068\u5fc5\u8981\u306b\u5fdc\u3058\u3066 swap \u3092\u5229\u7528\uff09\u306b\u7f6e\u304b\u308c\u308b\u3002\u65b0\u898f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3060\u3051\u3067\u306a\u304f\u3001Bookworm \u304b\u3089\u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u5f8c\u3082\u518d\u8d77\u52d5\u3067\u9069\u7528\u3055\u308c\u308b\u3002\u5207\u66ff\u5f8c\u306f\u3001\u5f93\u6765 \/tmp \u306b\u3042\u3063\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u4e00\u6642\u7684\u306b\u898b\u3048\u306a\u304f\u306a\u308b\uff08\u4e0b\u5c64\u306b\u96a0\u308c\u308b\uff09\u3053\u3068\u304c\u3042\u308b\u3002<\/li>\n<li><a href=\"https:\/\/lwn.net\/Articles\/975565\/\">\u81ea\u52d5\u30af\u30ea\u30fc\u30f3<\/a>\u306e\u65e2\u5b9a\u306f systemd-tmpfiles \u306b\u3088\u308a\u3001\/tmp \u306f 10 \u65e5\u672a\u4f7f\u7528\u3001\/var\/tmp \u306f 30 \u65e5\u672a\u4f7f\u7528\u3067\u524a\u9664\u3002\u5224\u5b9a\u306f\u6700\u7d42\u30a2\u30af\u30bb\u30b9\u6642\u523b\u304c\u57fa\u6e96\u3002<\/li>\n<li>\u5f79\u5272\u306e\u9055\u3044\u306f\u660e\u78ba\uff1a\/tmp \u306f\u77ed\u547d\u30fb\u63ee\u767a\uff08\u518d\u8d77\u52d5\u3067\u6d88\u3048\u3066\u3088\u3044\u524d\u63d0\uff09\u3001\/var\/tmp \u306f\u518d\u8d77\u52d5\u5f8c\u3082\u6b8b\u3057\u305f\u3044\u4e00\u6642\u30d5\u30a1\u30a4\u30eb\u7528\uff08\u901a\u5e38\u30c7\u30a3\u30b9\u30af\u4e0a\uff09\u3002\u3053\u308c\u306f <a href=\"https:\/\/refspecs.linuxfoundation.org\/FHS_3.0\/fhs\/ch05s15.html\">FHS \u306e\u8a2d\u8a08<\/a>\u306b\u6cbf\u3046\u3002<\/li>\n<li>tmpfs \u306e\u30b5\u30a4\u30ba\u306f\u300c<a href=\"https:\/\/www.kernel.org\/doc\/html\/latest\/filesystems\/tmpfs.html\">\u4e88\u7d04\u3067\u306f\u306a\u304f\u4e0a\u9650<\/a>\u300d\u3002\u65e2\u5b9a\u4e0a\u9650\u306f\u7269\u7406\u30e1\u30e2\u30ea\u306e\u304a\u3088\u305d 50% \u7a0b\u5ea6\u3002\u5b9f\u969b\u306e\u6d88\u8cbb\u306f\u4f5c\u6210\u3057\u305f\u5206\u3060\u3051\u3067\u3001\u672a\u4f7f\u7528\u6642\u306f\u30e1\u30e2\u30ea\u3092\u6d88\u8cbb\u3057\u306a\u3044\u3002\u5fc5\u8981\u306a\u3089 size= \u3067\u500b\u5225\u6307\u5b9a\u3067\u304d\u308b\u3002<\/li>\n<li>\u4e92\u63db\u6027\u9762\u3067\u306e\u61f8\u5ff5\uff08breakage\uff09\u306f\u4e3b\u306b\u5927\u5bb9\u91cf\u306e\u4e00\u6642\u30d5\u30a1\u30a4\u30eb\u3067\u306e OOM\/ENOSPC\u3001\/tmp \u3092\u6c38\u7d9a\u3068\u8aa4\u89e3\u3057\u305f\u5b9f\u88c5\u3001\u6a29\u9650\u3084 Sticky bit \u306e\u6271\u3044\u306a\u3069\u3002\u8b70\u8ad6\u3092\u7d4c\u3066\u6027\u80fd\u3084 SSD \u66f8\u8fbc\u8ca0\u8377\u306e\u4f4e\u6e1b\u306a\u3069\u306e\u5229\u70b9\u3092\u91cd\u8996\u3057<a href=\"https:\/\/lwn.net\/Articles\/975565\/\">\u65e2\u5b9a\u5316\u3055\u308c\u305f<\/a>\u3002<\/li>\n<\/ul>\n<hr>\n<h2>\u6b74\u53f2\u3068\u4ed5\u69d8\u5909\u66f4\u306e\u7d4c\u7def<\/h2>\n<ul>\n<li>\u5f93\u6765\u306e Debian\uff08\u301cBookworm\uff09\u3067\u306f \/tmp \u306f\u30c7\u30a3\u30b9\u30af\u4e0a\u304c\u4e00\u822c\u7684\u3060\u3063\u305f\u3002Debian 13 \u3067\u65e2\u5b9a\u3092 tmpfs \u306b\u5909\u66f4\u3002<\/li>\n<li>\u65b0\u898f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3082\u3061\u308d\u3093\u3001\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u74b0\u5883\u3067\u3082\u518d\u8d77\u52d5\u5f8c\u306b tmpfs \u5316\u304c\u53cd\u6620\u3055\u308c\u308b\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5207\u66ff\u76f4\u5f8c\u306f\u5f93\u524d\u306e \/tmp \u914d\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u30de\u30a6\u30f3\u30c8\u306e\u4e0b\u306b\u96a0\u308c\u308b\u3053\u3068\u304c\u3042\u308b\u305f\u3081<a href=\"https:\/\/www.debian.org\/releases\/trixie\/release-notes\/issues.html\">\u6ce8\u610f<\/a>\u3002<\/li>\n<li>systemd \u5074\u3067\u306f\u4ee5\u524d\u304b\u3089\u3001\/tmp \u306e tmpfs \u5316\u3068 \/tmp=10 \u65e5\u30fb\/var\/tmp=30 \u65e5\u306e\u81ea\u52d5\u30af\u30ea\u30fc\u30f3\u3068\u3044\u3046<a href=\"https:\/\/lwn.net\/Articles\/975565\/\">\u65b9\u91dd<\/a>\u304c\u3042\u308a\u3001Debian 13 \u3067\u3053\u308c\u304c\u53d6\u308a\u8fbc\u307e\u308c\u305f\u3002<\/li>\n<\/ul>\n<hr>\n<h2>\/tmp\uff08tmpfs\uff09\u306e\u6027\u8cea<\/h2>\n<ul>\n<li>\u9ad8\u901f\uff08RAM I\/O\uff09\u3001\u518d\u8d77\u52d5\u3067\u63ee\u767a\u3001\u81ea\u52d5\u30af\u30ea\u30fc\u30f3\uff0810 \u65e5\u672a\u4f7f\u7528\u3067\u524a\u9664\uff09\u304c\u65e2\u5b9a\u3002<\/li>\n<li>df \u306b\u898b\u3048\u308b\u30b5\u30a4\u30ba\u306f\u4e0a\u9650\u3067\u3042\u308a\u3001\u672a\u4f7f\u7528\u5206\u306f\u30e1\u30e2\u30ea\u3092\u6d88\u8cbb\u3057\u306a\u3044\u3002\u4e0a\u9650\u306f\u6982\u306d\u7269\u7406 RAM \u306e 50% \u7a0b\u5ea6\u304c\u65e2\u5b9a\u3002\u5fc5\u8981\u306b\u5fdc\u3058\u3066 size= \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u8abf\u6574\u3067\u304d\u308b\u3002<\/li>\n<li>\u5927\u5bb9\u91cf\u306e\u4e00\u6642\u30d5\u30a1\u30a4\u30eb\uff08\u52d5\u753b\u5909\u63db\u3001\u5de8\u5927\u30a2\u30fc\u30ab\u30a4\u30d6\u3001\u91cd\u3044\u30d3\u30eb\u30c9\u7b49\uff09\u306f \/tmp \u3067\u306f\u306a\u304f <a href=\"https:\/\/systemd.io\/TEMPORARY_DIRECTORIES\/\">\/var\/tmp<\/a>\uff08\u307e\u305f\u306f\u4efb\u610f\u306e\u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\uff09\u3092\u4f7f\u3046\u306e\u304c\u5b89\u5168\u3002<\/li>\n<\/ul>\n<hr>\n<h2>\/var\/tmp \u306e\u4f4d\u7f6e\u3065\u3051<\/h2>\n<ul>\n<li>\u518d\u8d77\u52d5\u5f8c\u3082\u6b8b\u3063\u3066\u307b\u3057\u3044\u4e00\u6642\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u304f\u5834\u6240\u3002FHS \u306f\u300c\u518d\u8d77\u52d5\u3092\u8de8\u3044\u3067\u4fdd\u6301\u300d\u3092<a href=\"https:\/\/refspecs.linuxfoundation.org\/FHS_3.0\/fhs\/ch05s15.html\">\u660e\u78ba\u306b\u898f\u5b9a<\/a>\u3002<\/li>\n<li>\u901a\u5e38\u306f\u30c7\u30a3\u30b9\u30af\u4e0a\uff08ext4 \u7b49\uff09\u306b\u3042\u308a\u3001systemd-tmpfiles \u306b\u3088\u308a 30 \u65e5\u672a\u4f7f\u7528\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u524a\u9664\u3055\u308c\u308b\u3002<a href=\"https:\/\/www.reddit.com\/r\/CentOS\/comments\/iklcn4\/default_age_of_tmpfiles\/\">\u5224\u5b9a\u306f\u6700\u7d42\u30a2\u30af\u30bb\u30b9\u6642\u523b<\/a>\u3002<\/li>\n<\/ul>\n<hr>\n<h2>\u751f\u6210\u3068\u5b58\u5728\u4fdd\u8a3c\uff08\/tmp \u306e\u5b58\u5728\u30c1\u30a7\u30c3\u30af\u306f\u539f\u5247\u4e0d\u8981\uff09<\/h2>\n<p>Debian 8 &#8220;Jessie&#8221; \u4ee5\u964d\u3001systemd \u304c init \u30b7\u30b9\u30c6\u30e0\u3068\u3057\u3066\u63a1\u7528\u3055\u308c\u3001\u4ee5\u5f8c \/tmp \u306f\u5e38\u306b\u5b58\u5728\u3059\u308b\u3053\u3068\u304c\u4fdd\u8a3c\u3055\u308c\u308b\u3002<\/p>\n<ul>\n<li>Debian 13 \u306e systemd \u74b0\u5883\u3067\u306f\u3001\u8d77\u52d5\u6642\u306b \/tmp \u306f<a href=\"https:\/\/systemd.io\/API_FILE_SYSTEMS\/\">\u81ea\u52d5\u7684\u306b\u30de\u30a6\u30f3\u30c8\u30fb\u751f\u6210<\/a>\u3055\u308c\u3001\u9069\u5207\u306a\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\uff081777\uff09\u304c\u4fdd\u8a3c\u3055\u308c\u308b\u3002<\/li>\n<li>\u305d\u306e\u305f\u3081\u901a\u5e38\u306e\u904b\u7528\u3067\u306f\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u5074\u3067 \/tmp \u306e\u5b58\u5728\u30c1\u30a7\u30c3\u30af\u3084 mkdir \u3092\u884c\u3046\u5fc5\u8981\u306f\u306a\u3044\u3002\u8aa4\u3063\u305f\u30e2\u30fc\u30c9\u3067\u4f5c\u6210\u3057\u305f\u308a\u3001\u30de\u30a6\u30f3\u30c8\u30dd\u30a4\u30f3\u30c8\u3092\u58ca\u3059\u5371\u967a\u304c\u3042\u308b\u305f\u3081\u3001\u3080\u3057\u308d\u907f\u3051\u308b\u3079\u304d\u3002<\/li>\n<li>\u4f8b\u5916\u3068\u3057\u3066\u3001\u6975\u5c0f chroot \u3084 initramfs \u306a\u3069 systemd \u304c\u7a3c\u50cd\u3057\u306a\u3044\u74b0\u5883\u3067\u306f\u660e\u793a\u7684\u306b\u4f5c\u6210\u304c\u5fc5\u8981\u306b\u306a\u308b\u5834\u5408\u304c\u3042\u308b\u3002<\/li>\n<\/ul>\n<hr>\n<h2>\u8abf\u6574\u30fb\u30aa\u30d7\u30c8\u30a2\u30a6\u30c8\u65b9\u6cd5<\/h2>\n<ul>\n<li>\u30b5\u30a4\u30ba\u3084\u30de\u30a6\u30f3\u30c8\u30aa\u30d7\u30b7\u30e7\u30f3\u306e<a href=\"https:\/\/askubuntu.com\/questions\/1061265\/tmp-in-tmpfs-how-do-this-only-with-systemd\">\u8abf\u6574<\/a>\u306f \/etc\/fstab \u306b tmpfs \/tmp \u3092\u8a18\u8ff0\u3059\u308b\u306e\u304c\u5b89\u5168\u304b\u3064\u4e00\u822c\u7684\u3002size=\u3001mode=\u3001nosuid\u3001nodev\u3001noexec \u306a\u3069\u3092\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u6307\u5b9a\u3002<\/li>\n<li>tmpfs \u65e2\u5b9a\u3092\u3084\u3081\u3066\u30c7\u30a3\u30b9\u30af\u306b\u623b\u3059\u5834\u5408\u306f\u3001tmp.mount \u3092\u7121\u52b9\u5316\uff08mask\uff09\u3059\u308b<a href=\"https:\/\/wiki.archlinux.org\/title\/Tmpfs\">\u65b9\u6cd5<\/a>\u304c\u3042\u308b\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u65e2\u5b9a\u304b\u3089\u306e\u9038\u8131\u3068\u306a\u308b\u305f\u3081\u3001\u5f71\u97ff\u7bc4\u56f2\u3092\u7406\u89e3\u3057\u305f\u4e0a\u3067\u9069\u7528\u3059\u308b\u3002<\/li>\n<li>\u81ea\u52d5\u30af\u30ea\u30fc\u30f3\u306e\u4fdd\u6301\u671f\u9593\u3092\u5909\u3048\u305f\u3044\u5834\u5408\u306f\u3001tmpfiles.d \u306e\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u3067 \/tmp \u3068 \/var\/tmp \u306e\u65e5\u6570\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/li>\n<\/ul>\n<hr>\n<h2>\u904b\u7528\u3067\u306e\u5b9f\u52d9\u30ac\u30a4\u30c9<\/h2>\n<ol>\n<li><strong>\u7f6e\u304d\u5834\u6240\u306e\u6307\u91dd<\/strong>\uff1a\u5c0f\u3055\u304f\u77ed\u547d\u306a\u4e00\u6642\u30d5\u30a1\u30a4\u30eb\u306f \/tmp\u3002\u518d\u8d77\u52d5\u5f8c\u3082\u6b8b\u3057\u305f\u3044\u3001\u307e\u305f\u306f\u30b5\u30a4\u30ba\u304c\u5927\u304d\u3044\u3082\u306e\u306f \/var\/tmp\uff08\u3082\u3057\u304f\u306f\u660e\u793a\u306e\u4f5c\u696d\u7528\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\uff09\u3002<\/li>\n<li><strong>\u30e1\u30e2\u30ea\u5727\u8feb\u306e\u56de\u907f<\/strong>\uff1a\u5de8\u5927\u306a\u4e2d\u9593\u751f\u6210\u7269\u306f \/tmp \u3092\u907f\u3051\u308b\u3002\u5fc5\u8981\u306a\u3089 \/etc\/fstab \u306e size= \u3067\u4e0a\u9650\u3092\u8abf\u6574\u3002<\/li>\n<li><strong>\u30af\u30ea\u30fc\u30f3\u306e\u7406\u89e3<\/strong>\uff1a\u65e5\u6570\u306f\u6700\u7d42\u30a2\u30af\u30bb\u30b9\u6642\u523b\u3067\u5224\u5b9a\u3002\u30d5\u30a1\u30a4\u30eb\u30de\u30cd\u30fc\u30b8\u30e3\u3084\u30a2\u30d7\u30ea\u304c\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u5ef6\u547d\u3055\u308c\u5f97\u308b\u3002\u65b9\u91dd\u5909\u66f4\u306f <a href=\"https:\/\/unix.stackexchange.com\/questions\/775995\/using-systemd-tmpfile-to-clear-tmp\">tmpfiles.d \u306e\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9<\/a>\u3067\u3002<\/li>\n<li><strong>\u30c8\u30e9\u30d6\u30eb\u5146\u5019<\/strong>\uff1a\/tmp \u306e\u4e0a\u9650\u5230\u9054\u306f <a href=\"https:\/\/www.kernel.org\/doc\/html\/latest\/filesystems\/tmpfs.html\">ENOSPC<\/a>\u3001\u904e\u5927\u306a\u30b5\u30a4\u30ba\u8a2d\u5b9a\u3084\u8ca0\u8377\u96c6\u4e2d\u306f OOM \u306e\u30ea\u30b9\u30af\u3002\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u8a2d\u8a08\u3068\u76e3\u8996\u3067\u65e9\u671f\u306b\u691c\u77e5\u3059\u308b\u3002<\/li>\n<\/ol>\n<hr>\n<h2>\u4e92\u63db\u6027\u30fb\u300c\u7834\u58ca\u7684\u5f71\u97ff\u300d\u306e\u4e2d\u8eab<\/h2>\n<ul>\n<li>\u61f8\u5ff5\u306e\u4e2d\u5fc3\u306f\u3001\u5927\u5bb9\u91cf\u4e00\u6642\u30d5\u30a1\u30a4\u30eb\u3067\u306e OOM\/\u5931\u6557\u3001\/tmp \u3092\u6c38\u7d9a\u3068\u8aa4\u8a8d\u3057\u305f\u5b9f\u88c5\u306e\u60f3\u5b9a\u9055\u3044\u3001Sticky bit\u30fb\u6a29\u9650\u307e\u308f\u308a\u306e\u53d6\u308a\u6271\u3044\u3002<\/li>\n<li>\u3053\u308c\u3089\u306e\u61f8\u5ff5\u3092\u8e0f\u307e\u3048\u3064\u3064\u3001\u6027\u80fd\u5411\u4e0a\u3068 SSD \u66f8\u304d\u8fbc\u307f\u306e\u6291\u5236\u306a\u3069\u306e\u5229\u70b9\u3092\u8a55\u4fa1\u3057\u3066\u3001Debian 13 \u3067\u306e<a href=\"https:\/\/lwn.net\/Articles\/975565\/\">\u65e2\u5b9a\u5316<\/a>\u306b\u81f3\u3063\u305f\u3002<\/li>\n<\/ul>\n<hr>\n<h2>\u65e7 \/tmp \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30af\u30ea\u30fc\u30f3\u30a2\u30c3\u30d7\u624b\u9806<\/h2>\n<p>\nDebian 12 &#8220;Bookworm&#8221; \u4ee5\u524d\u304b\u3089\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u305f\u74b0\u5883\u3067\u306f\u3001\/tmp \u304c tmpfs \u3067\u30de\u30a6\u30f3\u30c8\u3055\u308c\u305f\u5f8c\u3082\u3001\u65e7\u30c7\u30a3\u30b9\u30af\u4e0a\u306e \/tmp \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u30b7\u30b9\u30c6\u30e0\u5185\u90e8\u306b\u6b8b\u3063\u3066\u3044\u308b\u5834\u5408\u304c\u3042\u308b\u3002<br \/>\n\u3053\u308c\u306f\u65b0\u3057\u3044 tmpfs \u30de\u30a6\u30f3\u30c8\u306b\u8986\u3044\u96a0\u3055\u308c\u3066\u3044\u308b\u3060\u3051\u3067\u3001\u4e0d\u8981\u306a\u9818\u57df\u3068\u3057\u3066\u6b8b\u5b58\u3057\u3066\u3044\u308b\u3002\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u5b89\u5168\u306b\u78ba\u8a8d\u304a\u3088\u3073\u524a\u9664\u3067\u304d\u308b\u3002\n<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:1000px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\">sudo mkdir \/mnt\/oldtmp<br \/>\nsudo mount --bind \/ \/mnt\/oldtmp<br \/>\nsudo ls -la \/mnt\/oldtmp\/tmp<br \/>\nsudo rm -rf \/mnt\/oldtmp\/tmp\/*<br \/>\nsudo umount \/mnt\/oldtmp<br \/>\nsudo rmdir \/mnt\/oldtmp<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\n\u4e0a\u8a18\u306e\u64cd\u4f5c\u306b\u3088\u308a\u3001\u30c7\u30a3\u30b9\u30af\u4e0a\u306b\u6b8b\u3063\u3066\u3044\u305f\u65e7 \/tmp \u306e\u5185\u5bb9\u3092\u76f4\u63a5\u53c2\u7167\u30fb\u524a\u9664\u3067\u304d\u308b\u3002<br \/>\n\u518d\u8d77\u52d5\u3057\u3066\u3082\u518d\u3073 \/tmp \u306f tmpfs \u3068\u3057\u3066\u30de\u30a6\u30f3\u30c8\u3055\u308c\u3001RAM \u4e0a\u306e\u4e00\u6642\u9818\u57df\u3068\u3057\u3066\u904b\u7528\u3055\u308c\u308b\u3002\n<\/p>\n<hr>\n<h2>\u53c2\u8003\u60c5\u5831\uff08\u8a2d\u8a08\u306e\u6839\u62e0\u3068\u8aad\u307f\u89e3\u304d\u306e\u30dd\u30a4\u30f3\u30c8\uff09<\/h2>\n<ul>\n<li>Debian 13 \u30ea\u30ea\u30fc\u30b9\u30ce\u30fc\u30c8\uff1a<a href=\"https:\/\/www.debian.org\/releases\/trixie\/release-notes\/issues.html\">\/tmp \u306e tmpfs \u65e2\u5b9a\u5316<\/a>\u3001\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u6642\u306e\u6ce8\u610f\u70b9\uff08\u5207\u66ff\u5f8c\u306b\u5f93\u6765 \/tmp \u306e\u4e2d\u8eab\u304c\u96a0\u308c\u308b\u30b1\u30fc\u30b9\u306a\u3069\uff09\u3002<\/li>\n<li>FHS\uff08Filesystem Hierarchy Standard\uff09\uff1a\/tmp \u3068 <a href=\"https:\/\/refspecs.linuxfoundation.org\/FHS_3.0\/fhs\/ch05s15.html\">\/var\/tmp<\/a> \u306e\u5f79\u5272\u5206\u62c5\uff08\/var\/tmp \u306f\u518d\u8d77\u52d5\u3092\u8de8\u3044\u3067\u4fdd\u6301\uff09\u3002<\/li>\n<li>systemd tmpfiles \u306e\u65e2\u5b9a\uff1a\/tmp \u306f 10 \u65e5\u672a\u4f7f\u7528\u3001\/var\/tmp \u306f 30 \u65e5\u672a\u4f7f\u7528\u3067<a href=\"https:\/\/lwn.net\/Articles\/975565\/\">\u524a\u9664<\/a>\u3002\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u53ef\u3002<\/li>\n<li>tmpfs \u306e\u5bb9\u91cf\u89e3\u91c8\uff1a<a href=\"https:\/\/www.kernel.org\/doc\/html\/latest\/filesystems\/tmpfs.html\">\u4e0a\u9650\u6307\u5b9a<\/a>\u3067\u3042\u308a\u672a\u4f7f\u7528\u5206\u306f\u30e1\u30e2\u30ea\u3092\u6d88\u8cbb\u3057\u306a\u3044\u3002\u65e2\u5b9a\u4e0a\u9650\u306f\u7269\u7406 RAM \u306e\u304a\u3088\u305d 50% \u7a0b\u5ea6\u3002\u5fc5\u8981\u306b\u5fdc\u3058\u3066 size= \u3067\u8abf\u6574\u3002<\/li>\n<li>\u30aa\u30d7\u30c8\u30a2\u30a6\u30c8\u624b\u6bb5\uff1a\/etc\/fstab \u306b\u3088\u308b\u660e\u793a<a href=\"https:\/\/wiki.archlinux.org\/title\/Tmpfs\">\u8a2d\u5b9a<\/a>\u3001tmp.mount \u306e mask\u3001tmpfiles.d \u306b\u3088\u308b\u4fdd\u6301\u671f\u9593\u30dd\u30ea\u30b7\u30fc\u4e0a\u66f8\u304d\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u3001 Debian 13 &#8220;Trixie&#8221; \u306e\u6a19\u6e96\u65b9\u91dd\u306b\u6cbf\u3063\u3066\u3001\u4e00\u6642\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u8a2d\u8a08\u610f\u56f3\u30fb\u30c7\u30d5\u30a9\u30eb\u30c8\u6319\u52d5\u30fb\u904b\u7528\u4e0a\u306e\u6ce8\u610f\u70b9\u3092\u6574\u7406\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Debian 13 \u201cTrixie\u201d \u3067\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067 \/tmp \u3092 tmpfs \u3068\u3057\u3066\u30de\u30a6\u30f3\u30c8\u3059\u308b\u4ed5\u69d8\u304c\u5c0e\u5165\u3055\u308c\u305f\u3002 \u306a\u304a\u3001\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\uff08Debian 12 &#8220;Bookworm&#8221; \u4ee5\u524d\uff09\u304b\u3089 &#8230; <a title=\"Debian 13 \u3067\u5c0e\u5165\u3055\u308c\u305f \/tmp \u306e tmpfs \u5316\u306b\u4f34\u3046\u307e\u3068\u3081\" class=\"read-more\" href=\"https:\/\/blog.id774.net\/entry\/2025\/10\/07\/3012\/\" aria-label=\"Debian 13 \u3067\u5c0e\u5165\u3055\u308c\u305f \/tmp \u306e tmpfs \u5316\u306b\u4f34\u3046\u307e\u3068\u3081 \u306b\u3064\u3044\u3066\u3055\u3089\u306b\u8aad\u3080\">\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-3012","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/posts\/3012","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/comments?post=3012"}],"version-history":[{"count":1,"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/posts\/3012\/revisions"}],"predecessor-version":[{"id":3013,"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/posts\/3012\/revisions\/3013"}],"wp:attachment":[{"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/media?parent=3012"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/categories?post=3012"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.id774.net\/entry\/wp-json\/wp\/v2\/tags?post=3012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}