Centos "このドキュメントの一時ファイルを作成できませんでした。読み取り専用ファイルシステム"

Centos "このドキュメントの一時ファイルを作成できませんでした。読み取り専用ファイルシステム"

サーバーで何をしようとしても、このエラーが発生します。

cannot create temp file for here-document: Read-only file system

cpanel、whm、およびすべてのウェブサイトがダウンしました。

私のシステムファイルはすべて読み取り専用です。役に立つものを検索しましたが、うまくいきません:(

200Gの空きディスク容量があります。私のOSはWHM(Cpanel)を含むCentosです。 Hetzner Data Centerにあります。 Rescueは役に立ちませんでした。

/etc/fstab は読み取り専用なので編集できません。

vim /etc/fstab

私のディスクは

[root@server ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs         32G     0   32G   0% /dev
tmpfs            32G   25M   32G   1% /run
tmpfs            32G     0   32G   0% /sys/fs/cgroup
/dev/md2        874G  545G  285G  66% /
tmpfs           6.3G     0  6.3G   0% /run/user/0

再インストールしてみましたが、やはり動作しませんでした。

mount -o remount,rw /

「dmesgの出力テール|」

[    3.576436] IPv6: ADDRCONF(NETDEV_UP): enp0s31f6: link is not ready
[    6.969821] e1000e: enp0s31f6 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[    6.970035] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s31f6: link becomes ready
[   10.124036] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   10.140747] nf_conntrack version 0.5.0 (65536 buckets, 262144 max)
[   42.683041] systemd-readahead[566]: Failed to open pack file: Read-only file system
[   60.065749] ip_set: protocol 7
[  302.063222] EXT4-fs (md2): error count since last fsck: 354
[  302.063288] EXT4-fs (md2): initial error at time 1622194023: ext4_xattr_block_get:321: inode 37361099
[  302.063461] EXT4-fs (md2): last error at time 1660967530: ext4_xattr_block_get:321: inode 37358850

"journalctl -xe"の出力

[root@server ~]# journalctl -xe
Jan 20 19:31:31 server.mm.com rsyslogd[1205]: action 'action 1' suspended, next retry is Fri Jan 20 19:32:01 2023 [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2007 ]
Jan 20 19:31:31 server.mm.com rsyslogd[1205]: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]
Jan 20 19:31:31 server.mm.com PAM-hulk[5183]: failed to connect stream socket
Jan 20 19:31:31 server.mm.com sshd[5183]: pam_unix(sshd:auth): check pass; user unknown
Jan 20 19:31:31 server.mm.com sshd[5183]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=46.101.248.68
Jan 20 19:31:31 server.mm.com rsyslogd[1205]: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]
Jan 20 19:31:31 server.mm.com rsyslogd[1205]: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]
Jan 20 19:31:32 server.mm.com sshd[5183]: Failed password for invalid user amssys from 46.101.248.68 port 38188 ssh2
Jan 20 19:31:32 server.mm.com sshd[5183]: Received disconnect from 46.101.248.68 port 38188:11: Bye Bye [preauth]
Jan 20 19:31:32 server.mm.com sshd[5183]: Disconnected from 46.101.248.68 port 38188 [preauth]
Jan 20 19:31:33 server.mm.com PAM-hulk[5182]: failed to connect stream socket
Jan 20 19:31:33 server.mm.com sshd[5182]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=61.177.173.39  user=root
Jan 20 19:31:33 server.mm.com sshd[5182]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Jan 20 19:31:33 server.mm.com rsyslogd[1205]: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]
Jan 20 19:31:34 server.mm.com sshd[5189]: Invalid user netadmin from 43.134.40.99 port 42568
Jan 20 19:31:34 server.mm.com sshd[5189]: input_userauth_request: invalid user netadmin [preauth]
Jan 20 19:31:34 server.mm.com PAM-hulk[5189]: failed to connect stream socket
Jan 20 19:31:34 server.mm.com sshd[5189]: pam_unix(sshd:auth): check pass; user unknown
Jan 20 19:31:34 server.mm.com sshd[5189]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=43.134.40.99
Jan 20 19:31:35 server.mm.com sshd[5182]: Failed password for root from 61.177.173.39 port 58331 ssh2
Jan 20 19:31:36 server.mm.com PAM-hulk[5182]: failed to connect stream socket
Jan 20 19:31:36 server.mm.com sshd[5182]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Jan 20 19:31:37 server.mm.com sshd[5189]: Failed password for invalid user netadmin from 43.134.40.99 port 42568 ssh2
Jan 20 19:31:37 server.mm.com rsyslogd[1205]: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]
Jan 20 19:31:37 server.mm.com sshd[5189]: Received disconnect from 43.134.40.99 port 42568:11: Bye Bye [preauth]
Jan 20 19:31:37 server.mm.com sshd[5189]: Disconnected from 43.134.40.99 port 42568 [preauth]
Jan 20 19:31:38 server.mm.com sshd[5182]: Failed password for root from 61.177.173.39 port 58331 ssh2
Jan 20 19:31:38 server.mm.com PAM-hulk[5182]: failed to connect stream socket
Jan 20 19:31:38 server.mm.com sshd[5182]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com systemd[1]: Started clamd antivirus daemon.
-- Subject: Unit clamd.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit clamd.service has finished starting up.
-- 
-- The start-up result is done.
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: action 'action 0' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2359 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: file '/var/log/messages': open error: Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2433 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: action 'action 0' suspended, next retry is Fri Jan 20 19:35:06 2023 [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2007 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]
Jan 20 19:34:36 server.mm.com rsyslogd[1205]: imjournal: fopen() failed for path: '/var/lib/rsyslog/imjournal.state.tmp': Read-only file system [v8.24.0-57.el7_9.3 try http://www.rsyslog.com/e/2013 ]

解決済み: Hetznerサポートチームに連絡したところ、問題は解決しました。本当にありがとうございました!

Please use the following wiki guide to run the file system check:

-----------------%<-----------------
https://docs.hetzner.com/robot/dedicated-server/troubleshooting/filesystem-check/

答え1

rw権限で再マウントできない場合は、リカバリモードでサーバーを起動し、パーティションでファイルシステムチェック(fsck)を実行してから再マウントしてみてください。 e2fsck -p /dev/sda1コマンドを使用してファイルシステムの回復を試みることもできます(/dev/sda1が問題のあるパーティションであると仮定)。

関連情報