unexpected inconsistency: run fsck manually [Appunti Linux]

emergenzaPuò capitare che per un improvviso black-out – se non vi sono gruppi di continuità attivi – oppure dopo un reset eseguito meccanicamente della macchina di vedersi bloccato il boot e di visualizzare questa frase:

UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY

e oltre ad altre indicazioni, che possono variare leggermente a secondo della distribuzione Linux, al suggerimento di usare il comando fsck per risolvere il problema.

_Fedora-16-86x_6: UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY.
          (i.e., without -a or -r options)
dracut Warning: e2fsck returned with4
dracut Warning: _Fedora-16-x86_6 contains a file system with errors, check forced
dracut Warning: _Fedora-16-x86_6: Inodes the were part of corrupted orphan linked list found.
dracut Warning: **** An error occurred during the file system check.
dracut Warning: **** Dropping you to a shell; the system will try
dracut Warning: **** to mount the filesystem(s), when you leave the shell.

dracut Warning: 
Dropping to debug shell.

sh: can't access tty; job control turned off
(Repair filesystem):/#

A questo punto, senza lasciarsi prendere dal panico – o almeno cercando di controllare il panico – si può procedere alla riparazione del filesystem usando per l’appunto il comando fsck:

# fsck /dev/sdXX

sdxx sono le partizioni del disco da verificare, deducibili con il comando fdisk -l :

#fdisk -l
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x11ba5d91

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048   251660287   125317120    5  Extended
/dev/sda3       251660288   617705471   183022592    7  HPFS/NTFS/exFAT
/dev/sda4       617705472   625139711     3717120   12  Compaq diagnostics
/dev/sda5         1028096   251660287   125316096   8e  Linux LVM

Dopo aver individuata la partizione da controllare – in questo caso sda1 – lanciamo fsck:

# fsck -y dev/sda1
fsck from util-linux 2.20.1
e2fsck 1.41.14 (22-Dec-2010)
_Fedora-16-x86_6 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Inodes that were part of a corrupted orphan linked list found.  Fix? yes

Inode 4069 was part of the orphaned inode list.  FIXED.
Inode 9153 was part of the orphaned inode list.  FIXED.
Inode 12340 was part of the orphaned inode list.  FIXED.
Inode 12342 was part of the orphaned inode list.  FIXED.
Inode 12343 was part of the orphaned inode list.  FIXED.
Inode 12344 was part of the orphaned inode list.  FIXED.
Inode 12345 was part of the orphaned inode list.  FIXED.
Inode 12346 was part of the orphaned inode list.  FIXED.
Inode 12347 was part of the orphaned inode list.  FIXED.
Inode 12348 was part of the orphaned inode list.  FIXED.
Inode 12351 was part of the orphaned inode list.  FIXED.
Inode 12366 was part of the orphaned inode list.  FIXED.
Inode 18131 was part of the orphaned inode list.  FIXED.
Inode 141592 was part of the orphaned inode list.  FIXED.
Inode 141870 was part of the orphaned inode list.  FIXED.
Inode 161900 was part of the orphaned inode list.  FIXED.
Inode 163682 was part of the orphaned inode list.  FIXED.
Inode 163938 was part of the orphaned inode list.  FIXED.
Inode 171312 was part of the orphaned inode list.  FIXED.
Inode 171340 was part of the orphaned inode list.  FIXED.
Inode 171624 was part of the orphaned inode list.  FIXED.
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences:  -(41376--41381) -(42136--42141) -(42208--42215) -(42248--42259) -(42264--42271) -(42280--42284) -(42914--42941) -(75322--75344) -(76124--76161) -(76226--76260) -(165248--165350) -258319 -(398484--398720) -(570424--570431) -(581072--581081) -(622942--622963) -(633769--633997) -(898727--898969) -(930495--930730) -(1262048--1262527) -(2428928--2432995)
Fix? yes

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

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

Free blocks count wrong for group #5 (20894, counted=20997).
Fix? yes

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

Free blocks count wrong for group #12 (21741, counted=21978).
Fix? yes

Free blocks count wrong for group #17 (185, counted=203).
Fix? yes

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

Free blocks count wrong for group #27 (19437, counted=19680).
Fix? yes

Free blocks count wrong for group #28 (14188, counted=14424).
Fix? yes

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

Free blocks count wrong for group #38 (10331, counted=10811).
Fix? yes

Free blocks count wrong for group #74 (4121, counted=8189).
Fix? yes

Free blocks count wrong (10396736, counted=10402543).
Fix? yes

Inode bitmap differences:  -2985 -3193 -4069 -4084 -4793 -4884 -(4886--4887) -9153 -12340 -(12342--12348) -12351 -12366 -18131 -141592 -141870 -161900 -163682 -163938 -171312 -171340 -171624 -530675
Fix? yes

Free inodes count wrong for group #0 (37, counted=45).
Fix? yes

Free inodes count wrong for group #1 (69, counted=80).
Fix? yes

Free inodes count wrong for group #2 (715, counted=716).
Fix? yes

Free inodes count wrong for group #17 (1, counted=3).
Fix? yes

Free inodes count wrong for group #19 (0, counted=2).
Fix? yes

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

Free inodes count wrong for group #64 (21, counted=23).
Fix? yes

Free inodes count wrong (3011000, counted=3011030).
Fix? yes

_Fedora-16-x86_6: ***** FILE SYSTEM WAS MODIFIED *****
_Fedora-16-x86_6: 265770/3276800 files (0.3% non-contiguous), 2704657/13107200 blocks

Se non ci sono ulteriori problemi si può riavviare la macchina – riavvio da linea di comando – e verificare se esegue il boot correttamente.

 

Lascia un commento