system - write error: No space left on device in embedded linux -
all have embedded board, run linux os. , use yaffs2 rootfs. run program on it, after times, got error "error no space left on device.". checked flash, there still have lot free space. write config file. config file update. program write log flash. log size limited 2m. don't know why, , how solve. me please!(my first language not english,sorry. hope understand say)
some debug info:
# ./write_test version 1.0 close file :: no space left on device return errno 28 # cat /proc/yaffs yaffs built:nov 23 2015 16:57:34 device 0 "rootfs" start_block........... 0 end_block............. 511 total_bytes_per_chunk. 2048 use_nand_ecc.......... 1 no_tags_ecc........... 1 is_yaffs2............. 1 inband_tags........... 0 empty_lost_n_found.... 0 disable_lazy_load..... 0 refresh_period........ 500 n_caches.............. 10 n_reserved_blocks..... 5 always_check_erased... 0 data_bytes_per_chunk.. 2048 chunk_grp_bits........ 0 chunk_grp_size........ 1 n_erased_blocks....... 366 blocks_in_checkpt..... 0 n_tnodes.............. 749 n_obj................. 477 n_free_chunks......... 23579 n_page_writes......... 6092 n_page_reads.......... 11524 n_erasures............ 96 n_gc_copies........... 5490 all_gcs............... 1136 passive_gc_count...... 1136 oldest_dirty_gc_count. 95 n_gc_blocks........... 96 bg_gcs................ 96 n_retired_writes...... 0 n_retired_blocks...... 0 n_ecc_fixed........... 0 n_ecc_unfixed......... 0 n_tags_ecc_fixed...... 0 n_tags_ecc_unfixed.... 0 cache_hits............ 0 n_deleted_files....... 0 n_unlinked_files...... 289 refresh_count......... 1 n_bg_deletions........ 0 device 2 "data" start_block........... 0 end_block............. 927 total_bytes_per_chunk. 2048 use_nand_ecc.......... 1 no_tags_ecc........... 1 is_yaffs2............. 1 inband_tags........... 0 empty_lost_n_found.... 0 disable_lazy_load..... 0 refresh_period........ 500 n_caches.............. 10 n_reserved_blocks..... 5 always_check_erased... 0 data_bytes_per_chunk.. 2048 chunk_grp_bits........ 0 chunk_grp_size........ 1 n_erased_blocks....... 10 blocks_in_checkpt..... 0 n_tnodes.............. 4211 n_obj................. 24 n_free_chunks......... 658 n_page_writes......... 430 n_page_reads.......... 467 n_erasures............ 7 n_gc_copies........... 421 all_gcs............... 20 passive_gc_count...... 13 oldest_dirty_gc_count. 3 n_gc_blocks........... 6 bg_gcs................ 4 n_retired_writes...... 0 n_retired_blocks...... 0 n_ecc_fixed........... 0 n_ecc_unfixed......... 0 n_tags_ecc_fixed...... 0 n_tags_ecc_unfixed.... 0 cache_hits............ 0 n_deleted_files....... 0 n_unlinked_files...... 2 refresh_count......... 1 n_bg_deletions........ 0 #
log , config file stored in "data". thanks!!
in general disk space (here flash), first of check flash space with df -h (or other commands have.. df present in busybox). if flash space (specially on program partition) ok, "inode" (directory) space problem, see inode usage df -i command.
(a link this: https://wiki.gentoo.org/wiki/knowledge_base:no_space_left_on_device_while_there_is_plenty_of_space_available)
if non of these problem cause, think have have deeper @ code, specially if deal disk i/o! mention aware of memory & heap space & free allocated spaces in functions.
Comments
Post a Comment