#16651: NAND space getting lost on RB450
--------------------------+-------------------------------------
  Reporter:  leonardogyn  |      Owner:  developers
      Type:  defect       |     Status:  new
  Priority:  high         |  Milestone:  Barrier Breaker 14.07
 Component:  base system  |    Version:  Trunk
Resolution:               |   Keywords:  yaffs2 nand routerboard
--------------------------+-------------------------------------

Comment (by leonardogyn):

 Well, while still running r42161 that i'm using on production right now, i
 tried to reproduce the workaround proposed by sidepipe on comment
 ticket:16651#comment:10, that truncating the files before deleting also
 workarounds the problem.

 So here we are ... i'm immediately after a new reflash on a RB450G:

 {{{
 root@OpenWrt:/# df | head -2
 Filesystem           1K-blocks      Used Available Use% Mounted on
 rootfs                  520192      6668    513524   1% /
 root@OpenWrt:/#
 }}}

 so i did a 100 runs of dd writing a 6Mb file, truncating it to file zero
 before erasing. I even listed the file before every deletion just to make
 sure i was deleting a zero sized file. The exact command used was:

 {{{
 i=1; while [ $i -lt 100 ]; do echo "run # $i"; false | tee /teste; ls -lsa
 /teste; rm -f /teste; dd if=/dev/urandom of=/teste bs=1M count=6; false |
 tee /teste; ls -lsa /teste; rm -f /teste; df | head -2; i=$(($i + 1));
 done
 }}}


 After run 1 i got:

 {{{
 run # 1
      0 -rw-r--r--    1 root     root             0 Jan 24 18:46 /teste
 Filesystem           1K-blocks      Used Available Use% Mounted on
 rootfs                  520192      6716    513476   1% /
 }}}

 and after the 100th run, i got:

 {{{
 run # 99
      0 -rw-r--r--    1 root     root             0 Jan 24 19:05 /teste
 Filesystem           1K-blocks      Used Available Use% Mounted on
 rootfs                  520192      9664    510528   2% /
 }}}

 So, despite sidepipe saying truncating the file before erasing
 workarounded the problem for him, i could not reproduce that :( Truncating
 the file before deletion doesnt changed the 'dissapearing space'
 situation.

 and rebooting after the dd tests, i got:

 {{{
 root@OpenWrt:/# df | head -2
 Filesystem           1K-blocks      Used Available Use% Mounted on
 rootfs                  520192     10068    510124   2% /
 }}}

 interesting enough is that truncating the file before deleting seems to,
 at some point, got the 'lost space' stable. The 'used' space got stable
 after run 62 (note it's the same after run 99).

 {{{
 run # 62
      0 -rw-r--r--    1 root     root             0 Jan 24 18:58 /teste
 Filesystem           1K-blocks      Used Available Use% Mounted on
 rootfs                  520192      9664    510528   2% /
 }}}

 so, despite truncating does not completly solves the problem, MAYBE it can
 bring it to a stable point.

--
Ticket URL: <https://dev.openwrt.org/ticket/16651#comment:12>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to