Discussion:
why jffs2 complain no space left on device while there is some space left ?
huzhibin
2006-10-10 08:59:47 UTC
Permalink
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)
/dev/mtdblock3 on /mnt/mtd3 type jffs2 (rw)
proc on /proc type proc (rw)
null on /var type ramfs (rw)


# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mtdblock2 / jffs2 defaults 0 0
/dev/mtdblock3 /mnt/mtd3 jffs2 defaults 0 0
proc /proc proc defaults 0 0
null /var ramfs defaults 0 0

the parameters creating jffs2:
mkfs.jffs2 \
--eraseblock=0x00010000 \
--cleanmarker=12 \
--big-endian \
-r mtd3 -o mtd3.img

anyone have any ideas?
thanks a lot.




Best Regards
***@routerd.com
2006-10-10


To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to ***@axis.com
huzhibin
2006-10-11 01:25:12 UTC
Permalink
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
#!/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
giving up the other sectors, but I've not had any problems since.
--Spence
-----Original Message-----
Of huzhibin
Sent: Tuesday, October 10, 2006 2:00 AM
To: jffs-dev
Subject: why jffs2 complain no space left on device while there is some
space left ?
all
# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mtdblock2 4032 3972 60 99% /
# 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.
# 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)
/dev/mtdblock3 on /mnt/mtd3 type jffs2 (rw)
proc on /proc type proc (rw)
null on /var type ramfs (rw)
# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mtdblock2 / jffs2 defaults 0 0
/dev/mtdblock3 /mnt/mtd3 jffs2 defaults 0 0
proc /proc proc defaults 0 0
null /var ramfs defaults 0 0
mkfs.jffs2 \
--eraseblock=0x00010000 \
--cleanmarker=12 \
--big-endian \
-r mtd3 -o mtd3.img
anyone have any ideas?
thanks a lot.
Best Regards
2006-10-10
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
--------------------------------------
Best Regards
Shenzhen RouterD Networks Ltd.
huzhibin
***@routerd.com
2006-10-11







To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to ***@axis.com

Loading...