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