问题
I wrote this question previously I'm testing SOLID STATE write failure times (c code) and the device isn't failing and it was brilliantly answered by Brendan.
I was basically asking about writing to an SD card many times and when it would fail as I am writing an application that will be writing data to an SD card for many years.
My follow up question is does wear leveling work at the disk or partition level.
If for ease of setting my application up, say i wanted 3 partitions
ie for examples sake a 16GB card
[partion0 2GB]
[partion1 1GB]
[partion2 1GB]
[12GB free unpartitioned space]
would the 12GB free unpartitioned space be available to all 3 partitions as 'user level over-provisioning ' (i know the physical card will have proper over-provisioning extra space of its own...)
or would the 12gb be ignored and only the free space in each partition would be available to that particular partition for wear leveling (excluding the cards extra space for this purpose).
I just want to know if say i left 50% of the card empty and split the card into a number of partitions that I am not affecting the wear leveling algorithm, otherwise I will have one partition and manage the data myself another way.
for clarity
i'm going to create 3 partitions with fdisk and use them RAW as RingBuffers, also it will be a brand new SD card. if those 3 partitions total 50% of the disk, leaving 50% unallocated space, when i save/update 1 SECTOR in a partition, is the unallocated disk space available/used by the controller for saving this SECTOR DATA as it is saving over the whole disk, or will it only save to other free sectors within that partition?
来源:https://stackoverflow.com/questions/61522796/sd-does-wear-leveling-work-at-the-partition-or-disk-level