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