서버에서 무엇을 하려고 해도 이 오류가 발생합니다.
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이 문제가 있는 파티션이라고 가정).