Hard disk via usb stops mounting after emergency power off

Hi, please help, I installed OpenWrt 23.05.0 on my linksys ea8500 router and faced a problem when I use files on the hard disk partition connected to the router and at this moment turn off the router, this partition will not mount anymore. Only formatting the disk and mounting it again helps. I want to use the 4TB drive over LAN for watching movies, thanks for your help!

fsck(8) - check and repair a Linux filesystem.

2 Likes

What filesystem is the partition?

Dig in to the mount options of your file system or Google general recommendations that will make the filesystem more stable or less susceptible to corruption in case of sudden de-connection/power loss and or chose a filesystem that does better in this scenario.

OpenWrt can be configured to automatically run fsck for you, with settings that will attempt to automatically repair/fix the errors.

If you are using some of the file systems from Microsoft, then often the safest and best way to repair em is to run CHKDSK which is a windows program ... The Linux tools are reverse engineered and are still inferior to the original windows tool for it. This is definitely the case with NTFS, and I'm pretty certain also with extFAT.

So it's definitely smarter to use something like ext4 or maybe Btrfs, depending on the (size) and your need for specific features.

... ... ...

If you want people to way in with recommendations you gotta give us more ...
What kind of hard drive( hdd, ssd ,..), what size is it, is it powered by the router or an external power supply.
What is your use case, as in is it always connected to the router or will it be unplugged and connected to a PC sometimes (can you live without doing that) what operating system would that hypothetical PC be ...

1 Like