What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Bad sectors in dev sda... repairable?

MacG32

Regular Contributor
RT-AX86U running Merlin 3004.388.8_4 with amtm 5.2 , Skynet 7.6.4, YaxFi 4.4.5 dev. Found these is my reboot logs. Had a power outage and decided to reboot and check the logs.

Code:
Mar 31 10:27:56 kernel: blk_update_request: critical medium error, dev sda, sector 64
Mar 31 10:27:56 kernel: blk_update_request: critical medium error, dev sda, sector 128
Mar 31 10:27:56 kernel: blk_update_request: critical medium error, dev sda, sector 112
Mar 31 10:27:56 kernel: Buffer I/O error on dev sda1, logical block 10, async page read
Mar 31 10:27:56 kernel: blk_update_request: critical medium error, dev sda, sector 120
Mar 31 10:27:56 kernel: Buffer I/O error on dev sda1, logical block 11, async page read
Mar 31 10:27:56 usb: USB ext4 fs at /dev/sda1 mounted on /tmp/mnt/SD_32GB_USB.

Are these errors repairable? Is it a bad flash? USB drive bad? Any help would be appreciated. I'm really worried.
 
Your USB drive may have failed into read-only mode. Can you write anything to the drive?

Try this:
Code:
touch /tmp/mnt/SD_32GB_USB/testfile
 
Your USB drive may have failed into read-only mode. Can you write anything to the drive?

Try this:
Code:
touch /tmp/mnt/SD_32GB_USB/testfile
Thank you for your help! It made a file called testfile in that directory. Is dev sda also the USB drive?
 
Last edited:
Is dev sda also the USB drive?
Yes. sda1 is the first partition on sda.

Run amtm and install the Disk check script (dc). Then reboot the router using the webUI and when it comes back up check the log file in amtm (dcl).
 
Yes. sda1 is the first partition on sda.

Run amtm and install the Disk check script (dc). Then reboot the router using the webUI and when it comes back up check the log file in amtm (dcl).
I removed the swap disk, uninstalled Skynet, reformatted the UBS drive, added the swap disk, and reinstalled Skynet. I installed Disk Check and rebooted. The log file came out clean.

Thank you so very much for all of your help! It's much appreciated!
 
IMHO, dc (Disk Check addon) should be installed right after you add any removable storage to these routers.
The typical router (no USB drives attached) has no need for filesystem management.
The OS/firmware reside in flash/rom. On every reboot or power on, it gets uncompressed into memory (RAM) and runs “fresh”.
That’s why it’s not a problem in simply turning off a typical router. No “live” filesystems. They all get recreated on the next power on.
But…
With external storage in the form of USB drives with Addons using it, there is always the potential for removable filesystem corruption in the event of a power off. They only option on an Asus router is reboot. There is no “power down” button. Again, not needed when there is no external/USB filesystem - the typical use case for the majority of users.

So, 2 ways to guard against external filesystem corruption.
1) Always format with journaling enabled.
2) Always install the dc addon

Then if you simply power off the router - on the next power on, dc will check the filesystem and, if journaling is enabled, potentially recover issues using journaling.

IMHO, it should be mandatory as soon as you format (fd command) any external USB storage device.
@thelonelycoder - maybe add a recommendation right after format to enable dc?
Or, simply enable dc as part of the fd command!
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top