Score:0

Ubuntu Server 20.04.3 data recovery

cd flag

I get the following error over and over: (about every 2 seconds)

blk_update_request: I/O error, dev sda, sector ######### op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0

I read some other posts here that suggest my hard drive is about to die or become totally unreadable.

ls is incredibly slow to respond but eventually shows my files are there but I'm not sure if I can actually load them.

These are important files I cannot afford to lose.

If this thing is about to crumble, I know I have a very limited working window in which to retrieve my important files.

I've read https://help.ubuntu.com/community/Smartmontools , but I'm not exactly sure about how to go about this?

I did install smartmontools (took about 20 minutes) and it's smartmon capable.

How do I recover my data?

Update:

Per Ray's suggestion, I read How to mount a hard disk as read-only from the terminal and am considering using:

sudo mount -o ro,noload /dev/sda1 /media/2tb

But if the error message includes0x0:(READ) and it's a problem with reading the disk, how will mounting it read only help?

Any help is greatly appreciated.

Thank you!

cn flag
Ray
`Smartmontools`, as the link above says, is to "test hard drives and read their hardware SMART statistics". You're way passed that. Your hard drive has failed and installing a tool that tells you that your hard drive might fail is not very useful any more. You should probably stop playing with it and just mount it as read only and copy files out...
YQ002lc2 avatar
cd flag
@RAy Thank you for your quick and kind reply! How do I mount it as read only and copy files out?
cn flag
Ray
Take a look at [this](https://askubuntu.com/questions/296331/how-to-mount-a-hard-disk-as-read-only-from-the-terminal). As for copying, that is straight-forward. However, you might require some patience as the hard drive has already failed. First focus on the files or directories that you absolutely need since the more you access it, the more likely the situation will get worse.
YQ002lc2 avatar
cd flag
@Ray Thank you! So I will have to make a live USB and work from it. Also, the file system in question is encrypted, so I guess it will prompt me to enter the decryption key. It sounds like I'll want to use the noload flag. I really hope it doesn't get worse. There's no way to recover this data if it does. Thank you for your help!
cn flag
Ray
If it's a root file system, then yes, you will need a live USB. If encryption has been employed then it might be a little bit more complicated. The main point is that you should stop writing to it. And, you should accept the worst case scenario, especially if you haven't been doing periodic backups.
YQ002lc2 avatar
cd flag
Does ```0x0:(READ)``` in the above error message mean that I'm screwed even if I do the read only option? It seems like it's saying it can't read that sector. So would read only fix that? I know what you're saying, about periodic backups. This sucks because I had just ordered equipment to backup my system, but it hadn't arrived when this happened. If it could have waited just another week, I'd have been fine.
YQ002lc2 avatar
cd flag
Is there some way to tell it to ignore that specific sector?
YQ002lc2 avatar
cd flag
I know I might only get one go at this and this info is not replaceable.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.