Gentoo Archives: gentoo-user

From: William Kenworthy <billk@×××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted!
Date: Tue, 03 Sep 2013 03:50:55
Message-Id: 52255BEF.2080000@iinet.net.au
In Reply to: Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! by meino.cramer@gmx.de
1 On 03/09/13 11:26, meino.cramer@×××.de wrote:
2 > William Kenworthy <billk@×××××××××.au> [13-09-03 05:08]:
3 >> On 03/09/13 10:45, meino.cramer@×××.de wrote:
4 >>> walt <w41ter@×××××.com> [13-09-03 04:15]:
5 >>>> On 09/02/2013 09:15 AM, meino.cramer@×××.de wrote:
6 >>>>> The rootfs and $HOME of my embedded system is stored
7 >>>>> on a 16GB SD-card (about 5GB used, rest free). The FS
8 >>>>> is ext4.
9 >>>>>
10 >>>>> Since the system hangs for unknown reasons several times
11 >>>> Does it hang at a predictable point, like during boot, or poweroff?
12 >>>>
13 >>>> I know almost nothing about SD cards (yet). Do they develop bad
14 >>>> blocks like other storage media? I notice fsck.ext4 has a -c flag
15 >>>> to check for bad blocks.
16 >>>>
17 >>> No, it hangs while compiling or while updateing (eix-sync; emerge ...).
18 >>>
19 >>>
20 >>> I did the following now:
21 >>> I did a binary image backup with dd of the sdcard.
22 >>> I made a backup of the all files from the bad fs with tar.
23 >>> I say "YES" to fsck to fix what it found.
24 >>> I made another backup of the all files from the bad fs with tar.
25 >>> I md5summed both tar archives and found them identical.
26 >>>
27 >>> Now...is the conclusion correct, that the identical md5sum
28 >>> indicate, that the fixed error of the fs only had impact to
29 >>> already invalidated data?
30 >>> Or whatelse could this indicate?
31 >>>
32 >>> Best regards,
33 >>> mcc
34 >>>
35 >>> PS: What come mind just in this moment:
36 >>> Can I ran fsck on an binary image of the fs which I made with dd somehow?
37 >>>
38 >>>
39 >>>
40 >>>
41 >>>
42 >> Have you run out of inodes? - ext 4 has had very mixed success for me on
43 >> solid state. Running out of inodes is a real problem for gentoo on
44 >> smaller SD cards with standard settings.
45 >>
46 >> BillK
47 >>
48 >>
49 >>
50 > Does this error message from fsck indicate that? I am really bad in
51 > guessing what fsck tries to cry at me ... ;)
52 >
53 >
54 >>> solfire:/root>fsck.ext4 -f -p /dev/sdb2
55 >>> rootfs: Inodes that were part of a corrupted orphan linked list found.
56 >>>
57 >>> rootfs: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
58 >>> (i.e., without -a or -p options)
59 >>> [1] 18644 exit 4 fsck.ext4 -f -p /dev/sdb2
60 >>>
61 >>>
62 > Is there any way to correct the settings from the default values to
63 > more advances ones, which respect the sdcard size of 16GB *without*
64 > blanking it...a "correction on the fly" so to say???
65 >
66 > And if not: Is there a way to backup the sdcard and playback the files
67 > after reformatting it by preserving all three time stamps of the
68 > files (atime is deactivated via fstab though) ?
69 >
70 > Best regards,
71 > mcc
72 >
73 >
74 >
75 >
76 >
77 df -i - if you get 100% iUSE or near to it thats your problem ... I have
78 seen that error message you give as a result of running out of inodes
79 corrupting the FS.
80
81 No, your only way out is to copy (I use rync) the files off, recreate
82 the fs with max inodes ("man mke2fs") and rsync the files back. Once an
83 ext* fs has been created with a certain number of inodes its fixed until
84 you re-format.
85
86 I get it happening regularly on 4G cards when I forget and just emerge a
87 couple of packages without cleaning up in between packages. On 16G
88 cards, its compiling something like glibc or gcc that uses huge numbers
89 of inodes at times. On a single 32G card I have, the standard settings
90 have been fine ... so far :)
91
92 Billk

Replies