huzhibin | 10 Oct 10:59

why jffs2 complain no space left on device while there is some space left ?

Hi:
  all
  i have a strange problem with the jffs2 system: 
when i use df to check the space:
 # df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/mtdblock2            4032      3972        60  99% /

but it complain that no space left on device when i try to write on it:
# echo "hi" >hi.txt
cannot create hi.txt: No space left on device

there is more strange that the available space is not certain when it start complaining, sometime is 98, or
values less than 98.   

my system kernel is linux 2.4.17, filesystem is jffs2, run with 8M Flash.
following is some system infomation:
# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00020000 00010000 "Boot loader"
mtd1: 00100000 00010000 "Kernel"
mtd2: 003f0000 00010000 "Root File System"
mtd3: 002d0000 00010000 "Application File System"
mtd4: 00002000 00002000 "Partition Table"
mtd5: 00002000 00002000 "Factory default"
mtd6: 00008000 00002000 "Runtime NVRAM-T"
mtd7: 00008000

# mount
/dev/mtdblock2 on / type jffs2 (rw)
(Continue reading)

huzhibin | 11 Oct 03:25

Re: RE: why jffs2 complain no space left on device while there is some space left ?


Dear Spencer Shanson:
	thank u very much, but perhaps your  solution have no effects to me, the number of sectors for each partion is
more than 8 now, and sectors are contiguous, following  are the partions info, and each sector size is 64k,
so the sector number of partion '/dev/mtdblock2' is 63 sectors, do you have any suggestion?   thanks a lot.

Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/mtdblock2            4032      3972        60  99% /
/dev/mtdblock3            2880      2860        20  99% /mnt/mtd3

	

------- 2006-10-11 01:58:05 wrote:----------

>I had a similar problem. All the on-line docs I can find say you need to
>have 6 contiguous sectors assigned to the JFFS2 partition. That worked
>for a while, but eventually I ran into out-of-space problems. I wrote
>this simple script to verify it:
>
>#!/bin/sh
>
>I=1
>while [ 1 ]; do
>    echo "----> $I"
>    echo "Run $I " >>/nvram/foo
>    I=`expr $I + 1`
>done
>
>Someone else told me that the solution is to give the JFFS2 partition 8
>sectors. I tried that and it works great. Well, great if you don't mind
(Continue reading)

Babla Bunty | 25 Oct 15:21
Picon

Jffs2 Magic bitmask problem

Hi all,

I always get following warning while mounting mtd partition:

Reading data from NAND FLASH without ECC is not recommended
Empty flash at 0x001f85b8 ends at 0x001f85f0
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001f85f0:
0xffff instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001f85f4:
0x0219 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001f85fc:
0xaf8c instead

Following is the output of cat /proc/mtd:
dev:    size   erasesize  name
mtd0: 00030000 00004000 "NAND partition 0 : Bootloader"
mtd1: 001d0000 00004000 "NAND partition 1 : Kernel"
mtd2: 00200000 00004000 "NAND partition 2 : NAND Root"
mtd3: 07c00000 00004000 "NAND partition 3 : Romfs partition"

>From the above output,it is clear that erase size is 16K.
And i have erase the the mtd2 with following command:

flash_eraseall -j /dev/mtd/2

As jffs2 expects magic bitmask in first page of block.It seems jffs2
is trying to find magic bitmask in wrong page.
I am using 2.6.17 linux kernel .
Could somebody help ???
Regards,
(Continue reading)


Gmane