I have an x86-64 system running Ubuntu 24.04.2 LTS (recently upgraded from 22.04.5).
The root filesystem is on a 3 or 4 terabyte SATA hard drive (not an SSD).
Recently the filesystem stopped working with no warning. As far as I can tell, all directories are still readable, but attempting to read any file results in "Input/output error".
I still have an ssh session into the system, with several bash shell instances still running. I can only execute builtin commands (for example, ls fails but echo * works). I've also found a statically linked busybox executable on another drive, so I can use that to execute some limited commands, but the inability to access files means there's not much I can do.
If I logout of the system I'm not going to be able to log back in, and a reboot would almost certainly fail, so I'm leaving it as it is for as long as I can.
I presume this is some kind of hardware failure on the hard drive. My questions are: what is a likely cause, and is there any chance I'll be able to recover the files?
I do have (incomplete) backups, and I'm planning to get a new hard drive and install Ubuntu from scratch, but ideally I'd like to be able to copy my existing files to the new drive.