fsck

fsck

fsckfilesystem check)用来检查和维护不一致的文件系统。若系统掉电或磁盘发生问题,可利用fsck命令对文件系统进行检查

Linux技巧:使用Fsck命令修复损坏的分区

输入Root密码登录后采用:fsck–t ext3 -r /usr/local修复

fsck的命令的几个使用方法

指令:fsck

使用权限 :超级使用者 root

使用方式 :fsck [-sACVRP] [-t fstype] [–] [fsck-options] filesys […]

说明 : 检查与修复 Linux档案系统,可以同时检查一个或多个 Linux档案系统

参数 :

filesysdevice名称(eg./dev/sda1)mount(eg. / /usr)

-t: 给定档案系统的型式,若在 /etc/fstab中已有定义或kernel本身已支援的则不需加上此参数

-s: 依序一个一个地执行 fsck的指令来检查

-A: /etc/fstab 中所有列出来的partition做检查

-C: 显示完整的检查进度

-d: 列印 e2fsckdebug 结果

-p: 同时有 -A 条件时,同时有多个fsck的检查一起执行

-R: 同时有 -A 条件时,省略/不检查

-V: 详细显示模式

-a: 如果检查有错则自动修复

-r: 如果检查有错则由使用者回答是否修复

-y:选项指定检测每个文件是自动输入yes,在不确定那些是不正常的时候,可以执行# fsck -y全部检查修复。[1]

例子 :

检查 msdos档案系统的/dev/hda5是否正常,如果有异常便自动修复 :fsck-t msdos -a /dev/hda5

注意 :

此指令可与 /etc/fstab相互参考操作来加以了解。

简介与应用

Thesystem utility fsck (for "file system check" or "filesystem consistency check") is a tool for checking theconsistency of a file system in the Unix system and clones thereof.

Generally,fsck is run automatically at boot time when the system detects thata file system is in an inconsistent state, indicating a non-gracefulshutdown, such as a crash or power loss. Typically, fsck utilitiesprovide options for either interactively repairing damaged filesystems (the user must decide how to fix specific problems),automatically deciding how to fix specific problems (so the userdoesn't have to answer any questions), or reviewing the problemsthat need to be resolved on a file system without actually fixingthem.

Fsckcan also be run manually by the system administrator if there isbelieved to be a problem with the file system. However, running fsckon a mounted file system can potentially cause severe datacorruption/loss.

Ajournaling file system is designed such that tools such as fsck donot need to be run as often. The UFS2 Filesystem in FreeBSD hasbackground fsck, so it is usually not necessary to wait for fsck tofinish before accessing the disk.

TheMicrosoft equivalent programs are scandisk and chkdsk. In DOS,chkdsk was used to check file system integrity, but later versionsalso featured a tool called scandisk for checking disk surface forbad sectors. Windows 95, Windows 98 and Windows Me featured aversion of scandisk which ran natively in the Windows environment.The Windows NT series, including NT 4, Windows 2000, and Windows XPall use a modern, updated version of chkdsk which performs both disksurface and file system scanning, though its disk-surface check isless thorough than scandisk's.

Useas profanity

Beforethe rise of journaling file systems, it was not uncommon for animproperly shut-down Unix system's file system to develop acorrupted superblock. This possibly serious problem could only beresolved by running fsck, which could take anywhere from a fewseconds to hours, depending on the volume's size. Because of theseverity of fsck not being able to resolve this error, the terms"fsck" and "fscked" have come into use amongUnix system administrators as a minced oath. When one is told "Gofsck yourself!" the meaning implied is to "go away,analyze yourself, and fix your problems", mirroring fsck'sprimary function.

Itis unclear whether this usage was cause or effect, as it has beenanecdotally reported that Dennis Ritchie has claimed "Thesecond letter was originally different." [1]

Pronunciation

Likemany computer jargon terms without vowels, fsck is essentiallyunpronounceable in most languages and so people are forced toimprovise when speaking it aloud. It can be pronounced "F-S-C-K,""F-S-check," "fisk," "fizik,""fuss-uck," "fizz-uck," "fozz-uck,""F-sick," "F-suck" (associated with how long ittakes to run [2]), "F-sek," or "fusk." Someprefer to just pronounce it as "fuck".

References

^Google USENET archive of a 1998 post to alt.sysadmin.recovery

^Example Google Groups post

Externallinks

manfsck

Checkingand Repairing File system with fsck

JargonFile entry: fscking

Themany faces of fsck



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值