From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id F17451381F3 for ; Fri, 6 Sep 2013 15:19:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 469DBE0E16; Fri, 6 Sep 2013 15:19:11 +0000 (UTC) Received: from mail-ob0-f169.google.com (mail-ob0-f169.google.com [209.85.214.169]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D28E4E0DFA for ; Fri, 6 Sep 2013 15:19:09 +0000 (UTC) Received: by mail-ob0-f169.google.com with SMTP id es8so3615365obc.0 for ; Fri, 06 Sep 2013 08:19:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=bRLOYgjtzKReKxp+wnMAfZ99JFqlLoszovmkB3j1FQI=; b=AxqZ1s9KJeQnXwjkPQyXGDvBqajLgyzubOG9bp9aWmuj71NR468ArOBxT7KdCNpR7/ db0KUImgJ+oP+yeLKu82dtablRftjLq0vEQbZMsDspIRYlDFuslPed9ndmgb6PxIsjN5 H0VjJ+r3RWmAgOvPJ+5xmJ+zVZ+we6SuiTBVGLbtjYRNkCk22ish8D3PvpKjUiB8dF6a VX7S0jgwI7sUz59kC/6H6amf4W/F8PKL6sOEQXlzFx4CSnLc9BahpUGcBvWM0Yy94ct/ DEwWZz9+IdN86UdjFPdM9UOPQgZFbaxaZ8ytdj8IORblyvtSn1zOcZz8gmzlRHpHBIb7 6z6g== X-Received: by 10.182.71.82 with SMTP id s18mr2232381obu.9.1378480748975; Fri, 06 Sep 2013 08:19:08 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.60.52.79 with HTTP; Fri, 6 Sep 2013 08:18:28 -0700 (PDT) In-Reply-To: <20130904002236.GA3788@solfire> References: <20130902161515.GA3446@solfire> <52250FF3.6050305@gmail.com> <20130903024504.GB3409@solfire> <5225525C.7070403@iinet.net.au> <20130903032621.GC3409@solfire> <52255BEF.2080000@iinet.net.au> <20130903161120.GC3916@solfire> <20130904002236.GA3788@solfire> From: Francisco Ares Date: Fri, 6 Sep 2013 12:18:28 -0300 Message-ID: Subject: Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! To: gentoo-user Content-Type: multipart/alternative; boundary=e89a8fb1fde65f5df504e5b88f72 X-Archives-Salt: de605a9e-cf5a-4785-a7e9-f1ef22ab35e5 X-Archives-Hash: 652b8760b4672959fa1b4e05f10976f3 --e89a8fb1fde65f5df504e5b88f72 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2013/9/3 > Francisco Ares [13-09-04 02:08]: > > Em 03/09/2013 13:12, escreveu: > > > > > > William Kenworthy [13-09-03 17:16]: > > > > On 03/09/13 11:26, meino.cramer@gmx.de wrote: > > > > > William Kenworthy [13-09-03 05:08]: > > > > >> On 03/09/13 10:45, meino.cramer@gmx.de wrote: > > > > >>> walt [13-09-03 04:15]: > > > > >>>> On 09/02/2013 09:15 AM, meino.cramer@gmx.de wrote: > > > > >>>>> The rootfs and $HOME of my embedded system is stored > > > > >>>>> on a 16GB SD-card (about 5GB used, rest free). The FS > > > > >>>>> is ext4. > > > > >>>>> > > > > >>>>> Since the system hangs for unknown reasons several times > > > > >>>> Does it hang at a predictable point, like during boot, or > poweroff? > > > > >>>> > > > > >>>> I know almost nothing about SD cards (yet). Do they develop b= ad > > > > >>>> blocks like other storage media? I notice fsck.ext4 has a -c > flag > > > > >>>> to check for bad blocks. > > > > >>>> > > > > >>> No, it hangs while compiling or while updateing (eix-sync; emer= ge > > ...). > > > > >>> > > > > >>> > > > > >>> I did the following now: > > > > >>> I did a binary image backup with dd of the sdcard. > > > > >>> I made a backup of the all files from the bad fs with tar. > > > > >>> I say "YES" to fsck to fix what it found. > > > > >>> I made another backup of the all files from the bad fs with tar= . > > > > >>> I md5summed both tar archives and found them identical. > > > > >>> > > > > >>> Now...is the conclusion correct, that the identical md5sum > > > > >>> indicate, that the fixed error of the fs only had impact to > > > > >>> already invalidated data? > > > > >>> Or whatelse could this indicate? > > > > >>> > > > > >>> Best regards, > > > > >>> mcc > > > > >>> > > > > >>> PS: What come mind just in this moment: > > > > >>> Can I ran fsck on an binary image of the fs which I made with d= d > > somehow? > > > > >>> > > > > >>> > > > > >>> > > > > >>> > > > > >>> > > > > >> Have you run out of inodes? - ext 4 has had very mixed success f= or > > me on > > > > >> solid state. Running out of inodes is a real problem for gentoo > on > > > > >> smaller SD cards with standard settings. > > > > >> > > > > >> BillK > > > > >> > > > > >> > > > > >> > > > > > Does this error message from fsck indicate that? I am really bad = in > > > > > guessing what fsck tries to cry at me ... ;) > > > > > > > > > > > > > > >>> solfire:/root>fsck.ext4 -f -p /dev/sdb2 > > > > >>> rootfs: Inodes that were part of a corrupted orphan linked > list > > found. > > > > >>> > > > > >>> rootfs: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. > > > > >>> (i.e., without -a or -p options) > > > > >>> [1] 18644 exit 4 fsck.ext4 -f -p /dev/sdb2 > > > > >>> > > > > >>> > > > > > Is there any way to correct the settings from the default values = to > > > > > more advances ones, which respect the sdcard size of 16GB *withou= t* > > > > > blanking it...a "correction on the fly" so to say??? > > > > > > > > > > And if not: Is there a way to backup the sdcard and playback the > files > > > > > after reformatting it by preserving all three time stamps of the > > > > > files (atime is deactivated via fstab though) ? > > > > > > > > > > Best regards, > > > > > mcc > > > > > > > > > > > > > > > > > > > > > > > > > > > > > df -i - if you get 100% iUSE or near to it thats your problem ... I > have > > > > seen that error message you give as a result of running out of inod= es > > > > corrupting the FS. > > > > > > > > No, your only way out is to copy (I use rync) the files off, recrea= te > > > > the fs with max inodes ("man mke2fs") and rsync the files back. > Once an > > > > ext* fs has been created with a certain number of inodes its fixed > until > > > > you re-format. > > > > > > > > I get it happening regularly on 4G cards when I forget and just > emerge a > > > > couple of packages without cleaning up in between packages. On 16G > > > > cards, its compiling something like glibc or gcc that uses huge > numbers > > > > of inodes at times. On a single 32G card I have, the standard > settings > > > > have been fine ... so far :) > > > > > > > > Billk > > > > > > > > > > > > > > df -i gives the following: > > > > > > rootfs 971040 352208 618832 37% / > > > /dev/root 971040 352208 618832 37% / > > > devtmpfs 63420 434 62986 1% /dev > > > tmpfs 63456 389 63067 1% /run > > > shm 63456 1 63455 1% /dev/shm > > > cgroup_root 63456 6 63450 1% /sys/fs/cgroup > > > /dev/mmcblk0p1 0 0 0 - /boot > > > > > > > > > You mentioned rsync to backup... > > > > > > I used > > > > > > sudo tar cvf > > > > > > the rootfs has only one partition... > > > > > > Is it alos ok to use tar or is there any drawback....? > > > > > > Best regards, > > > mcc > > > > > > > > > > > > > There are some parameters for creating a better backup archive using ta= r, > > like --same-owner and --atime- preserve. > > > > By the way, it would be an interesting project to export some folders o= n > > your home computer using nfs, tuneling it through ssh, monting it local= ly > > in your embedded computer, and applying an unionfs to the rootfs. Just > > dreaming, of course. > > > > G=C3=B3od luck > > Francisco > > Hi Francisco, > > as I understand the man page, --same-owner is only activ while > extracting a tar: > > --same-owner > create extracted files with the same ownership > > while extracting I always use > > --preserve > like --preserve-permissions plus --same-order > > . Atime setting is disabled via fstab on my embedded system for two > reasons: > Performance wise since any access to a file will trigger a write > action to the flash chip even when reading the file. > Any write action to a flash chip wear out the chip -- it has a limited > number of write cycles. > I also disbaled atime on my PC for the first reason. > > What makes the unionfs'ed nfs mount of my PC on the embedded system > interesting to you ? > (sorry if this question sounds bad/negative/... or so...its my limited > english. Its simply and only a question and the wish of getting more > infos... :) > > Best regards, > mcc > > > > > > Hi, Meino. Sorry for my delay in answering your message. Sorry for my english, too, as a non-native speaker, I know sometimes I may sound strange. I am (trying to) finishing an embedded equipment, using an Intel x64, and Gentoo Linux. The main file system will be stored in a SATA "disk on module" flash device, but there are some directories that are not needed for daily use, or should not be present at all on the final product, like private source code used to build the program that run this equipment. So on the development system, I have used several disk partitions (as a first approach) for this directories, like /usr/portage , /usr/src , /usr/include and so on, and I was thinking on a way of remote access, so that a remote system could use the structure of this local development system. So I suppose that some unionfs mounts would make things appear local to the remote system. But probably just nfs would do the trick. As I said, just dreaming. And what about your problem? Best regards, Francisco --e89a8fb1fde65f5df504e5b88f72 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= 2013/9/3 <meino.cramer@gmx.de>
Francisco Ares <fr= ares@gmail.com> [13-09-04 02:08]:
> Em 03/09/2013 13:12, <meino.cramer@gmx.de> escreveu:
> >
> > William Kenworthy <billk@iinet.net.au> [13-09-03 17:16]:
> > > On 03/09/13 11:26, meino.cramer@gmx.de wrote:
> > > > William Kenworthy <billk@iinet.net.au> [13-09-03 05:08]:
> > > >> On 03/09/13 10:45, meino.cramer@gmx.de wrote:
> > > >>> walt <w41ter@gmail.com> [13-09-03 04:15]:
> > > >>>> On 09/02/2013 09:15 AM, meino.cramer@gmx.de wrote:
> > > >>>>> The rootfs and $HOME of my embedded sys= tem is stored
> > > >>>>> on a 16GB SD-card (about 5GB used, rest= free). The FS
> > > >>>>> is ext4.
> > > >>>>>
> > > >>>>> Since the system hangs for unknown reas= ons several times
> > > >>>> Does it hang at a predictable point, like d= uring boot, or poweroff?
> > > >>>>
> > > >>>> I know almost nothing about SD cards (yet).= =C2=A0Do they develop bad
> > > >>>> blocks like other storage media? =C2=A0I no= tice fsck.ext4 has a -c flag
> > > >>>> to check for bad blocks.
> > > >>>>
> > > >>> No, it hangs while compiling or while updateing= (eix-sync; emerge
> ...).
> > > >>>
> > > >>>
> > > >>> I did the following now:
> > > >>> I did a binary image backup with dd of the sdca= rd.
> > > >>> I made a backup of the all files from the bad f= s with tar.
> > > >>> I say "YES" to fsck to fix what it fo= und.
> > > >>> I made another backup of the all files from the= bad fs with tar.
> > > >>> I md5summed both tar archives and found them id= entical.
> > > >>>
> > > >>> Now...is the conclusion correct, that the ident= ical md5sum
> > > >>> indicate, that the fixed error of the fs only h= ad impact to
> > > >>> already invalidated data?
> > > >>> Or whatelse could this indicate?
> > > >>>
> > > >>> Best regards,
> > > >>> mcc
> > > >>>
> > > >>> PS: What come mind just in this moment:
> > > >>> Can I ran fsck on an binary image of the fs whi= ch I made with dd
> somehow?
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >> Have you run out of inodes? - ext 4 has had very mi= xed success for
> me on
> > > >> solid state. =C2=A0Running out of inodes is a real = problem for gentoo on
> > > >> smaller SD cards with standard settings.
> > > >>
> > > >> BillK
> > > >>
> > > >>
> > > >>
> > > > Does this error message from fsck indicate that? I am r= eally bad in
> > > > guessing what fsck tries to cry at me ... ;)
> > > >
> > > >
> > > >>> =C2=A0 =C2=A0 solfire:/root>fsck.ext4 -f -p = /dev/sdb2
> > > >>> =C2=A0 =C2=A0 rootfs: Inodes that were part of = a corrupted orphan linked list
> found.
> > > >>>
> > > >>> =C2=A0 =C2=A0 rootfs: UNEXPECTED INCONSISTENCY;= RUN fsck MANUALLY.
> > > >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 (i.e., without -a o= r -p options)
> > > >>> =C2=A0 =C2=A0 [1] =C2=A0 =C2=A018644 exit 4 =C2= =A0 =C2=A0 fsck.ext4 -f -p /dev/sdb2
> > > >>>
> > > >>>
> > > > Is there any way to correct the settings from the defau= lt values to
> > > > more advances ones, which respect the sdcard size of 16= GB *without*
> > > > blanking it...a "correction on the fly" so to= say???
> > > >
> > > > And if not: Is there a way to backup the sdcard and pla= yback the files
> > > > after reformatting it by preserving all three time stam= ps of the
> > > > files (atime is deactivated via fstab though) ?
> > > >
> > > > Best regards,
> > > > mcc
> > > >
> > > >
> > > >
> > > >
> > > >
> > > df -i - if you get 100% iUSE or near to it thats your proble= m ... I have
> > > seen that error message you give as a result of running out = of inodes
> > > corrupting the FS.
> > >
> > > No, your only way out is to copy (I use rync) the files off,= recreate
> > > the fs with max inodes ("man mke2fs") and rsync th= e files back. =C2=A0Once an
> > > ext* fs has been created with a certain number of inodes its= fixed until
> > > you re-format.
> > >
> > > I get it happening regularly on 4G cards when I forget and j= ust emerge a
> > > couple of packages without cleaning up in between packages. = =C2=A0On 16G
> > > cards, its compiling something like glibc or gcc that uses h= uge numbers
> > > of inodes at times. =C2=A0On a single 32G card I have, the s= tandard settings
> > > have been fine ... so far :)
> > >
> > > Billk
> > >
> > >
> >
> > df -i gives the following:
> >
> > rootfs =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 971040 352208 =C2=A0 61= 8832 =C2=A0 37% /
> > /dev/root =C2=A0 =C2=A0 =C2=A0 =C2=A0971040 352208 =C2=A0 618832 = =C2=A0 37% /
> > devtmpfs =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A063420 =C2=A0 =C2=A0434= =C2=A0 =C2=A062986 =C2=A0 =C2=A01% /dev
> > tmpfs =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 63456 =C2=A0 =C2= =A0389 =C2=A0 =C2=A063067 =C2=A0 =C2=A01% /run
> > shm =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 63456 =C2=A0= =C2=A0 =C2=A01 =C2=A0 =C2=A063455 =C2=A0 =C2=A01% /dev/shm
> > cgroup_root =C2=A0 =C2=A0 =C2=A0 63456 =C2=A0 =C2=A0 =C2=A06 =C2= =A0 =C2=A063450 =C2=A0 =C2=A01% /sys/fs/cgroup
> > /dev/mmcblk0p1 =C2=A0 =C2=A0 =C2=A0 =C2=A00 =C2=A0 =C2=A0 =C2=A00= =C2=A0 =C2=A0 =C2=A0 =C2=A00 =C2=A0 =C2=A0 - /boot
> >
> >
> > You mentioned rsync to backup...
> >
> > I used
> >
> > =C2=A0 =C2=A0 sudo tar cvf <backup file> <root of embedd= ed system>
> >
> > the rootfs has only one partition...
> >
> > Is it alos ok to use tar or is there any drawback....?
> >
> > Best regards,
> > mcc
> >
> >
> >
>
> There are some parameters for creating a better backup archive using t= ar,
> like --same-owner and --atime- preserve.
>
> By the way, it would be an interesting project to export some folders = on
> your home computer using nfs, tuneling it through ssh, monting it loca= lly
> in your embedded computer, and applying an unionfs to the rootfs. =C2= =A0Just
> dreaming, of course.
>
> G=C3=B3od luck
> Francisco

Hi Francisco,

as I understand the man page, --same-owner is only activ while
extracting a tar:

=C2=A0 =C2=A0 =C2=A0--same-owner
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 create extracted files wit= h the same ownership

while extracting I always use

=C2=A0 =C2=A0 =C2=A0 --preserve
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 like --preserve-permission= s plus --same-order

. Atime setting is disabled via fstab on my embedded system for two
reasons:
Performance wise since any access to a file will trigger a write
action to the flash chip even when reading the file.
Any write action to a flash chip wear out the chip -- it has a limited
number of write cycles.
I also disbaled atime on my PC for the first reason.

What makes the unionfs'ed nfs mount of my PC on the embedded system
interesting to you ?
(sorry if this question sounds bad/negative/... or so...its my limited
english. Its simply and only a question and the wish of getting more
infos... :)

Best regards,
mcc






Hi, Meino.

<= /div>
Sorry for my delay in answering your messag= e. Sorry for my english, too, as a non-native speaker, I know sometimes I m= ay sound strange.

I am (trying to) finishing an embedded= equipment, using an Intel x64, and Gentoo Linux. The main file system will= be stored in a SATA "disk on module" flash device, but there are= some directories that are not needed for daily use, or should not be prese= nt at all on the final product, like private source code used to build the = program that run this equipment.

So on the development system, I have u= sed several disk partitions (as a first approach) for this directories, lik= e /usr/portage , /usr/src , /usr/include and so on, and I was thinking on a= way of remote access, so that a remote system could use the structure of t= his local development system. So I suppose that some unionfs mounts would m= ake things appear local to the remote system. But probably just nfs would d= o the trick. As I said, just dreaming.

And what about your problem?
=

Best regard= s,
Francisco
--e89a8fb1fde65f5df504e5b88f72--