A execução do fsck em uma máquina inicializada produz erros no sistema de arquivos raiz. Em uma tentativa de corrigir isso, eu inicializei a partir de um LiveCD - mas o fsck na instância do LiveCD não encontrou nenhum erro. Eu também tentei executar o mesmo binário que um sistema inicializado faria - com os mesmos resultados de 0 erros.
O que está acontecendo aqui? Como corrigir os erros relatados? (veja abaixo)
A máquina é um Ubuntu sem cabeça 14.04, e o LiveCD é do Ubuntu 14.04 desktop edition.
Quando estou correndo:
fsck -v -n /dev/mapper/lvm-root -f
A resposta é:
fsck from util-linux 2.20.1
e2fsck 1.42.9 (4-Feb-2014)
Warning! /dev/mapper/lvm-root is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
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
Block bitmap differences: -(24598720--24598781) +(42616517--42616542) -(47432723--47432748) +(49925184--49925211) +(49925312--49925373)
Fix? no
Free blocks count wrong for group #750 (22700, counted=22638).
Fix? no
Free blocks count wrong for group #1300 (13150, counted=13176).
Fix? no
Free blocks count wrong for group #1447 (24124, counted=24098).
Fix? no
Free blocks count wrong for group #1523 (32016, counted=32106).
Fix? no
Free blocks count wrong (30301182, counted=30319341).
Fix? no
Inode bitmap differences: -11927698 +11927700
Fix? no
Free inodes count wrong (15762199, counted=15762204).
Fix? no
/dev/mapper/lvm-root: ********** WARNING: Filesystem still has errors **********
130281 inodes used (0.82%, out of 15892480)
1113 non-contiguous files (0.9%)
112 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 121424/640
33268738 blocks used (52.33%, out of 63569920)
0 bad blocks
3 large files
101907 regular files
19700 directories
2 character device files
0 block device files
2 fifos
22 links
8624 symbolic links (8166 fast symbolic links)
32 sockets
------------
130289 files
Como uma tentativa de consertar isso, eu inicializei a partir do LiveCD do Ubuntu 14.04 e executei o mesmo comando:
root@ubuntu:~# fsck -n -v /dev/mapper/lvm-root -f
fsck from util-linux 2.20.1
e2fsck 1.42.9 (4-Feb-2014)
Warning! /dev/mapper/lvm-root is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
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
130281 inodes used (0.82%, out of 15892480)
1114 non-contiguous files (0.9%)
112 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 121429/640
33268738 blocks used (52.33%, out of 63569920)
0 bad blocks
3 large files
101908 regular files
19704 directories
2 character device files
0 block device files
2 fifos
22 links
8625 symbolic links (8167 fast symbolic links)
31 sockets
------------
130294 files
Sem erros, o que achei estranho. Então, tentei montar a partição raiz e executar manualmente o fsck localizado em / sbin / fsck:
root@ubuntu:~# /mnt/sbin/fsck -n -v /dev/mapper/lvm-root -f
fsck from util-linux 2.20.1
e2fsck 1.42.9 (4-Feb-2014)
Warning! /dev/mapper/lvm-root is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
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
130281 inodes used (0.82%, out of 15892480)
1114 non-contiguous files (0.9%)
112 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 121429/640
33268738 blocks used (52.33%, out of 63569920)
0 bad blocks
3 large files
101908 regular files
19704 directories
2 character device files
0 block device files
2 fifos
22 links
8625 symbolic links (8167 fast symbolic links)
31 sockets
------------
130294 files