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