Partitions and filesystems on an SSD
This answer explains that the actual locations of files on an SSD are not related to the perceived locations, and will change every time the file is updated.
What I wonder is does this apply to partitions and filesystems too?
If I create a partition 1000 times on an SSD and format it 1000 times, will the partition and filesystem data be written to different parts of the SSD every time?
What about a filesystem within a container file on a filestem on an SSD? Will the container file fragments be moved on the SSD every time a file within it (or even just a timestamp) is updated?
What I wonder is does this apply to partitions and filesystems too?
There are no files, partitions and file systems on an SSD, from the SSD controller’s standpoint. There are blocks with their LBAs (Logical Block Addresses). The wear-leveling algorithms and the underlying virtual-to-physical block number mappings apply to all data, no matter what the user of the SSD might call them. Some blocks happen to hold file system metadata. Other blocks happen to hold file data or partitioning metadata (such as GPT (if used) or LVM (if used)); the SSD neither knows nor cares which is which.
If I create a partition 1000 times on an SSD and format it 1000 times, will the partition and file system data be written to different parts of the SSD every time?
Not necessarily every time, but mostly yes, for the sake of wear leveling.
Additionally, physical block migration can sometimes affect blocks that have nothing to do with the ones being written. Consider, for example, what should happen when (say) 99% of the SSD is “full” (i.e. not discarded / trimmed (i.e. considered actual data)) and lots of write operations happen in the 1% of LBAs that the file system considers free or keeps reusing. If the SSD’s controller did not use a wise enough block (re)mapping algorithm, i.e. if that 1% of LBAs kept pointing at the same 1% of physical blocks all the time, then that 1% of physical blocks could go bad relatively quickly, effectively reducing the SSD’s life expectancy by a factor of 100 (in the sense of TBW, Total Bytes Written). In such case the controller may decide to swap frequently modified LBAs’ physical blocks with infrequently modified ones’ physical blocks, in order to keep physical block wear (more) even.