个人工具

UbuntuHelp:TestingStorageMedia/zh

来自Ubuntu中文

Fideas讨论 | 贡献2007年5月18日 (五) 20:42的版本 简述

跳转至: 导航, 搜索

本文讲述当你怀疑自己的硬盘出现某些问题时,如果对其进行检测.

简述

当你通过计算机存储你的图片或文档文件时,它们将以某种形式记录在你的物理存储器上.比如转化为磁性信号然后存取于硬盘上,或是通过光信号存取于光盘上,或是转换为电流信息存取于U盘.无论是哪种方式,都可以把它比拟为是往某个文件柜中存放文档.

任何事物都不是完美的,你有可能会碰到两个问题:你的文件丢失-你的文件变得无比混乱,甚至根本无法正常读取,或者是你的存储介质发出故障-比如硬盘坏道,光盘腐蚀.

当然,当遇到这些情况的时候,有些工具是可以帮助进行错误检测和修复的,本文就是向你介绍这些工具,以便在你发生上述不幸时给予一些帮助.切记,要经常在一个独立的设备上备份你的最新文件.

检测文件系统

On occasion, errors may occur in the data stored on a disk. This may be due for example to power failures, system crashes or impetuous removal of media. When this happens, files may become lost or corrupt - you will need to check your data for validity.

The tools used to check your data depend on your filesystem, please refer to the approriate section.

ext2 and ext3

In a terminal run :

man e2fsck

to consult the documentation related to testing there partitions.

FAT32和FAT16的检测

To check and repair MS-DOS type filesystem, we will use the dosfsck tool. In a terminal, type the fooling to know the name of the partition you want to check :

sudo fdisk -l

No we will run the check with the following command (assuming your partition is /dev/hda1) :

dosfsck -a -v /dev/sda1
  • The a option is use to automatically repair the file system.
  • The v option is use to get some more information about the check.

You may have a look at :

man dosfsck

to get some information about the others options available.

NTFS的检测

Their is no equivalent yet to chkdsk/scandisk for NTFS in linux.

The linux-ntfs team project to make one.

Check http://wiki.linux-ntfs.org/doku.php?id=ntfsck for the current status of the project.

In the meanwhile, you'll have to use windows to check your NTFS partition.

Checking for Physical defects

In a terminal run :

man badblocks

to consult the documentation related to testing disks.

数据恢复

TestDisk is a tool for recovering lost data, click on the previous link to visit their website.

You may also find this in the Universe repository here.

深入学习


This page is a stub, you can help the Ubuntu documentation team by expanding it.