linux虚拟机突然变成只读模式,任何文件都不能保存的问题解决

您所在的位置:网站首页 硬盘可读不可写怎么解决 linux虚拟机突然变成只读模式,任何文件都不能保存的问题解决

linux虚拟机突然变成只读模式,任何文件都不能保存的问题解决

2023-11-04 03:43| 来源: 网络整理| 查看: 265

虚拟机用着用着,某一天突然文件系统大部分都变成只读了,真让人头疼

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

 

用 fsck 进行检查并修复、果然发现并修复了很多的问题。reboot 重启后一切问题都解决了。

root@hdp-01:~# fsck / fsck from util-linux 2.31.1 e2fsck 1.44.1 (24-Mar-2018) /dev/sda2 contains a file system with errors, check forced. Pass 1: Checking inodes, blocks, and sizes HTREE directory inode 1062887 has an invalid root node. Clear HTree index? yes HTREE directory inode 1063356 has an invalid root node. Clear HTree index? yes Deleted inode 1966091 has zero dtime. Fix? yes Inodes that were part of a corrupted orphan linked list found. Fix? yes Inode 1966092 was part of the orphaned inode list. FIXED. Inode 1966093 was part of the orphaned inode list. FIXED. Inode 1966094 was part of the orphaned inode list. FIXED. Inode 1966095 was part of the orphaned inode list. FIXED. Inode 1966161 was part of the orphaned inode list. FIXED. Pass 2: Checking directory structure Directory inode 1063356, block #0, offset 0: directory corrupted Salvage? yes Missing '.' in directory inode 1063356. Fix? yes Setting filetype for entry '.' in ??? (1063356) to 2. Missing '..' in directory inode 1063356. Fix? yes Setting filetype for entry '..' in ??? (1063356) to 2. Directory inode 1062887, block #0, offset 0: directory corrupted Salvage? yes Missing '.' in directory inode 1062887. Fix? yes

 

那么为什么变成只读模式呢?原来是前一天电脑突然意外关机了,而虚拟机中还正在运行着,导致了虚拟硬盘出现了文件紊乱

 

 

 

 

 

 

 

 

 

 

 

 



【本文地址】


今日新闻


推荐新闻


    CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3