Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 15607

Beginners • Re: Should I leave some unpartitioned space (for wear levelling) in a flash stick?

$
0
0
about the only point ive seen in the past, is to create a dedicated "free space" partition, and run blkdiscard on just that partition, to force a certain amount of blocks to remain free

so if i create a 20gig partition and discard it, then the rootfs will never be able to use that 20gig (because its not in the rootfs partition), and it forces me to never fill the device fully
but you could accomplish the same thing with the reservation flags in ext4, or just keeping a closer eye on the free space
This doesn't work, because:

Almost all flash devices use a logical to physical translation method that doesn't have any sort of correlation with the two address spaces

The number of free blocks is a function of how recently the FTL did garbage collection, and the number of bytes written afterwards.
Since ext4 uses update in place rather than copy on write
This doesn't matter, because flash devices use copy-on-write to update already-written pages.
I think

https://lwn.net/Articles/428584/

might help clarify the difference been how data is written and invalidated by the SD card firmware in comparison to the Linux filesystem layer.

Statistics: Posted by ejolson — Sun May 03, 2026 3:22 pm



Viewing all articles
Browse latest Browse all 15607

Latest Images

Trending Articles



Latest Images