superblock(Linux下如何恢复EXT3 Superblock)
本文目录
Linux下如何恢复EXT3 Superblock
Linux下恢复EXT3 Superblock方法:1 获取错误的出错磁盘(或者设备)块的大小.有很多种方法可以得到. 比如,# tune2fs -l /dev/hda4其实大多数情况下是 1 K.2 对当前的出错磁盘备份.恢复超级块(Superblock)的过程其实也是一个有风险的过程.能做备份就做好备份. 如果有其他空闲设备, 用 dd 命令把该设备上的内容备份起来.3 一般来说, 超级块错基本上也就是主超级块错, 在 Ext2/Ext3 文件系统创建的时候, 会同时在屏幕上提示我们在已经在几个地方备份了超级块.那么怎么发现这些超级块在什么地方呢? 我们看看帮助信息:-b superblockInstead of using the normal superblock, use an alternativesuperblock specified by superblock. This option is normallyused when the primary superblock has been corrupted. The loca-tion of the backup superblock is dependent on the filesystem’sblocksize. For filesystems with 1k blocksizes, a backupsuperblock can be found at block 8193; for filesystems with 2kblocksizes, at block 16384; and for 4k blocksizes, at block32768.Additional backup superblocks can be determined by using themke2fs program using the -n option to print out where thesuperblocks were created. The -b option to mke2fs, which spec-ifies blocksize of the filesystem must be specified in order forthe superblock locations that are printed out to be accurate.If an alternative superblock is specified and the filesystem isnot opened read-only, e2fsck will make sure that the primarysuperblock is updated appropriately upon completion of thefilesystem check.4 开始恢复.如果文件系统块大小为1K, 则我们可以用如下命令恢复:# /sbin/fsck.ext3 -b 8193 /dev/hda4如果这个备用块(8193)也有问题,那么 可以尝试 24577(8192*3 1) ,或者是 40961 (8192*5 1).可能您也会看出来,超级块的保存位置是按照 1,3,5,7 这样的规律的. 具体的位置在 BlockSize(8192)*N 1. 在超过 500M 的空间上是这样的规律
linux下错误测试硬盘读写导致superblock损坏,怎么修复
fsck(filesystemcheck)用来检查和维护不一致的文件系统。若系统掉电或磁盘发生问题,可利用fsck命令对文件系统进行检查Linux技巧:使用Fsck命令修复损坏的分区输入Root密码登录后采用:fsck-text3-r/usr/local修复fsck的命令的几个使用方法指令:fsck使用权限:超级使用者root使用方式:fsck说明:检查与修复Linux文件系统,可以同时检查一个或多个Linux档案系统
更多文章:

drawnull是什么函数(请问如何将通达信公式中DRAWNULL函数替换至同花顺,同花顺没有定义RAWNULL不然画出的线影响判断)
2025年3月30日 16:40

medicine什么意思(medicine这个词是什么意思)
2025年2月14日 07:10

socks5什么意思(什么是代理服务器,socks5代理是什么)
2025年3月23日 00:20

#003366;#FFFFFF;#000000请问以上这些颜色代码,的含义?十六进制颜色代码表
2025年4月15日 18:20

excel怎么生成随机数(excel中如何生成指定数量的随机数,)
2025年2月14日 16:40

正则表达式保留部分内容替换(如何使用正则表达式把一个字符串中的某些内容替换掉)
2025年3月23日 20:50

if语句和switch语句(C语言中if 和switch 区别)
2025年2月14日 12:10

oracle数据库教学视频(初入职场,对于java开发,对Oracle数据库要学习到什么程度)
2025年3月29日 08:10