問題:
centos重啟后,無法正常ssh登陸,也無法ping通,實地操作出現如下提示:

輸入登陸密碼,重啟sshd服務,出現提示“read-only file system”,重啟network服務問題依舊:

分析:
結合以上兩點信息,大致可以判斷出現這種問題有幾種原因:1硬盤壞了;2硬件不兼容;3人為操作改動;
解決辦法:
1嘗試ssh登陸服務器:
啟動ssh相關服務,即network 、sshd ,即使有錯誤提示,服務依然可以被成功啟動,不影響使用:

2登陸crt查看開機服務與服務端口狀態:
使用chkconfig查看本地服務,沒有異常;但是使用netstat 查看本地服務端口,發現是全部關閉的;
3進行磁盤修復:
使用fsck檢查和維護不一致的文件系統,點選“yes”
[root@Centos ~]# fsck fsck from util-linux-ng 2.17.2 e2fsck 1.41.12 (17-May-2010) /dev/sda2 contains a file system with errors, 強制檢查. 第一步: 檢查inode,塊,和大小 第二步: 檢查目錄結構 第3步: 檢查目錄連接性 Pass 4: Checking reference counts 第5步: 檢查簇概要信息 塊位圖差異: -(561863--561885) -(1096960--1097067) -(1116272--1116512) -(1117898--1118374) -(1642496--1642506) -1648639 -(2218497--2218498) -2218500 -2218605 -2218608 處理<y>? 是 Free 塊s count wrong for 簇 #17 (22913, counted=22936). 處理<y>? 是 Free 塊s count wrong for 簇 #33 (0, counted=108). 處理<y>? 是 Free 塊s count wrong for 簇 #34 (0, counted=718). 處理<y>? 是 Free 塊s count wrong for 簇 #50 (27079, counted=27091). 處理<y>? 是 Free 塊s count wrong for 簇 #67 (14633, counted=14638). 處理<y>? 是 Free 塊s count wrong (4465830, counted=4466696). 處理<y>? 是 Inode位圖差異: -131475 -263939 -265119 -265121 -393388 -661151 處理<y>? 是 Free inodes count wrong for 簇 #16 (6455, counted=6456). 處理<y>? 是 Free inodes count wrong for 簇 #32 (0, counted=3). 處理<y>? 是 Free inodes count wrong for 簇 #48 (5, counted=6). 處理<y>? 是 Free inodes count wrong for 簇 #80 (0, counted=1). 處理<y>? 是 Free inodes count wrong (1172502, counted=1172508). 處理<y>? 是 /dev/sda2: ***** 文件系統已修改 ***** /dev/sda2: ***** 重新啟動 LINUX ***** /dev/sda2: 72676/1245184 files (0.5% non-contiguous), 513784/4980480 blocks
4系統修復完畢,重啟服務器,再次查看服務端口,恢復正常;
[root@Centos ~]# netstat -luntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 966/rpcbind tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 1165/perl tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1038/sshd tcp 0 0 0.0.0.0:35702 0.0.0.0:* LISTEN 984/rpc.statd tcp 0 0 0.0.0.0:3128 0.0.0.0:* LISTEN 1121/(squid) tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1062/sendmail tcp 0 0 0.0.0.0:873 0.0.0.0:* LISTEN 1130/rsync tcp 0 0 :::111 :::* LISTEN 966/rpcbind tcp 0 0 :::80 :::* LISTEN 1096/httpd tcp 0 0 :::58067 :::* LISTEN 984/rpc.statd tcp 0 0 :::22 :::* LISTEN 1038/sshd tcp 0 0 :::873 :::* LISTEN 1130/rsync udp 0 0 0.0.0.0:111 0.0.0.0:* 966/rpcbind udp 0 0 0.0.0.0:10000 0.0.0.0:* 1165/perl udp 0 0 0.0.0.0:34227 0.0.0.0:* 1121/(squid) udp 0 0 0.0.0.0:717 0.0.0.0:* 966/rpcbind udp 0 0 0.0.0.0:37968 0.0.0.0:* 984/rpc.statd udp 0 0 0.0.0.0:736 0.0.0.0:* 984/rpc.statd udp 0 0 :::111 :::* 966/rpcbind udp 0 0 :::58520 :::* 1121/(squid) udp 0 0 :::717 :::* 966/rpcbind udp 0 0 :::59859 :::* 984/rpc.statd
