What's new

Drive failing...

  • 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!

joe68000

Regular Contributor
It appears my router's (RT-AC5300 merlin fw 384.18) storage is failing. My logs are now full of the following:
Code:
Jul  7 09:30:59 RT-AC5300 kernel: sd 0:0:0:0: [sda] Unhandled sense code
Jul  7 09:30:59 RT-AC5300 kernel: sd 0:0:0:0: [sda]  Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Jul  7 09:30:59 RT-AC5300 kernel: sd 0:0:0:0: [sda]  Sense Key : Medium Error [current]
Jul  7 09:30:59 RT-AC5300 kernel: sd 0:0:0:0: [sda]  Add. Sense: Unrecovered read error
Jul  7 09:30:59 RT-AC5300 kernel: sd 0:0:0:0: [sda] CDB: Read(10): 28 00 00 01 1b 7e 00 00 08 00
Jul  7 09:30:59 RT-AC5300 kernel: end_request: I/O error, dev sda, sector 72574
Jul  7 09:31:03 RT-AC5300 kernel: sd 0:0:0:0: [sda] Unhandled sense code
Jul  7 09:31:03 RT-AC5300 kernel: sd 0:0:0:0: [sda]  Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Jul  7 09:31:03 RT-AC5300 kernel: sd 0:0:0:0: [sda]  Sense Key : Medium Error [current]
Jul  7 09:31:03 RT-AC5300 kernel: sd 0:0:0:0: [sda]  Add. Sense: Unrecovered read error
Jul  7 09:31:03 RT-AC5300 kernel: sd 0:0:0:0: [sda] CDB: Read(10): 28 00 00 01 1b 7e 00 00 08 00
Jul  7 09:31:03 RT-AC5300 kernel: end_request: I/O error, dev sda, sector 72574

Is there a way to disable the bad sector? What are my options here? Thanks for any help!
 
Last edited:
H
It appears my router's (RT-AC5300 merlin fw 384.18) storage is failing. My logs are now full of the following:
Code:
Jul  7 09:30:59 RT-AC5300 kernel: sd 0:0:0:0: [sda] Unhandled sense code
Jul  7 09:30:59 RT-AC5300 kernel: sd 0:0:0:0: [sda]  Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Jul  7 09:30:59 RT-AC5300 kernel: sd 0:0:0:0: [sda]  Sense Key : Medium Error [current]
Jul  7 09:30:59 RT-AC5300 kernel: sd 0:0:0:0: [sda]  Add. Sense: Unrecovered read error
Jul  7 09:30:59 RT-AC5300 kernel: sd 0:0:0:0: [sda] CDB: Read(10): 28 00 00 01 1b 7e 00 00 08 00
Jul  7 09:30:59 RT-AC5300 kernel: end_request: I/O error, dev sda, sector 72574
Jul  7 09:31:03 RT-AC5300 kernel: sd 0:0:0:0: [sda] Unhandled sense code
Jul  7 09:31:03 RT-AC5300 kernel: sd 0:0:0:0: [sda]  Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Jul  7 09:31:03 RT-AC5300 kernel: sd 0:0:0:0: [sda]  Sense Key : Medium Error [current]
Jul  7 09:31:03 RT-AC5300 kernel: sd 0:0:0:0: [sda]  Add. Sense: Unrecovered read error
Jul  7 09:31:03 RT-AC5300 kernel: sd 0:0:0:0: [sda] CDB: Read(10): 28 00 00 01 1b 7e 00 00 08 00
Jul  7 09:31:03 RT-AC5300 kernel: end_request: I/O error, dev sda, sector 72574

Is there a way to disable the bad sector? What are my options here? Thanks for any help!
Have amtm dc disk check enabled and then reboot, it may fix the error.
 
Thanks for the reply... it's enabled:

Code:
Tue Jul  7 09:17:20 DST 2020 Probing 'ext4' on device /dev/sda1
 Running disk check v2.9, with command 'e2fsck -p' on /dev/sda1
 /dev/sda1: clean, 3252/250976 files, 684952/1002943 blocks
 Tue Jul  7 09:17:23 DST 2020 Disk check done on /dev/sda1

but appears to be only checking the USB drive (/dev/sda1) can I configure it to check the built-in storage? (/dev/sda)
 
Thanks, that's a slick upgrade! But it's not my USB that is failing here, it's the internal storage.
 
sda should be the USB drive, not internal storage.
ssh to the router and post the output of 'mount'
 
Thanks for the reply!

Code:
admin@RT-AC5300:/tmp/home/root# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=257448k,nr_inodes=64362,mode=755)
proc on /proc type proc (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mtdblock4 on /jffs type jffs2 (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda1 on /tmp/mnt/sda1 type ext4 (rw,nodev,relatime,barrier=1,data=writeback)
tmpfs on /www/index_style.css type tmpfs (rw,relatime)
tmpfs on /www/require/modules/menuTree.js type tmpfs (rw,relatime)
/dev/mtdblock4 on /www/Main_LogStatus_Content.asp type jffs2 (rw,noatime)
 
Is this a flash drive or a SSD/HDD?

Is it always the same sector that's the problem or is it lots of different sectors?

Unmount and remove the device, plug it into a PC and use a disk utility to do a surface test.
 
Unmount and remove the device, plug it into a PC and use a disk utility to do a surface test.
Alternatively, first make sure the filesystem in unmounted. Then issue the following command to find and mark bad blocks.
Code:
e2fsck -c /dev/sda1

To be even more thorough do the following to perform a read/write check.
Code:
e2fsck -c -c /dev/sda1

Be warned that these tests will take a long time to complete so it's often quicker to do it on a PC.
 
Ok, so if this is a dying USB drive - what is the best way to upgrade to a new usb drive? Bring the router down, copy the files from the old usb drive to the new, then bring it back up? Will that work, or is there more that needs to be done?
 
Ok, so if this is a dying USB drive - what is the best way to upgrade to a new usb drive? Bring the router down, copy the files from the old usb drive to the new, then bring it back up? Will that work, or is there more that needs to be done?
I would,
1. Insert the new USB drive and use your preferred method to format it as ext4 (that's probably with amtm).
2. Once that's done issue a df -h command to make sure both devices are mounted and the names (sda1 and sdb1) haven't swapped around, which can sometimes happen if the router is rebooted.
3. Once you've confirmed both devices are mounted and you've confirmed the names of the source and destinations you can copy them as follows:
Code:
service stop_nasapps
swapoff -a
cp -a /tmp/mnt/sda1/. /tmp/mnt/sdb1
sync
Make sure you enter the cp command exactly as shown (assuming sda1 and sdb1 are correct for your particular setup).
4. Power off the router.
5. Remove the faulty device.
6. Power on the router.
 
After I have copied everything to the new drive, powered down and removed the old one, when the router comes back up, will the new one become /dev/sda1?

Also, since the faulty device is in the USB 3,0 port - I will initialize the new one in the 2.0 port, then move it to the 3.0 port. Will that cause any issues?

Thank you all very much!
 
After I have copied everything to the new drive, powered down and removed the old one, when the router comes back up, will the new one become /dev/sda1?
Yes.
Also, since the faulty device is in the USB 3,0 port - I will initialize the new one in the 2.0 port, then move it to the 3.0 port. Will that cause any issues?
It shouldn't.

P.S. If you have any third party scripts that use the USB drive it would probably be a good idea to disable those before doing the "service stop_nasapps" as well.
 
Yes.

It shouldn't.

P.S. If you have any third party scripts that use the USB drive it would probably be a good idea to disable those before doing the "service stop_nasapps" as well.

OK, so basically disable all of the capabilities provided via amtm, right?
 
OK, so basically disable all of the capabilities provided via amtm, right?
I couldn't say as I don't use any of those scripts. It's just a general principle to shut down any processes that might be writing to the USB drive before you copy the files.
 
Great! I completed my update. Thanks again for everyone's help... I noticed this in the logs before the upgrade and I still see it... must be something else.... any ideas?

Code:
Jul  8 19:47:52 RT-AC5300 syslog: Error unlocking 6: 9 Bad file descriptor
Jul  8 19:47:52 RT-AC5300 syslog: Error unlocking 0: 9 Bad file descriptor
 

Similar threads

Sign Up For SNBForums Daily Digest

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