Check Disk

  • Enter the following commands at a Command Line with root privileges.

    cat /proc/mdstat
    fdisk -l /dev/sdb
    smartctl -a /dev/sdb
    smartctl -t short /dev/sdb
    smartctl -a /dev/sdb | grep -i 'execution status'
    smartctl -a /dev/sdb

Replace Debian RAID Disk B

  • Enter the following commands at a Command Line with root privileges.

    smartctl -i /dev/sda    # Write down the serial number of the hard disk
    smartctl -i /dev/sdb    # Write down the serial number of the hard disk
    cat /proc/mdstat
    mdadm --manage /dev/md126 --fail /dev/sdb1
    mdadm --manage /dev/md127 --fail /dev/sdb5
    cat /proc/mdstat
    shutdown -h now
  • Clean the computer using the blower.

  • Write down the serial number of the new hard disk.

  • Replace the faulty hard disk (check the serial numbers).

  • Note: Boot the computer from the 1st hard disk using the boot menu.

  • Enter the following commands at a Command Line with root privileges.

    smartctl -i /dev/sda    # Write down the serial number of the hard disk
    smartctl -i /dev/sdb    # Write down the serial number of the hard disk
    fdisk -l /dev/sda       # Make sure that /dev/sdb is the new hard disk
    fdisk -l /dev/sdb       # Make sure that /dev/sdb is the new hard disk
    sfdisk -d /dev/sda | sfdisk /dev/sdb    # Copy partition table from sda to sdb
    shutdown -r now
  • Note: Boot the computer from the 1st hard disk using the boot menu.

  • Enter the following commands at a Command Line with root privileges.

    fdisk -l /dev/sda
    fdisk -l /dev/sdb
    cat /proc/mdstat
    mdadm --manage /dev/md126 --add /dev/sdb1
    mdadm --manage /dev/md127 --add /dev/sdb5
    cat /proc/mdstat
  • Wait for resync to finish.

  • Note: Restart the computer to prevent the grub-install: warning: Couldn’t find physical volume '(null)'. Some modules may be missing from core image warning message.

  • Enter the following commands at a Command Line with root privileges.

    cat /proc/mdstat
    grub-install /dev/sda
    grub-install /dev/sdb
    shutdown -r now