You are here

Reclaiming flash memory tied up in deleted files?

5 posts / 0 new
Last post
wa2ise
wa2ise's picture
Reclaiming flash memory tied up in deleted files?
I have noticed that, after creating a small web site on my Bullet M2 node, that after editing various files and deleting some, that the "free flash space" as reported on the status page of my node always decreases.  Now it says 868K.  How would I increase this,or do I need to completely reflash AREDN on the node (maybe the flash needs to be completely erased to get the space back)?  In the future, I'd have to test my edits elsewhere (like on my PC) before loading it onto the node, to avoid wasting flash space. 

I could just try it, but if reflashing doesn't do it, I'd like to know to avoid the agony...
KG6JEI
The files that are part of a
The files that are part of a stock install are packed in a manner that they are in a read only portion of the file system (this is done for efficiency in storage space and for resiliency allowing the ability to recover.) Editing a file causes the system to create a full duplicate to store this file in the read+write flash space, deleting a file requires the system to record that the file has been deleted.
 
Re​-flashing the node (or pressing and holding the reboot button for 15 seconds) will restore the system to just flashed state and will recover the space
wa2ise
wa2ise's picture
Is there a minimum amount of

Is there a minimum amount of flash that I must never go below?  If there is, and if I'm close to it, then I should reflash or reset as you mention.  So am I close to such a minimum?  If not I'll just leave it as is for now.

K5DLQ
K5DLQ's picture
My recommendation would be to
My recommendation would be to put your webserver (i.e. other apps) on a Raspberry Pi (or similar) or a PC, and attach it to the LAN port of the node.
KA9Q
Editing a file causes the

Editing a file causes the system to create a full duplicate to store this file in the read+write flash space

What Conrad is talking about here is known as an "overlay" or "union" file system. It's commonly used in flash-based embedded devices, or in systems that boot off read-only media such as a CD-R or DVD-R.  If you want to know more, check this out:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/filesystems/overlayfs.txt
 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer