[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error message "Device out of space" while writing to flash 2



On Tue, 2002-06-11 at 14:33, Andreas Malzahn wrote:
> some update to my question:
> we now have a system where we cannot write to flash because of 'device out
> of space' error, the command 'df' says:
> 
> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/flash3               2808      2808         0 100% /
> /dev/flash2                192       120        72  63% /mnt/flash
> tmpfs                     3328        40      3288   1% /var
> 
> so there should be enough space to write the file 'network.conf' in
> /etc/network.
> 
> but we cannot write the file, even after rebooting the hardware.
> 
> any help?

I'm not sure I trust df when it comes to JFFS. Try

du -s /mnt/flash

instead. (I'm not sure I trust that either:-)

It seems that JFFS for some reason cannot do garbage collect. Do you see
any strange messages on the debug port (or if you run "dmesg")? Do you
have any really big file on that partition?

You can erase the partition manually if you dare:

init 1
(wait 20secs or so)
cd /
tar -cvf /tmp/flash.tgz mnt/flash
umount /mnt/flash
eraseflash /dev/cflash2
(takes a while)
mount -t jffs /dev/flash2 /mnt/flash
tar -xvf /tmp/flash.tgz
init 3

That should free any garbage in the file system (but you're quite
vulnerable to power loss between eraseflash and init 3).

Best regards
/Jonas