Both sides previous revision Previous revision Next revision | Previous revision |
omv7:omv7_plugins:flashmemory [2024/01/23 21:32] – [Installation] crashtest | omv7:omv7_plugins:flashmemory [2025/08/22 02:55] (current) – [The Purpose of the Plugin] crashtest |
---|
{{indexmenu_n>4}} | {{indexmenu_n>3}} |
\\ | \\ |
<html><center><strong>FlashMemory Plugin For OMV7</strong></center></html> | <html><center><strong>FlashMemory Plugin For OMV7</strong></center></html> |
==== Installation ==== | ==== Installation ==== |
| |
For OMV6; installing OMV-Extras is accomplished by copying | For OMV7; installing OMV-Extras is accomplished by copying |
and pasting the following wget command, on your server's command line, as root: | and pasting the following wget command, on your server's command line, as root: |
\\ | \\ |
''apt-get install openmediavault-flashmemory''\\ | ''apt-get install openmediavault-flashmemory''\\ |
| |
Again, paste the above into the command line, as described above.\\ | Again, paste the above into a PuTTY session command line, as described above.\\ |
\\ | \\ |
2. Installation within the GUI: | 2. Installation within the GUI: |
| |
The Flashmemory plugin can now be found under, **System**, **Plugins**. Find **openmediavault-flashmemory** 6.X, highlight it and install. | The Flashmemory plugin can now be found under, **System**, **Plugins**. Find **openmediavault-flashmemory** 7.X, highlight it and install. |
| |
==== Configuration ==== | ==== Configuration ==== |
\\ | \\ |
=== Wear Leveling === | === Wear Leveling === |
While modern flash media drive is solid state, it’s life is limited by the number of write cycles it can withstand before it goes “read-only”. When an OEM specified number of flash memory blocks refuse to erase, the device’s controller will set it “read only”. At that point, the device’s useful life is over. | Flash memory drives, like USB thumb drives and SD cards, are solid state, but their memory cells can only handle a limited number of writes before they wear out. When too many cells can no longer be written or erased, the drive’s controller may switch it to ‘read-only’ mode, meaning you can’t save new data, and the drive’s useful life is over.\\ |
| \\ |
To extend the life of flash media, most modern flash devices have "wear leveling" built into their controllers. If blocks are written, but not erased, they experience no wear. If blocks are erased, the next new write is set on adjacent blocks that have never been written before. As data is erased and written, blocks are used starting at the beginning of the device’s available storage address range and proceed, in sequence, working toward the end. When the end of the range is reached, the process starts at the beginning and cycles through again. This wear leveling process avoids writing a single location to failure, and spreads wear evenly throughout. | To make flash drives last longer, modern drives use “wear leveling.” This is a clever system used by the drive’s controller that spreads writes across all the memory cells, so no single spot gets worn out too quickly. Instead of reusing the same cells over and over, the controller picks cells that have been used less, even if they’re not next to each other. This keeps the drive working reliably for a long time.\\ |
| \\ |
With wear leveling and using two drives of the same type, a drive that is twice the size will last roughly two times longer than the smaller drive. This may seem like is a strong vote for using a larger flash drive. However, when backups are considered, drives of twice the size also take twice as long to image and their image files are twice as large. (When using flash media as a boot drive, a practical trade-off should be considered in the 16 to 32GB range.) | A larger drive, like a 64GB USB compared to a 32GB one, can last longer because it has more cells to share the wear. For example, a drive twice as large might last about twice as long for the same amount of writing. However, larger drives take __longer__ to back up and they create bigger backup files. For a boot drive, a 16GB to 32GB drive is a good balance of lifespan, cost, and backup convenience. |
\\ | \\ |
\\ | \\ |
=== The Purpose of the Plugin === | === The Purpose of the Plugin === |
Most writes to OMV's boot drive are entries being appended to log files. While log file entries are very small writes, that may be as little at 80 bytes, they occur on a regular basis. A write operation to a flash device is done in writable "blocks" that are, typically, 2KB or 4KB minimum regardless of how small the write may be. This results in what is called "write amplification" where numerous large segments (2 to 4KB) of the drive are written to record very small amounts of data (+/- 80 bytes). The end result is writing all of the available blocks of the flash device rapidly, to exhaustion, where it will go read-only.\\ | Most writes to OMV's boot drive are entries added to log files. These writes are very small, sometimes as little as 80 bytes, but they happen often. A write to a flash device happens in “blocks", typically 4KB or larger, no matter how small the write may be. This causes “write amplification,” where large chunks of the drive are written to store tiny amounts of data (like 80 bytes). Over time, this can wear out a flash drive’s blocks quickly, making it go read-only.\\ |
\\ | \\ |
The primary purpose of the Flash Memory Plugin is to reduce the frequency of writes to flash media by consolidating very small writes into one, larger, bulk write that is flushed to the boot drive on shutdown. This dramatically reduces the number of blocks physically written to the Flash Device. The plugin can reduce the number of blocks written to the Flash drive by, potentially, an order of magnitude or 1/10th the amount that would otherwise be written. By extension, a drive of a given size might last up to 10 times longer than it would without the Flash Media plugin.\\ | The FlashMemory Plugin reduces wear by collecting these small writes in memory and saving them as one larger write, flushed to the boot drive on shutdown. This can cut down the number of blocks written to the drive by up to 10 times. As a result, a drive might last up to 10 times longer, depending on how it’s used, compared to operating without the plugin. |
\\ | \\ |
It's worth noting that SSD's would benefit from the FlashMemory plugin as well. | It’s worth noting that SSDs would benefit from the FlashMemory Plugin as well.\\ |
\\ | \\ |
| |