LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Hard drive being corrupted by every distro (https://www.linuxquestions.org/questions/linux-hardware-18/hard-drive-being-corrupted-by-every-distro-4175655991/)

copperly 06-18-2019 06:54 PM

Hard drive being corrupted by every distro
 
So I've been having an issue with hard drive corruption on my laptop for a very long time. Recently it has been that every single distro, ranging from Ubuntu to solus to fedora, has been rendered unusable by hard drive corruption. I got some advice from someone who works in IT about it and they thought the issue was that my ram was getting corrupted when I suspend and then written to disk, but disabling suspend did not help. My laptop is a Lenovo ideapad-15abr. I've done smart tests on my hard drive, and everything comes up as ok. I'm not sure what to do at this point, because in another week my current distro, pop_os, is going to be corrupted. I will be happy to provide any additional information if needed. The link below is to a shared google photos album that contains the gnome disks info for my hard drive and the smart test results. https://photos.app.goo.gl/M8LNzBSQYnN84st97

frankbell 06-18-2019 07:19 PM

Take a look at memtest: https://www.memtest86.com/

ondoho 06-19-2019 02:27 AM

I don't think your hard drive is being corrupted by Linux distros.

Assuming that your hard drive is simply failing, here's some search results for you (make sure to skip the ads at the top).

sevendogsbsd 06-19-2019 07:32 AM

Agree with ondoho: I have been using various Linux distros and BSDs for over 20 years and have never had a hard drive corruption issue, much less one caused by the OS. If I lose power, sure, the system will run a a file system check to ensure consistency, but that's normal in that condition.

I viewed the picture you posted a link to. Did I miss something? The pictures do not indicate anything wrong with the drive, unless I am misunderstanding something.

rtmistler 06-19-2019 07:53 AM

What I'm not hearing here is someone say a case where the system definitely works.

There's not enough evidence to blame Linux. But meanwhile there needs to be far greater evidence to blame any OS here.

Sorry, but it's either the hardware or the pilot.

tmittelstaedt 06-19-2019 08:32 AM

This is precisely the reason you don't buy cheap computers. This model has 4GB ram SOLDERED to the motherboard - if memtest comes up with a bit failure it has to go back to the factory for repair. I've seen plenty of DRAM failures over the years, it's why memory is supposed to be in a socket.

wipe it and put Windows on it and if it works, craigslist it out to someone. If it doesn't then have Lenovo warranty repair it.

rnturn 06-19-2019 09:08 AM

Quote:

Originally Posted by copperly (Post 6006948)
So I've been having an issue with hard drive corruption on my laptop for a very long time. Recently it has been that every single distro, ranging from Ubuntu to solus to fedora, has been rendered unusable by hard drive corruption. I got some advice from someone who works in IT about it and they thought the issue was that my ram was getting corrupted when I suspend and then written to disk, but disabling suspend did not help.

Question: Are you using a swap file? Or a swap partition?

If you wind up having to re-install when this happens, I would try the following:
  • When booting from the installation media for an install, do a bad block test on the disk. Use the option that does a read/write test of each block (Caution 1: Destructive Test. Caution 2: It takes a long time.). If it fails, I'd replace the disk. (In olden days, big iron block testing on SCSI drives would remap a bad block to a set of spares set aside by the manufacturer for this purpose---if, during normal operation, seeing numerous messages that a bad block was encountered and remapped was an indication it was time to replace the disk. I'm unsure if recent PC disks do this even though they treat everything as though it's a SCSI device.)
  • Set up a swap partition instead of a swap file. I'm thinking that if something was causing corruption when you suspend or hibernate the OS the damage would be limited to the swap partition.
  • Check your Grub boot menu information. I had some really odd information show up in my boot command line after a recent Leap installation. It appeared that the installer or the grub setup got confused about the disk naming and it pointed to an incorrect partition in the "resume=" portion. (My fix: Adding a label to swap partitions and mount them by label. I mount everything by label. "/", md-devices, you name it.)

Personally, I think you'll find that the disk may be going bad.

Good luck...

copperly 06-19-2019 09:19 AM

I wasn't really trying to blame Linux, just trying to say that it wasn't an individual distro that this was happening to. It very well might be a failing hard drive, in which case I can buy a new one, probably an SSD. I posted those pictures just to show some details about my hard drive and the results of the smart test even though it indicated that the drive was fine. I just thought it would be good info to start with. I have a swap partition and always have. One thing to note is that it's always my root partition that gets corrupted, all of the other partitions on the disk will be fine. I'll try to check the grub options, and I'll run a memtest.

TB0ne 06-19-2019 09:31 AM

Quote:

Originally Posted by copperly (Post 6006948)
So I've been having an issue with hard drive corruption on my laptop for a very long time. Recently it has been that every single distro, ranging from Ubuntu to solus to fedora, has been rendered unusable by hard drive corruption. I got some advice from someone who works in IT about it and they thought the issue was that my ram was getting corrupted when I suspend and then written to disk, but disabling suspend did not help. My laptop is a Lenovo ideapad-15abr. I've done smart tests on my hard drive, and everything comes up as ok. I'm not sure what to do at this point, because in another week my current distro, pop_os, is going to be corrupted. I will be happy to provide any additional information if needed. The link below is to a shared google photos album that contains the gnome disks info for my hard drive and the smart test results. https://photos.app.goo.gl/M8LNzBSQYnN84st97

Just because the drive isn't telling you it's not OK, doesn't mean there isn't a part that's flaky. Also, bear in mind that heat (say, in a small laptop?) can effect things.

One thing you haven't said is how you typically shut the system down. Do you just power off? Pull the plug? Or do you hibernate/sleep? Could be nothing more than improper shutdown, causing the drive to need to be fsck'ed, as ANY distro would. Has the 'someone who works in IT' offered to help? Because suspend/sleep in Linux may not always work correctly, at least in my experience. And the fact that this problem follows you from one distro to another, actually rules OUT anything to do with Linux, since they have different kernels/drivers/release levels.

I'm with rtmistler here...it's either the hardware or you. And rather than formatting/reinstalling over and over, install a distro like Mint that has broad support and is aimed at new users, and LEAVE IT THERE. Do a proper shutdown on your system..don't just close the lid or sleep/hibernate, and see if your problem goes away. SSD's are cheap these days, and the performance increase is well worth it. Not to mention the fact that getting the HDD out of a laptop will help it run much cooler too.

rtmistler 06-19-2019 09:42 AM

+1 TB0ne,

There are a lot of analysis points to consider when diagnosing this type of problem.

You should asses how far you wish to go with diagnosing this. And clearly distribution changing does not seem to be helping you in this case.

copperly 06-19-2019 09:56 AM

Actually, the "person who works in IT" was my boss, I'm working under an internship. I'm going confirm what I learn from here with him. I always shutdown my system the correct way, no hard shuts or plug pulling here. One of the first things I tried was that thing with Linux mint, it had the exact same issue. I've been looking at an ssd for a long time, it's just that to match my 2tb hard drive that I currently have, it'd be fairly expensive. I don't want to spend that money at the moment if my current hard drive is still perfectly fine, so I want to make sure that it's not an issue on the software side. I still have to use this computer to work on, so I can't be doing destructive tests on my hard drive, but that's the limit for how much i'll test. I also don't want to drag it out for too long, as time has shown my time is ticking for this distro.

TB0ne 06-19-2019 10:04 AM

Quote:

Originally Posted by copperly (Post 6007158)
Actually, the "person who works in IT" was my boss, I'm working under an internship. I'm going confirm what I learn from here with him.

Did you get this laptop from the company, or is it yours, personally? And anyone who works in IT and knows what they're doing, should also know that a flaky piece of hardware can easily escape a test that's run every now and then. Unless you're capturing data the entire time the system is on, you could easily miss something.
Quote:

I always shutdown my system the correct way, no hard shuts or plug pulling here.
...and sleeping/hibernating????
Quote:

One of the first things I tried was that thing with Linux mint, it had the exact same issue.
Again, sleeping/hibernating?? Don't do it.
Quote:

I've been looking at an ssd for a long time, it's just that to match my 2tb hard drive that I currently have, it'd be fairly expensive. I don't want to spend that money at the moment if my current hard drive is still perfectly fine, so I want to make sure that it's not an issue on the software side. I still have to use this computer to work on, so I can't be doing destructive tests on my hard drive, but that's the limit for how much i'll test. I also don't want to drag it out for too long, as time has shown my time is ticking for this distro.
Again, **IT IS NOT THE DISTRO, PERIOD**. And for someone who's ostensibly younger (internship?), you're thinking like someone much older. You have a 2TB HDD...great! But:
  • How much of it is actually USED???
  • Why do you need 2TB on a laptop that's connected to the Internet?
  • Is there a reason you can't just put that 2TB drive into an external USB enclosure for extra storage?
  • Why can't/don't you use network storage (Google Drive/Dropbox or a personal NAS) for the extra room you need?
Even my main desktop system only has a 512MB SSD in it...because I connect to a network, that has the storage I need. With decent backups, RAID redundancy, etc....all things I can't do on my desktop, without spending a ton. Same for laptop...I connect to a network, and have my NAS available via encrypted tunnel. Don't have to lug things around.

copperly 06-19-2019 10:21 AM

I didn't sleep/hibernate on Linux Mint. Hibernate has never worked for me, and sleep has caused issues in the past but turning it off has not helped with the corruption. The laptop is my personal laptop. I can use a 500gb SSD, but I'd like around a 1tb SSD. I'm really not into keeping everything on the cloud, because I'd rather not deal with the uploading/downloading and I like knowing that I own the hardware that my data is being stored on (I don't have a NAS setup, and won't anytime soon). I have an external hard drive to back up to which works well for me. I understand that it's probably the drive, I just want to make sure. I do think it's weird that only one partition gets corrupted though, could that be an issue with the drive? Maybe with read/write?

copperly 06-19-2019 10:22 AM

actually looking at my disk usage, a 500gb ssd would work just fine. I keep all my large files on my external 1tb drive.

rtmistler 06-19-2019 10:33 AM

Your boss the IT person can't loan/give you a hard drive to try out?


All times are GMT -5. The time now is 03:30 AM.