Welcome, Guest

Author Topic: fsck error  (Read 132 times)

nirp

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
fsck error
« on: November 28, 2018, 12:21:31 PM »
I am using A20-OLONUXINO-MICRO Board. I installed Debian OS in NAND flash memory. when I Execute command " fsck -n /dev/nandb "  I found Error as follows :

root@A20-OLinuXino:~# fsck -n /dev/nandb
fsck from util-linux 2.25.2
e2fsck 1.42.12 (29-Aug-2014)
Warning!  /dev/nandb is mounted.
/dev/nandb contains a file system with errors, check forced.
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
Free blocks count wrong for group #50 (28808, counted=28807).
Fix? no

Free blocks count wrong (1498046, counted=1498045).
Fix? no


/dev/nandb: ********** WARNING: Filesystem still has errors **********

/dev/nandb: 62801/486720 files (0.2% non-contiguous), 445490/1943536 blocks




##################################################################################################

error in another board of olimex as follows :

###################################################################################################

root@A20-OLinuXino:~# fsck -n /dev/nandb
fsck from util-linux 2.25.2
e2fsck 1.42.12 (29-Aug-2014)
Warning!  /dev/nandb is mounted.
/dev/nandb contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Deleted inode 389 has zero dtime.  Fix? no

Deleted inode 261798 has zero dtime.  Fix? no

Deleted inode 262015 has zero dtime.  Fix? no

Deleted inode 390789 has zero dtime.  Fix? no

Deleted inode 390790 has zero dtime.  Fix? no

Deleted inode 390793 has zero dtime.  Fix? no

Deleted inode 390795 has zero dtime.  Fix? no

Deleted inode 390796 has zero dtime.  Fix? no

Deleted inode 390797 has zero dtime.  Fix? no

Deleted inode 390798 has zero dtime.  Fix? no

Deleted inode 390799 has zero dtime.  Fix? no

Deleted inode 390800 has zero dtime.  Fix? no

Deleted inode 390841 has zero dtime.  Fix? no

Deleted inode 390843 has zero dtime.  Fix? no

Deleted inode 390848 has zero dtime.  Fix? no

Deleted inode 390850 has zero dtime.  Fix? no

Deleted inode 390852 has zero dtime.  Fix? no

Deleted inode 390853 has zero dtime.  Fix? no

Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences:  -(34036--34059) -(1097199--1097472) -(1119106--1119161) -(1608640--1608649) -(1616520--1616569) -(1644614--1644615) -(1644726--1644727) -(1644784--1644785) -(1645185--1645186) -(1646267--1646268) -(1646403--1646412) -(1655093--1655094) -(1655655--1655664) -(1655805--1655806)
Fix? no

Free blocks count wrong for group #49 (802, counted=809).
Fix? no

Free blocks count wrong for group #50 (20011, counted=20010).
Fix? no

Free blocks count wrong (1498568, counted=1498574).
Fix? no

Inode bitmap differences:  -389 -261798 -262015 -(390789--390790) -390793 -(390795--390800) -390841 -390843 -390848 -390850 -(390852--390853)
Fix? no


/dev/nandb: ********** WARNING: Filesystem still has errors **********

/dev/nandb: 62693/486720 files (0.2% non-contiguous), 444968/1943536 blocks



I want to Know
1) why these errors occur?
2) How to Fix These errors?


Thanks,
« Last Edit: November 28, 2018, 12:38:10 PM by nirp »

JohnS

  • Hero Member
  • *****
  • Posts: 1709
  • Karma: +33/-45
Re: fsck error
« Reply #1 on: November 29, 2018, 06:27:26 PM »
It looks unwise running fsck on a mounted fs!!

John

nirp

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: fsck error
« Reply #2 on: November 30, 2018, 06:39:54 AM »
tell me How to umount fs and run fsck. if I unmount filesystem then an error is showing like "filesystem missing filesystem has to mounted " @JohnS
« Last Edit: November 30, 2018, 07:31:59 AM by nirp »

JohnS

  • Hero Member
  • *****
  • Posts: 1709
  • Karma: +33/-45
Re: fsck error
« Reply #3 on: November 30, 2018, 10:14:36 AM »
Reconfigure your software not to need the ones you want to check.  Consider booting from something other than the flash.

E.g. sd card or fel boot.

John

nirp

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: fsck error
« Reply #4 on: November 30, 2018, 10:25:07 AM »
Is there any Other way rather than reconfiguring software ?? I want to fix this Error. otherwise if I get this error again then I have to Reconfigure again Better to fix this Error

JohnS

  • Hero Member
  • *****
  • Posts: 1709
  • Karma: +33/-45
Re: fsck error
« Reply #5 on: November 30, 2018, 10:53:41 AM »
It's not necessarily an error.  If it's in use then it is not stable - it has always been that way and always will be.

If you insist on doing the check then you need a stable fs.  It's not hard to boot a specific system just to run fsck if that's what you insist on doing.

John

nirp

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: fsck error
« Reply #6 on: November 30, 2018, 11:12:45 AM »
According to you, we can't fix that error?? we have to Reconfigure Only.these is the only way to solve a problem.   

JC

  • Newbie
  • *
  • Posts: 25
  • Karma: +0/-0
Re: fsck error
« Reply #7 on: November 30, 2018, 02:25:59 PM »
It's really for your own protection.

Like JohnS said, it is highly discouraged to run fsck on a mounted filesystem; there's enough risk in it performing changes on the filesystem that many tools outright prohibit you from conducting any operations on a mounted system. Changes occur rapidly on modern filesystems in use and the filesystem journal isn't constantly synced. This means that fsck almost certainly *will* find discrepancies and attempt to fix them. This is normal behavior for the tool and is something to be cautious about.

The only way (as far as I know) to run fsck properly is to do so on an unmounted filesystem. This way you can trust its output and make corrections if need be in order to have a clean filesystem. There aren't really any software configurations involved for your target filesystem. It's a standard procedure to boot into a separate root filesystem (such as a micro SD card if you are running on the NAND flash). It's annoying to do this, we understand, but the last thing we want to do is give you advice/recommendations that could potentially cause you data loss.

Can you run fsck again on the NAND flash storage device after booting with a micro SD and post the output?

nirp

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: fsck error
« Reply #8 on: November 30, 2018, 02:31:25 PM »
"Can you run fsck again on the NAND flash storage device after booting with a micro SD and post the output?"

If I do as u told me it'll definitely not giving any error.

thank you so much for your advice JC and JohnS.