OpenWRT SSD or USB or Disk Maintenance
Revision as of 09:33, 27 October 2022 by Root (talk | contribs) (Created page with "This article is about disk maintenance on an OpenWRT SSD, USB Flash Drive, or Disk Drive. It assumes all utilities needed are installed (see for more information). It also deals only with EXT4 volumes as it is easier to pull an SSD, USB Flash Drive, Disk Drive, etc., connect it to a Windows computer and scan it that way. * View Information on an EXT4 Partition / Volume: tune2fs -l /dev/sda1 * Only print the line about "Last checked": tune2fs -l /dev/sda1 | grep Last\...")
This article is about disk maintenance on an OpenWRT SSD, USB Flash Drive, or Disk Drive. It assumes all utilities needed are installed (see for more information). It also deals only with EXT4 volumes as it is easier to pull an SSD, USB Flash Drive, Disk Drive, etc., connect it to a Windows computer and scan it that way.
- View Information on an EXT4 Partition / Volume: tune2fs -l /dev/sda1
- Only print the line about "Last checked": tune2fs -l /dev/sda1 | grep Last\ checked (the \ (backslash) being used as an escape character for the space)
- Set Maximum Mount Count to 1: tune2fs -c 1 /dev/sda1
Automatic Scanning of /Overlay Partitions
Just like the brightness knobs on old fashion CRT based TVs, it don't work (Gallagher joke there). Really, it doesn't work. Go ahead and try it. In the /etc/config/fstab File, set it as below;
config global
option anon_swap '0'
option auto_swap '1'
option auto_mount '1'
option delay_root '5'
option check_fs '1'
option anon_mount '1'
config mount
option target '/overlay'
option uuid 'WhatEverUUID'
option fstype 'ext4'
option enabled_fsck '1'
option enabled '1'
One would think that an EXT4 partition would be checked with the above setting. Nope, no such luck. shutdown -rF now (yea, right, err, no way).