天天看點

centos ll 指令提示Input/output error

在内網一台伺服器上面操作,忽然敲打一個ll指令提示Input/output error 

Ls,pwd常用指令都報這個錯;

ssh -v [email protected]

OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017

debug1: Reading configuration data /home/common/.ssh/config

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: /etc/ssh/ssh_config line 58: Applying options for *

debug1: Connecting to 192.168.1.236 [192.168.1.236] port 22.

debug1: Connection established.

debug1: identity file /home/common/.ssh/id_rsa type 1

debug1: key_load_public: No such file or directory

debug1: identity file /home/common/.ssh/id_rsa-cert type -1

debug1: identity file /home/common/.ssh/id_dsa type -1

debug1: identity file /home/common/.ssh/id_dsa-cert type -1

debug1: identity file /home/common/.ssh/id_ecdsa type -1

debug1: identity file /home/common/.ssh/id_ecdsa-cert type -1

debug1: identity file /home/common/.ssh/id_ed25519 type -1

debug1: identity file /home/common/.ssh/id_ed25519-cert type -1

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_7.4

ssh_exchange_identification: read: Connection reset by peer

提示ssh_exchange_identification: read: Connection reset by peer;

df –h指令也報錯不能用,reboot都報錯,隻好到伺服器那邊瞧瞧,dell屏顯提示提示E1810 Hard Drive 2 fault Review&clear SEL,第二塊硬碟黃燈閃着确實不正常,第一反應完蛋硬碟挂了,記得這個機器做過raid,内網機器不怕資料丢失問題,直接熱插拔一下黃燈硬碟,觀察一會,似乎狀态正常了,似乎有一線生機還能用。

接顯示器一看螢幕都是i/o error block x026160一堆錯誤,重新開機了伺服器希望伺服器還有救,重新開機以後伺服器找不到系統了提示:strike F1 to retry boot.F2 for system startup  F11 for bios manager.杯具;dell 熱插拔硬碟是可以自動建立raid的,再看看硬碟訓示燈是正常的,至少現在不用換硬碟,按着提示進bios一陣操作沒效果,依舊找不到系統,在萬能的網絡幫助下最後隻能BIOS初始化了,在開機看到delll圖示時候按着F2進入BIOS,然後把鍵盤三個鍵 大寫鎖(cap lock),數位鎖定(Num lock),滾動鎖定(Scrolock)都點亮,然後依次按着 ALT+E,ALT+F,ALT+B,按完ALT+B以後機器自動重新開機,即恢複了BIOS的操作;

重新開機以後熟悉的centos系統又出現了。

Ps:ssh_exchange_identification: read: Connection reset by peer報錯:

可能密碼錯誤過多被伺服器拒絕拉黑了,

Vim /etchosts.allow

注釋掉,添加:sshd:ALL

重新開機sshd應該可以了;

重新開機伺服器,reboot,init不能用時候,執行:

1.執行:

echo 1 > /proc/sys/kernel/sysrq

"magic SysRq key"提供了一個通過/proc來直接給核心發送指令的方法。要啟用該特性,隻需在核心編譯的時候啟用"CONFIG_MAGIC_SYSRQ"這個選項,而一般發行版的标準核心都已經啟用了。激活這個選項。

2.需要重新開機的時候,隻需要執行

echo b > /proc/sysrq-trigger

裝置馬上重新開機。

有時候Read from remote host 192.168.1.236: Connection reset by peer Connection to 192.168.1.236 closed.  伺服器能ping通,端口也通就是上不去:

1.ssh檔案權限太大:cd /var/empty

chmod -R 755 * 

2. 如果ssh client 視窗在幾分鐘内沒有鍵盤操作的時候 會話就會逾時斷線,通過修改sshd的配置檔案 能夠讓ssh server 發送“心跳”信号來維持持續連結,;

繼續閱讀