茫茫網海中的冷日 - 對這文章發表回應
茫茫網海中的冷日
         
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已!
 恭喜您是本站第 1675595 位訪客!  登入  | 註冊
主選單

Google 自訂搜尋

Goole 廣告

隨機相片
IMG_DPP_0060.jpg

授權條款

使用者登入
使用者名稱:

密碼:


忘了密碼?

現在就註冊!

對這文章發表回應

發表限制: 非會員 可以發表

發表者: 冷日 發表時間: 2018/10/3 6:01:46
用fsck檢查、修復linux檔案系統

今天突然發現開機時會顯示正在fsck filesystem,隨著錯誤訊息說明,查看該檔案,
Routine check of drives:/dev/sda1...

Press ESC to skip                 10%(stage 5/5,)

進入終端機裡,
frle@frle-desktop:~$ cat /var/log/fsck/checkfs
Log of fsck -C3 -R -A -a
Sat Oct 25 08:43:53 2008

fsck 1.40.8 (13-Mar-2008)
/dev/sda5 contains a file system with errors, check forced.
/dev/sda5: Unattached inode 147721

/dev/sda5: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
    (i.e., without -a or -p options)
fsck died with exit status 4

Sat Oct 25 08:43:59 2008
------------------------------------------------------------------------

frle@frle-desktop:~$ fsck --help
fsck 1.40.8 (13-Mar-2008)
fsck.ext3: 不適用的選項 -- h
Usage: fsck.ext3 [-panyrcdfvstDFSV] [-b superblock] [-B blocksize]
        [-I inode_buffer_blocks] [-P process_inode_size]
        [-l|-L bad_blocks_file] [-C fd] [-j external_journal]
        [-E extended-options] device

Emergency help:
 -p                   Automatic repair (no questions)
 -n                   Make no changes to the filesystem
 -y                   Assume "yes" to all questions
 -c                   Check for bad blocks and add them to the badblock list
 -f                   Force checking even if filesystem is marked clean
 -v                   Be verbose
 -b superblock        Use alternative superblock
 -B blocksize         Force blocksize when looking for superblock
 -j external_journal  Set location of the external journal
 -l bad_blocks_file   Add to badblocks list
 -L bad_blocks_file   Set badblocks list

---------------------------------------------------------------------------

-p 自動修復檔案系統,不回答任何問題
-n 不要真正執行,只看執行時會做那些動做
-y 自動回答 "yes" 給每次詢問
-c 檢查出壞區塊並且紀錄在清單中
-f 連被標示的區塊都檢查

硬碟有問題!趕快用 fsck 指令修復,※僅管理者的身份才有權限能執行喔,
frle@frle-desktop:~$ sudo fsck -c /dev/sda5
[sudo] password for frle:
fsck 1.40.8 (13-Mar-2008)
e2fsck 1.40.8 (13-Mar-2008)
/dev/sda5 is mounted.

WARNING!!!  Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

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

/dev/sda5: recovering journal
Checking for bad blocks (read-only test): done
/dev/sda5: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Inode 261125, i_size is 1507331, should be 1523712.  Fix? yes

Inode 261125, i_blocks is 2960, should be 2984.  Fix? yes

Pass 2: Checking directory structure
Entry '4E2F0A0Fd01' in /frle/.mozilla/firefox/3o0bvab4.default/Cache (261123)
has deleted/unused inode 261409.  Clear? yes

Entry '38126154d01' in /frle/.mozilla/firefox/3o0bvab4.default/Cache (261123)
has deleted/unused inode 261410.  Clear? yes

Entry '785B9565d01' in /frle/.mozilla/firefox/3o0bvab4.default/Cache (261123)
has deleted/unused inode 261408.  Clear? yes

Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Unattached inode 147721
Connect to /lost+found? yes

Inode 147721 ref count is 2, should be 1.  Fix? yes

Unattached inode 148268
Connect to /lost+found? yes

Inode 148268 ref count is 2, should be 1.  Fix? yes

Unattached inode 148275
Connect to /lost+found? yes

Inode 148275 ref count is 2, should be 1.  Fix? yes

Unattached inode 148277
Connect to /lost+found? yes

Inode 148277 ref count is 2, should be 1.  Fix? yes

Unattached inode 148279
Connect to /lost+found? yes

Inode 148279 ref count is 2, should be 1.  Fix? yes

Unattached inode 148287
Connect to /lost+found? yes

Inode 148287 ref count is 2, should be 1.  Fix? yes

Pass 5: Checking group summary information
Block bitmap differences:  -(590351--590352) -591886 +591890 +(591933--591935)
+(591937--591938) +(591944--591946) -592443 -592445 -594424 -596009 -(596016--596018)
-(596026--596027) -(596029--596035) -(596037--596051) -(596064--596079) -(596081--596101)
-(596105--596139) -(596259--596260) -(596272--596279) -(596305--596310) -(596354--596355)
-(597220--597223) -597231 -(597773--598015) -598053 -598111 -598129 -600086 -602162
-602164 -(602166--602169) -(602175--602185) -602420 -602457 -(602464--602480)
-(602752--602755) -(602757--602763) -(602771--602776) -(602790--602801) -602803
-(602806--602817) -(602842--602873) -(602906--602969) -(603034--603161) -(603290--603545)
-(603802--604159) -604211 -(604220--604221) -(604232--604234) -(604237--604246)
-604249 -(604254--604257) -(604259--604313) -(604763--604766) -(604775--604790)
-(604807--604838) -(604871--604934) -605012 -(605127--605254) -(605511--605766)
-(606290--606297) -(606302--606305) -606309 -(606314--606324) -(608339--608340)
-608343 -(608346--608348) -(608350--608354) -(608356--608385) -608527 -610313 -610315
-610320 -(611399--611401) -(611406--611408) -(611411--611413) -(611438--611444)
-613319 -613327 -613379 -615027 -615029 -616132 -616485 -(616533--616534) -616536
-(616538--616539) -(616541--616542) -616649 -621187 +(621189--621190) -622192
-(622194--622197) +(622198--622206) +(622218--622224) +622242 +(622244--622247)
+622249 -(622250--622268) -630110 -630477 -(635972--635973) -(636662--636663)
-637175 -(638197--638198) -638756 -(638804--638805) -638808 -638819 -638856 -638861
-638867 -638883 -638998 -(639011--639015) -639017 -(639019--639022) -639024 -(639101--639104)
-(639111--639112) -639120 -639138 -639217 -639261 -(639323--639324) -639329 -639331
-(639333--639335) -(639338--639339) -(639341--639342) -639346 -(639840--639844)
-639852 -(639854--639855) -(639857--639861) -639863 -639873 -(639879--639885) -(639911--639949)
-(639952--640122) -(640128--640378) -640540 -640543 -(640856--641274) -(641276--641469)
-(641836--642187) -(642196--642211) -(642260--642291) -(642356--642419) -(642548--642675)
-(642936--643189) -(643700--644211) -(644600--645151) -(645162--645170) -(645177--645270)
-(645299--645300) -(645323--645325) -(645328--645357) -(645494--648237) -(653373--653884)
+(1050633--1050670) +(1066497--1066500) +(1066508--1066512) +(1066633--1066640) +(1066675--1066701)
+(1066714--1066736) +(1066746--1066753) +1162947 +1162960 +1162963 +1162969 -1179907
-1179928 -(1179995--1179997) -1179999 -(1180001--1180540) -(1180544--1180764) -(1180772--1181695)
-(1181959--1181960) -(1183574--1183743) -(1184504--1184801) -(1191088--1191089) -1200384
Fix? yes

Free blocks count wrong for group #15 (32510, counted=32511).
Fix? yes

Free blocks count wrong for group #18 (11968, counted=13929).
Fix? yes

Free blocks count wrong for group #19 (6401, counted=12855).
Fix? yes

Free blocks count wrong for group #20 (13, counted=2189).
Fix? yes

Free blocks count wrong for group #21 (1, counted=1034).
Fix? yes

Free blocks count wrong for group #22 (0, counted=7).
Fix? yes

Free blocks count wrong for group #23 (0, counted=7).
Fix? yes

Free blocks count wrong for group #24 (1, counted=9800).
Fix? yes

Free blocks count wrong for group #25 (45, counted=24003).
Fix? yes

Free blocks count wrong for group #26 (2, counted=5525).
Fix? yes

Free blocks count wrong for group #31 (23717, counted=24140).
Fix? yes

Free blocks count wrong for group #32 (27342, counted=27234).
Fix? yes

Free blocks count wrong for group #33 (31043, counted=32057).
Fix? yes

Free blocks count wrong for group #34 (30951, counted=32502).
Fix? yes

Free blocks count wrong for group #35 (17100, counted=29804).
Fix? yes

Free blocks count wrong for group #36 (29062, counted=31226).
Fix? yes

Free blocks count wrong (1948086, counted=2016753).
Fix? yes

Inode bitmap differences:  -147440 -147481 -147493 -(147495--147502) -(147504--147522)
-147758 -147765 -147856 -147882 -(147901--147902) -(147904--147905) -147907 -147913
-148028 -148079 -148085 -(148105--148106) -148115 -(148153--148156) -148163 -148215
+148220 -148237 +(261403--261407)
Fix? yes

Free inodes count wrong for group #15 (8159, counted=8160).
Fix? yes

Free inodes count wrong for group #18 (6764, counted=6816).
Fix? yes

Free inodes count wrong for group #20 (8071, counted=8081).
Fix? yes

Directories count wrong for group #20 (36, counted=34).
Fix? yes

Free inodes count wrong for group #25 (7992, counted=7991).
Fix? yes

Free inodes count wrong for group #26 (8151, counted=8152).
Fix? yes

Directories count wrong for group #26 (5, counted=4).
Fix? yes

Free inodes count wrong for group #32 (7878, counted=7873).
Fix? yes

Free inodes count wrong (609663, counted=609721).
Fix? yes

/dev/sda5: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda5: 2279/612000 files (12.0% non-contiguous), 425119/2441872 blocks
yfrle@frle-desktop:~$


記得下次要加 y 的參數,才不會那麼辛苦。

原文出處:用fsck檢查、修復linux檔案系統 @ 一些有的沒的 :: 隨意窩 Xuite日誌
內容圖示
url email imgsrc image code quote
樣本
bold italic underline linethrough   












 [詳情...]
validation picture

注意事項:
預覽不需輸入認證碼,僅真正發送文章時才會檢查驗證碼。
認證碼有效期10分鐘,若輸入資料超過10分鐘,請您備份內容後,重新整理本頁並貼回您的內容,再輸入驗證碼送出。

選項

Powered by XOOPS 2.0 © 2001-2008 The XOOPS Project|