Home > linux基础 > 磁盘检验:fsck与badblocks


[[email protected] /]# fsck -C -f -t ext3 /dev/xvdc
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
yqf: 11/1245184 files (0.0% non-contiguous), 116264/2490368 blocks

上面是对我新建的linode磁盘/dev/xvdc运用fsck进行磁盘检验,检验磁盘的时候,记得卸载磁盘,umount /dev/xvdc,磁盘不出问题不要操作fsck。

[[email protected] /]# fsck -C -f -A -a -t ext3 /dev/xvdc
fsck from util-linux-ng 2.17.2
/dev/xvda is mounted.

WARNING!!!  The filesystem is mounted.   If you continue you ***WILL***
cause ***SEVERE*** filesystem damage.

Do you really want to continue (y/n)? yes

/dev/xvda: recovering journal

/dev/xvda: ***** REBOOT LINUX *****
/dev/xvda: 27247/1313280 files (0.1% non-contiguous), 187541/2621440 blocks


[[email protected] /]# badblocks -sv /dev/xvdc
Checking blocks 0 to 9961471
Checking for bad blocks (read-only test): done
Pass completed, 0 bad blocks found.

若非注明,本博客内容均为原创或翻译自Linode Library,教程默认Centos为linux发行版,转载请注明转自linode中文教程www.linode.im。linode中文教程QQ群:185393826,一起讨论linode及linux,linode中文教程、linode代购、linode合租、linode推介、linode返佣、linode优惠。日本VPS、美国VPS、海外独立服务器代购均在linode.im。

  1. No comments yet.
  1. No trackbacks yet.