lwc:hardware:wear_leveling

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lwc:hardware:wear_leveling [2025/11/13 20:04] John Harrisonlwc:hardware:wear_leveling [2025/11/14 10:58] (current) John Harrison
Line 52: Line 52:
 </code> </code>
 === lighten ext4 journaling === === lighten ext4 journaling ===
 +//not sure ''data=writeback'' especially is a good idea and will survive ungraceful powerdown ongoingly without then mounting as RO on reboot at some point due to corrupted system. I'm thinking though even though data corruption is more likely, it will not flag a disk corruption. Instead some file data may be lost.//
   * in ''/etc/fstab'': ''/dev/mmcblk1p1  /  ext4  noatime,data=writeback,barrier=1,commit=60,errors=remount-ro  0  1''   * in ''/etc/fstab'': ''/dev/mmcblk1p1  /  ext4  noatime,data=writeback,barrier=1,commit=60,errors=remount-ro  0  1''
     * ''noatime'': don't update access time every time you read a file     * ''noatime'': don't update access time every time you read a file
Line 58: Line 59:
     * ''barrier=1'': maintain safety     * ''barrier=1'': maintain safety
     * data=writeback + sudden power loss = some recently changed files may become garbage inside (but no FS corruption)     * data=writeback + sudden power loss = some recently changed files may become garbage inside (but no FS corruption)
-  * add/change the ''cmdline'' in ''uEnv.txt'' (otherwise ''data=writeback'' will cause kernel to remount partition as Read Only:+  * add/change the ''cmdline'' in ''uEnv.txt'' (otherwise ''data=writeback'' will cause kernel to remount partition as Read Only):
     * ''cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 root=/dev/mmcblk1p1 rw rootfstype=ext4 rootwait''     * ''cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 root=/dev/mmcblk1p1 rw rootfstype=ext4 rootwait''
  
 === enable Trim === === enable Trim ===
- * When a file is deleted trim says to tell the OS to tell the flash controller that those blocks are no longer used. +  * When a file is deleted trim says to tell the OS to tell the flash controller that those blocks are no longer used. 
- * Unused blocks even in the file system can be used by the controller to help with wear leveling +  * Unused blocks even in the file system can be used by the controller to help with wear leveling 
- * Continuous trim is apparently a bad idea but for wear leveling a periodic trim of 1x/week is helpful"+  * Continuous trim is apparently a bad idea but for wear leveling a periodic trim of 1x/week is helpful
 <code> <code>
 sudo systemctl enable fstrim.timer # defaults to 1x/week sudo systemctl enable fstrim.timer # defaults to 1x/week
Line 71: Line 72:
  
 ==== Zram ==== ==== Zram ====
- * Zram doesn't help wear leveling directly but helps to maximize RAM availability so it can be helpful if that's an issue:+  *Zram doesn't help wear leveling directly but helps to maximize RAM availability so it can be helpful if that's an issue: 
 +//the below suggestions have not been tested//
 <code> <code>
 sudo apt update sudo apt update
  • lwc/hardware/wear_leveling.1763085857.txt.gz
  • Last modified: 2025/11/13 20:04
  • by John Harrison