Hi friends, need some assistance fixing disk errors. I don’t have a lot of experience at the CLI, but some disk errors appear to be preventing me from simple tasks such as a backup. Any help is apreciated!
Assuming that you are talking about a real, physical, drive (HDD or SSD) then this sounds bad. You’ll not be able to fix hardware errors and if even things like backup won’t run it may well be too late to save the disk. Assuming that they are hardware errors on a real disk, don’t try to spin it up, go and buy the replacement, then if you have good backups, I’m afraid it is time to test just how good they are on the new disk.
If you don’t have good backups, then if you don’t have a lot of experience it is time to see if there is any experienced friend near you who can help. All that can be done is to try and get as much data as possible off the disk. I’ve heard of people recommending putting it in a plastic bag in the fridge, but I’ve never tried and have no idea if that works. Get a replacement disk that is larger that the old one and make a block-by-block copy (seek help) to a virtual disk on the new one. This should be the ONLY time you spin up the old disk.
One final point, if (as I fear from your description) the old disk is dead, then it still contains information which might be of use to a “black hat”. Bank details, identity theft or loss of commercial information come to mind. You may wish to consider a secure method of destruction rather that the local recycling centre.
Martin, its a virtualized disk running in Oracle Virtual Box. I don’t believe the disk has any physical damage (all though I might be wrong) as I haven’t gotten that deep into it. At this time I’m using GNOME disk but getting drive busy messages, which doesn’t surprise me. It might be best to first determine if I have a PHYSICAL disk problem, any suggestions?
I’m not familiar with Oracle Virtual Box but assuming (warning - assumption!) it is basically the same as QEMU/KVM then your virtual disk will exist as a file on a physical disk on your host machine. You need to check the host machine’s error logs and determine if that is flagging errors. If the hardware is U/S, then the virtual disk is equally U/S! If the hardware is still functional, make a block-by-block copy of the host file on the file TO ANOTHER DISK. Remember, something is triggering those errors and it may well be the hardware!
Once you’ve made the copy, you can try running your usual backups on the host machine, ensuring they include the virtual disk. Then, and only then, try to investigate the VM problem. If the VM is unrecoverable, make a copy from the copied file (never work on the security copy itself) and try that. Keep watching the host (maybe run SMART?), the physical disk may be failing. If you are lucky, and sometimes you can be, then the physical disk can revector bad blocks and continue, but you must now treat it with suspicion.
I’m not trying to offend, but in your first posting you mentioned “I don’t have a lot of experience at the CLI”; this is potentially a nasty situation and you should consider asking any one you know (and trust) who can be physically present.
Best wishes and good luck.
Martin, I know, it’s not a good situation to be in. I’m going to try to restore from a backup during November, then maybe I can copy over some essential items… That might be the easiest route for me.
If that’s the easiest and you won’t loose too much work it is a good solution. Remember though that the physical disk the virtual disk is on may be suspect. Again, good luck and best wishes.