* [gentoo-user] Need help: Filesystem (ext4) corrupted! @ 2013-09-02 16:15 meino.cramer 2013-09-02 16:39 ` Pandu Poluan 2013-09-02 22:23 ` [gentoo-user] " walt 0 siblings, 2 replies; 21+ messages in thread From: meino.cramer @ 2013-09-02 16:15 UTC (permalink / raw To: Gentoo Hi, I need some urgent help... 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 I removed the sdcard, put it in a card reader and did an ext4.fsck on it. "Clean" was the result. Then I forced a check with "-f -p". The result was: 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 Return code 4 means 4 - File system errors left uncorrected which indicates nothing and all at the same time. At this point I started to write this mail. Before I fscked the sdcard I mounted the FS and tar'ed everything on it into a backup file. The tar process did not return an error. Since it costs A LOT OF TIME to compile everything from source on a 1GHz CPUed embedded system natively - and for abvious different other reasons - I am very interested in doing the next steps correctly. What can I do to eliminate the problem without data loss (best case) or to save the most while knowing what and where the corrupted data are located on the system? Thank you very much in advance for any help! Best regards, mcc ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Need help: Filesystem (ext4) corrupted! 2013-09-02 16:15 [gentoo-user] Need help: Filesystem (ext4) corrupted! meino.cramer @ 2013-09-02 16:39 ` Pandu Poluan 2013-09-02 16:41 ` meino.cramer 2013-09-02 22:23 ` [gentoo-user] " walt 1 sibling, 1 reply; 21+ messages in thread From: Pandu Poluan @ 2013-09-02 16:39 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1605 bytes --] On Sep 2, 2013 11:16 PM, <meino.cramer@gmx.de> wrote: > > Hi, > > > > I need some urgent help... > > > > 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 I > removed the sdcard, put it in a card reader and did an > ext4.fsck on it. > > "Clean" was the result. > > Then I forced a check with "-f -p". > > The result was: > > 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 > > > Return code 4 means > > 4 - File system errors left uncorrected > > which indicates nothing and all at the same time. > > > At this point I started to write this mail. > > Before I fscked the sdcard I mounted the FS and tar'ed everything on > it into a backup file. > > The tar process did not return an error. > > Since it costs A LOT OF TIME to compile everything from source on a > 1GHz CPUed embedded system natively - and for abvious different other > reasons - I am very interested in doing the next steps correctly. > > What can I do to eliminate the problem without data loss (best > case) or to save the most while knowing what and where the corrupted > data are located on the system? > > Thank you very much in advance for any help! > I'm not really sure how to fix the corrupt fs, but don't forget to backup the whole disk using dd Rgds, -- [-- Attachment #2: Type: text/html, Size: 2216 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Need help: Filesystem (ext4) corrupted! 2013-09-02 16:39 ` Pandu Poluan @ 2013-09-02 16:41 ` meino.cramer 0 siblings, 0 replies; 21+ messages in thread From: meino.cramer @ 2013-09-02 16:41 UTC (permalink / raw To: gentoo-user Pandu Poluan <pandu@poluan.info> [13-09-02 18:40]: > On Sep 2, 2013 11:16 PM, <meino.cramer@gmx.de> wrote: > > > > Hi, > > > > > > > > I need some urgent help... > > > > > > > > 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 I > > removed the sdcard, put it in a card reader and did an > > ext4.fsck on it. > > > > "Clean" was the result. > > > > Then I forced a check with "-f -p". > > > > The result was: > > > > 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 > > > > > > Return code 4 means > > > > 4 - File system errors left uncorrected > > > > which indicates nothing and all at the same time. > > > > > > At this point I started to write this mail. > > > > Before I fscked the sdcard I mounted the FS and tar'ed everything on > > it into a backup file. > > > > The tar process did not return an error. > > > > Since it costs A LOT OF TIME to compile everything from source on a > > 1GHz CPUed embedded system natively - and for abvious different other > > reasons - I am very interested in doing the next steps correctly. > > > > What can I do to eliminate the problem without data loss (best > > case) or to save the most while knowing what and where the corrupted > > data are located on the system? > > > > Thank you very much in advance for any help! > > > > I'm not really sure how to fix the corrupt fs, but don't forget to backup > the whole disk using dd > > Rgds, > -- Currently doing exactly this... mcc ^ permalink raw reply [flat|nested] 21+ messages in thread
* [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-02 16:15 [gentoo-user] Need help: Filesystem (ext4) corrupted! meino.cramer 2013-09-02 16:39 ` Pandu Poluan @ 2013-09-02 22:23 ` walt 2013-09-02 22:46 ` Francisco Ares 2013-09-03 2:45 ` meino.cramer 1 sibling, 2 replies; 21+ messages in thread From: walt @ 2013-09-02 22:23 UTC (permalink / raw To: gentoo-user 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 bad blocks like other storage media? I notice fsck.ext4 has a -c flag to check for bad blocks. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-02 22:23 ` [gentoo-user] " walt @ 2013-09-02 22:46 ` Francisco Ares 2013-09-03 2:39 ` meino.cramer 2013-09-03 2:45 ` meino.cramer 1 sibling, 1 reply; 21+ messages in thread From: Francisco Ares @ 2013-09-02 22:46 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 730 bytes --] 2013/9/2 walt <w41ter@gmail.com> > 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 bad > blocks like other storage media? I notice fsck.ext4 has a -c flag > to check for bad blocks. > > Sorry if this is obvious, but did you try to boot using, for example, a live CD? Gentoo's live CD comes with a handful set of tools for quite a good range of file systems, including ext4 Good luck Francisco [-- Attachment #2: Type: text/html, Size: 1208 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-02 22:46 ` Francisco Ares @ 2013-09-03 2:39 ` meino.cramer 0 siblings, 0 replies; 21+ messages in thread From: meino.cramer @ 2013-09-03 2:39 UTC (permalink / raw To: gentoo-user Francisco Ares <frares@gmail.com> [13-09-03 04:15]: > 2013/9/2 walt <w41ter@gmail.com> > > > 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 bad > > blocks like other storage media? I notice fsck.ext4 has a -c flag > > to check for bad blocks. > > > > > Sorry if this is obvious, but did you try to boot using, for example, a > live CD? Gentoo's live CD comes with a handful set of tools for quite a > good range of file systems, including ext4 > > Good luck > Francisco This is an embedded system. See my initial posting. Best regards, mcc ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-02 22:23 ` [gentoo-user] " walt 2013-09-02 22:46 ` Francisco Ares @ 2013-09-03 2:45 ` meino.cramer 2013-09-03 3:07 ` William Kenworthy ` (2 more replies) 1 sibling, 3 replies; 21+ messages in thread From: meino.cramer @ 2013-09-03 2:45 UTC (permalink / raw To: gentoo-user 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 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 bad > 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; emerge ...). 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 dd somehow? ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-03 2:45 ` meino.cramer @ 2013-09-03 3:07 ` William Kenworthy 2013-09-03 3:26 ` meino.cramer 2013-09-03 6:18 ` J. Roeleveld 2013-09-18 17:54 ` Daniel Wagener 2 siblings, 1 reply; 21+ messages in thread From: William Kenworthy @ 2013-09-03 3:07 UTC (permalink / raw To: gentoo-user 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 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 bad >> 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; emerge ...). > > > 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 dd somehow? > > > > > Have you run out of inodes? - ext 4 has had very mixed success for me on solid state. Running out of inodes is a real problem for gentoo on smaller SD cards with standard settings. BillK ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-03 3:07 ` William Kenworthy @ 2013-09-03 3:26 ` meino.cramer 2013-09-03 3:47 ` William Kenworthy 0 siblings, 1 reply; 21+ messages in thread From: meino.cramer @ 2013-09-03 3:26 UTC (permalink / raw To: gentoo-user 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 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 bad > >> 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; emerge ...). > > > > > > 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 dd somehow? > > > > > > > > > > > > Have you run out of inodes? - ext 4 has had very mixed success for 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 *without* 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-03 3:26 ` meino.cramer @ 2013-09-03 3:47 ` William Kenworthy 2013-09-03 5:13 ` Pandu Poluan ` (2 more replies) 0 siblings, 3 replies; 21+ messages in thread From: William Kenworthy @ 2013-09-03 3:47 UTC (permalink / raw To: gentoo-user 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 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 bad >>>> 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; emerge ...). >>> >>> >>> 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 dd somehow? >>> >>> >>> >>> >>> >> Have you run out of inodes? - ext 4 has had very mixed success for 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 *without* > 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 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 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-03 3:47 ` William Kenworthy @ 2013-09-03 5:13 ` Pandu Poluan 2013-09-03 16:06 ` meino.cramer 2013-09-03 14:13 ` Francisco Ares 2013-09-03 16:11 ` meino.cramer 2 siblings, 1 reply; 21+ messages in thread From: Pandu Poluan @ 2013-09-03 5:13 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 2373 bytes --] On Sep 3, 2013 10:51 AM, "William Kenworthy" <billk@iinet.net.au> wrote: > > On 03/09/13 11:26, meino.cramer@gmx.de wrote: > > William Kenworthy <billk@iinet.net.au> [13-09-03 05:08]: --snip-- > >> Have you run out of inodes? - ext 4 has had very mixed success for 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 *without* > > 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 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 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 > > While you're considering of formatting the flash disk, consider also whether ext3/4 is suitable. When I first use Gentoo, I got bitten by inode exhaustion several times, so I used an inode-less fs (reiserfs, to be precise). I have no idea if reiserfs is suitable for a flash disk, though. Rgds, -- [-- Attachment #2: Type: text/html, Size: 3327 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-03 5:13 ` Pandu Poluan @ 2013-09-03 16:06 ` meino.cramer 2013-09-03 20:55 ` Alan McKinnon 0 siblings, 1 reply; 21+ messages in thread From: meino.cramer @ 2013-09-03 16:06 UTC (permalink / raw To: gentoo-user Pandu Poluan <pandu@poluan.info> [13-09-03 17:16]: > On Sep 3, 2013 10:51 AM, "William Kenworthy" <billk@iinet.net.au> wrote: > > > > On 03/09/13 11:26, meino.cramer@gmx.de wrote: > > > William Kenworthy <billk@iinet.net.au> [13-09-03 05:08]: > > --snip-- > > > >> Have you run out of inodes? - ext 4 has had very mixed success for 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 *without* > > > 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 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 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 > > > > > > While you're considering of formatting the flash disk, consider also > whether ext3/4 is suitable. > > When I first use Gentoo, I got bitten by inode exhaustion several times, so > I used an inode-less fs (reiserfs, to be precise). > > I have no idea if reiserfs is suitable for a flash disk, though. > > Rgds, > -- Hi Pandu, ext3/4 is what is recommended by www.beagleboard.org/Robert Nelson/Angstrom Linux...but I have to confess that took this as simply "given". The other thing is: With sdcards one have to keep an eye on what part of the sdcard is written how often repeatedly, since sdcards tends to wear out. I read somewhere on the internet (dont remember where...sorry) that Samsung has offered code to the Linux kernel, which implements a special FS especially suitable and made for sdcards. But I dont know its name and whether it is already available in the kernel sources... Best regards, mcc ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-03 16:06 ` meino.cramer @ 2013-09-03 20:55 ` Alan McKinnon 0 siblings, 0 replies; 21+ messages in thread From: Alan McKinnon @ 2013-09-03 20:55 UTC (permalink / raw To: gentoo-user On 03/09/2013 18:06, meino.cramer@gmx.de wrote: > > The other thing is: With sdcards one have to keep an eye on > what part of the sdcard is written how often repeatedly, since > sdcards tends to wear out. > > I read somewhere on the internet (dont remember where...sorry) that > Samsung has offered code to the Linux kernel, which implements a > special FS especially suitable and made for sdcards. > > But I dont know its name and whether it is already available in > the kernel sources... F2FS perhaps? It's in the mainline kernel already. http://en.wikipedia.org/wiki/F2FS http://www.linux.org/threads/flash-friendly-file-system-f2fs.4477/ -- Alan McKinnon alan.mckinnon@gmail.com ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-03 3:47 ` William Kenworthy 2013-09-03 5:13 ` Pandu Poluan @ 2013-09-03 14:13 ` Francisco Ares 2013-09-03 15:56 ` meino.cramer 2013-09-03 16:11 ` meino.cramer 2 siblings, 1 reply; 21+ messages in thread From: Francisco Ares @ 2013-09-03 14:13 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 3900 bytes --] 2013/9/3 William Kenworthy <billk@iinet.net.au> > 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 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 bad > >>>> 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; emerge ...). > >>> > >>> > >>> 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 dd > somehow? > >>> > >>> > >>> > >>> > >>> > >> Have you run out of inodes? - ext 4 has had very mixed success for 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 *without* > > 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 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 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 > > > Just my 2 cents: while updating I think it would it be a good practice to have some sort of external storage (even networked) and do a unionfs with the working file system. Some folders inside /usr use to keep almost half (more, sometimes) of all files in my systems (like "/usr/portage" , "/usr/src" and "/usr/include" , which are not needed while not under system maintenance). Francisco [-- Attachment #2: Type: text/html, Size: 5540 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-03 14:13 ` Francisco Ares @ 2013-09-03 15:56 ` meino.cramer 0 siblings, 0 replies; 21+ messages in thread From: meino.cramer @ 2013-09-03 15:56 UTC (permalink / raw To: gentoo-user Francisco Ares <frares@gmail.com> [13-09-03 17:23]: > 2013/9/3 William Kenworthy <billk@iinet.net.au> > > > 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 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 bad > > >>>> 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; emerge ...). > > >>> > > >>> > > >>> 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 dd > > somehow? > > >>> > > >>> > > >>> > > >>> > > >>> > > >> Have you run out of inodes? - ext 4 has had very mixed success for 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 *without* > > > 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 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 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 > > > > > > > Just my 2 cents: while updating I think it would it be a good practice to > have some sort of external storage (even networked) and do a unionfs with > the working file system. Some folders inside /usr use to keep almost half > (more, sometimes) of all files in my systems (like "/usr/portage" , > "/usr/src" and "/usr/include" , which are not needed while not under system > maintenance). > > Francisco Hi Francisco, GOOD point! Only one thing "forbids" this: I often commute between two places. I bought this little embedded computer to do try this or that with it at both places. I have internet access at both places but only at home there is my PC with Gentoo Linux. I dont want to miss Gentoo-hacking ;) at one of the places... :) Best regards, mcc ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-03 3:47 ` William Kenworthy 2013-09-03 5:13 ` Pandu Poluan 2013-09-03 14:13 ` Francisco Ares @ 2013-09-03 16:11 ` meino.cramer 2013-09-03 23:26 ` Francisco Ares 2 siblings, 1 reply; 21+ messages in thread From: meino.cramer @ 2013-09-03 16:11 UTC (permalink / raw To: gentoo-user 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 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 bad > >>>> 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; emerge ...). > >>> > >>> > >>> 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 dd somehow? > >>> > >>> > >>> > >>> > >>> > >> Have you run out of inodes? - ext 4 has had very mixed success for 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 *without* > > 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 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 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 <backup file> <root of embedded system> the rootfs has only one partition... Is it alos ok to use tar or is there any drawback....? Best regards, mcc ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-03 16:11 ` meino.cramer @ 2013-09-03 23:26 ` Francisco Ares 2013-09-04 0:22 ` meino.cramer 0 siblings, 1 reply; 21+ messages in thread From: Francisco Ares @ 2013-09-03 23:26 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 4926 bytes --] 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 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 bad > > >>>> 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; emerge ...). > > >>> > > >>> > > >>> 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 dd somehow? > > >>> > > >>> > > >>> > > >>> > > >>> > > >> Have you run out of inodes? - ext 4 has had very mixed success for 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 *without* > > > 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 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 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 <backup file> <root of embedded 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 tar, 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 locally in your embedded computer, and applying an unionfs to the rootfs. Just dreaming, of course. Góod luck Francisco [-- Attachment #2: Type: text/html, Size: 7124 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-03 23:26 ` Francisco Ares @ 2013-09-04 0:22 ` meino.cramer 2013-09-06 15:18 ` Francisco Ares 0 siblings, 1 reply; 21+ messages in thread From: meino.cramer @ 2013-09-04 0:22 UTC (permalink / raw To: gentoo-user Francisco Ares <frares@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 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 bad > > > >>>> 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; emerge > ...). > > > >>> > > > >>> > > > >>> 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 dd > somehow? > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >> Have you run out of inodes? - ext 4 has had very mixed success for > 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 *without* > > > > 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 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 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 <backup file> <root of embedded 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 tar, > 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 locally > in your embedded computer, and applying an unionfs to the rootfs. Just > dreaming, of course. > > Góod 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 ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-04 0:22 ` meino.cramer @ 2013-09-06 15:18 ` Francisco Ares 0 siblings, 0 replies; 21+ messages in thread From: Francisco Ares @ 2013-09-06 15:18 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 7633 bytes --] 2013/9/3 <meino.cramer@gmx.de> > Francisco Ares <frares@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 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 bad > > > > >>>> 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; emerge > > ...). > > > > >>> > > > > >>> > > > > >>> 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 dd > > somehow? > > > > >>> > > > > >>> > > > > >>> > > > > >>> > > > > >>> > > > > >> Have you run out of inodes? - ext 4 has had very mixed success for > > 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 *without* > > > > > 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 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 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 <backup file> <root of embedded 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 tar, > > 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 locally > > in your embedded computer, and applying an unionfs to the rootfs. Just > > dreaming, of course. > > > > Góod 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 [-- Attachment #2: Type: text/html, Size: 10860 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-03 2:45 ` meino.cramer 2013-09-03 3:07 ` William Kenworthy @ 2013-09-03 6:18 ` J. Roeleveld 2013-09-18 17:54 ` Daniel Wagener 2 siblings, 0 replies; 21+ messages in thread From: J. Roeleveld @ 2013-09-03 6:18 UTC (permalink / raw To: gentoo-user On Tue, September 3, 2013 04:45, meino.cramer@gmx.de wrote: > PS: What come mind just in this moment: > Can I ran fsck on an binary image of the fs which I made with dd somehow? Yes, if you dd (or cp) the whole drive or just a partition, you can use any other tool on the image. That is how I recover pictures of memory cards after someone has pressed the "format" option in the camera menu... ;) -- Joost ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [gentoo-user] Re: Need help: Filesystem (ext4) corrupted! 2013-09-03 2:45 ` meino.cramer 2013-09-03 3:07 ` William Kenworthy 2013-09-03 6:18 ` J. Roeleveld @ 2013-09-18 17:54 ` Daniel Wagener 2 siblings, 0 replies; 21+ messages in thread From: Daniel Wagener @ 2013-09-18 17:54 UTC (permalink / raw To: gentoo-user You dont happen to have a reasonable identical SD Card around, so you could dd the image on to see whether this is card related, do you? On Tue, 3 Sep 2013 04:45:04 +0200 meino.cramer@gmx.de wrote: > I did a binary image backup with dd of the sdcard. ^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2013-09-18 20:51 UTC | newest] Thread overview: 21+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-09-02 16:15 [gentoo-user] Need help: Filesystem (ext4) corrupted! meino.cramer 2013-09-02 16:39 ` Pandu Poluan 2013-09-02 16:41 ` meino.cramer 2013-09-02 22:23 ` [gentoo-user] " walt 2013-09-02 22:46 ` Francisco Ares 2013-09-03 2:39 ` meino.cramer 2013-09-03 2:45 ` meino.cramer 2013-09-03 3:07 ` William Kenworthy 2013-09-03 3:26 ` meino.cramer 2013-09-03 3:47 ` William Kenworthy 2013-09-03 5:13 ` Pandu Poluan 2013-09-03 16:06 ` meino.cramer 2013-09-03 20:55 ` Alan McKinnon 2013-09-03 14:13 ` Francisco Ares 2013-09-03 15:56 ` meino.cramer 2013-09-03 16:11 ` meino.cramer 2013-09-03 23:26 ` Francisco Ares 2013-09-04 0:22 ` meino.cramer 2013-09-06 15:18 ` Francisco Ares 2013-09-03 6:18 ` J. Roeleveld 2013-09-18 17:54 ` Daniel Wagener
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox