修复文件系统实验

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


修复文件系统
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
Com

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值