linux – fsck文件中的文件系统

linux – fsck文件中的文件系统,第1张

概述我创建了一个像这样的文件系统: dd if=/dev/zero of=disk-image count=40960 使用以下方法创建filesystem: /sbin/mkfs -t ext3 -q disk-image 然后我挂载并复制了一些测试文件并卸载如下: mount -o loop disk.image foocp "something" foosudo umount foo 然后我 我创建了一个像这样的文件系统:
dd if=/dev/zero of=disk-image count=40960

使用以下方法创建filesystem:

/sbin/mkfs -t ext3 -q disk-image

然后我挂载并复制了一些测试文件并卸载如下:

mount -o loop disk.image foocp "something" foosudo umount foo

然后我运行一个返回的e2fsck -c -c disk-image

"Pass 1: Checking inodes,blocks,and sizesInode 185,i_size is 16384,should be 17408.  Fix<y>? yes

我的问题,因为这是一个文件而不是块设备,上面的警告是我应该担心的.

如何在文件中的文件系统上执行fsck?

解决方法 您只需运行e2fsck并指定映像文件,就像使用块设备一样.我不确定你为什么使用-c选项(这会检查badblocks).
% e2fsck -f ext3.imge2fsck 1.42 (29-Nov-2011)Pass 1: Checking inodes,and sizesPass 2: Checking directory structurePass 3: Checking directory connectivityPass 4: Checking reference countsPass 5: Checking group summary informationext3.img: 11/25688 files (0.0% non-contiguous),8913/102400 blocks
总结

以上是内存溢出为你收集整理的linux – fsck文件中的文件系统全部内容,希望文章能够帮你解决linux – fsck文件中的文件系统所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/1040501.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-24
下一篇2022-05-24

发表评论

登录后才能评论

评论列表(0条)

    保存