修复文件系统
1.环境描述:
在Linux系统中,非正常关机,突然断电,设备数据读写异常等原因导致文件系统的破坏。比较常见的是超级块(supper-block)损坏。
2.名词解释:
超级块--文件系统的核心“档案”,它记录了该文件系统的类型,大小,空闲磁盘块等信息,类似Windows的分区表。
[root@zjz ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xb0427ca8.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e

当Linux系统遇到非正常关机或设备异常时,可能导致文件系统损坏,尤其是超级块。本文通过环境描述和名词解释,展示了如何使用fdisk创建分区,mkfs.ext4格式化,以及fsck修复损坏的超级块,最后通过mount和fsck命令来尝试挂载和检查文件系统。
最低0.47元/天 解锁文章
3010

被折叠的 条评论
为什么被折叠?



