linux系統(tǒng)變?yōu)橹蛔x出現(xiàn)提示Read-only file system的解決辦法問題描述:linux系統(tǒng)變?yōu)橹蛔x,出現(xiàn)提示Read-only file system, 如圖所示:
問題原因:系統(tǒng)沒有正常關(guān)機,導致虛擬磁盤出現(xiàn)文件系統(tǒng)錯誤. 說明:此修復可能會導致個別文件及數(shù)據(jù)丟失,修復之前建議做好文件備份工作. 解決方法:使用 fsck 手動修復磁盤文件,具體操作如下:
1.使用mount查看磁盤加載情況 mount: 用于查看哪個模塊輸入只讀,一般顯示為: [root@localhost ~]# mount sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) mqueue on /dev/mqueue type mqueue (rw,relatime) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime) tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=388136k,mode=700) /dev/vdb1 on /home type ext4 (ro,relatime,data=ordered) [root@localhost ~]# 查看ro掛載的分區(qū),如果發(fā)現(xiàn)有ro說明此磁盤是只讀狀態(tài)(最好也檢查下/etc/fstab查看配置文件是否就已經(jīng)設置為只讀掛載權(quán)限) 2.卸載只讀分區(qū) [root@localhost ~]#umount /dev/vdb1 如果發(fā)現(xiàn)有提示“device is busy”,找到是什么進程使得他busy 比如可執(zhí)行/etc/init.d/httpd stop 等命令停止正在運行的一些服務 fuser -m /home 將會顯示使用這個模塊的pid fuser -mk /home 將會直接kill那個pid
3.fsck修復磁盤文件 [root@localhost ~]#fsck -fvy /home 修復異常的磁盤分區(qū)
然后重新mount即可。 4、直接remount或者是mount -a,命令為 [root@localhost ~]# mount -o rw,remount /home 最后啟動開始停止的服務/etc/init.d/httpd start也可執(zhí)行reboot重啟下服務器讓系統(tǒng)自動啟動運行的服務.
|
|||||
| >> 相關(guān)文章 | |||||
|
|
|||||
400-028-5800
028-62778877
您好,非正常上班時間若有緊急技術(shù)問題,請撥總機后按7號鍵, 其他問題請?zhí)峤还位蛟谏习鄷r間聯(lián)系,謝謝支持!