OS harddrive is dying, thinking about cloning the disk

  • Hello,


    I was wondering if anyone here could give me some advise on a potential issue.
    This morning when I was updating my OMV box I noticed a "mildly nasty sound" coming from my rig.
    I had a look under [DISKS] and the OS disk showed a red dot, and when hovering over the dot it says "A few bad sectors" or something similar. So I guess the drive is dying...
    Now I have a spare disk and I was thinking of cloning the OS disk ASAP, but before doing that I have a couple of questions:


    1. Anyway to tell if any data (conf files etc) have been corrupted on the OS disk?
    After updating I restarted and it booted just fine, and everything seems to be working (still).
    But I was thinking that if "half of the data" is corrupted I might as well do a clean install, rather than dealing with broken configurations and packages later on.
    So anyway of checking this?


    2. If I clone the device with Clonezilla (device-device) and I do not screw things up, should I be able to just replace the old harddrive with the new one after cloning?
    I guess I need to change the boot device in the BIOS, but other than that I guess it is supposed to "just work" (all the GRUB settings and stuff like that are also cloned over to the new drive, right)?


    Any other things to keep in mind?

  • 1. you can use fsck to check/repair the disk before clone it with Clonezilla: fsck /dev/sda1
    Replace 'sda1' with your own drive.
    Clonezilla has the option of repair disk before it clone the drive too.


    2. Yes. If the target drive has the same or bigger storage capacity. If the replacement disk is bigger, then you can expand its size with GParted after you finish the clonening.

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

  • Just for future reference...


    So I read up on fsck and booted in to a live cd of Mint, made sure that I had not mounted the drive and ran fsck. It found a bunch of "problems" which I tried to fix by running fsck -y, but unfortunately it could not repair the file system completely. So, I decided to just do a fresh install (OMV is just so easy to setup + I have my server documented inside_out).


    Anyway thanks for the help!

  • Lucky me you are having this problem since I am experiencing it also, good to hear that your solution worked. And to not start a new thread about almost the same thing I am going to write a little about my problem and questions.


    So my problem has also to do with fsck but I am not able to boot into OMV as fsck stops the boot process and demands to be run. This requires root password that I am unable to remember what is. I have found out that this can be circumvented by using a live cd but my limited knowledge of debian makes this a scary operation. So like you ended up doing I have been thinking about a fresh install, especially since my current install is pretty old (the box has been in storage for the past year and a half). My config was pretty simple, NAS duty, Plex and torrent was what I was mostly using it for but was trying to find time to get OwnCloud and other backups going. I have not had to do much in terms of maintaining the box for the past 3-4 years so my "skills" are really rusty and I am unlikely to remember a good part of my settings... So I ask:


    Should I try running fsck with a live cd and clone the os drive to a new one if successful?


    or


    Should I just fresh install on one of my new os drives (I bought two to run in raid1 from now on) and see if I can mount my mdadm raid and be able to access my shares? (I am not sure how that works, easy or not so easy?)


    Thanks

  • Hi odinnn,


    Well I am no Debian guru myself either, so I cannot give any conclusive advise, but my setup sounds similar to yours (except OwnCloud, burned by it once, would not touch it with a stick), and setting up my box only took about 1 hour. So I am happy I took that path and now I can sleep easy knowing that my box will not suddenly break.

  • I recommend you guys do a fsck the drive prior to do the cloning.
    Otherwise, you end up cloning a fragment drive.
    If all fail, copy or write down all the notes of your current configs such as OwnCloud, Shares folder, Plex....before do a fresh installation.

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!