Table of Contents

Advertisement

11.4. How to replace a failing hard drive in a SOFTWARE-RAID volume
Log on to the Apresa system shell:
User name: vidi
Password: -- For default password, see official manual --
The system shell can be reached remotely, with SSH (PuTTY), if "Enable remote shell" is enabled in the system
settings, or it can be done locally by connecting a monitor and keyboard to the Apresa machine, and rebooting.
To find out which drive has failed, open the web interface, and log on as administrator. Open the Tools menu,
choose System, click the System Information button, and look for the hard disk marked with an error.
Alternatively, it can also be found out from the command line, as follows:
cat /proc/mdstat
For RAID-1:
If you see [UU] then both drives are OK.
If you see [_U] then the first drive (SATA0) has failed.
If you see [U_] then the second drive (SATA1) has failed.
For RAID-5:
If you see [UUU] then all three drives are OK.
If you see [_UU] then the first drive (SATA0) has failed.
If you see [U_U] then the second drive (SATA1) has failed.
If you see [UU_] then the third drive (SATA2) has failed.
If you are replacing the first hard drive, then make sure the second hard disk is bootable, by issuing the following
command: (this is only needed for installations that were shipped before Apresa version 1.7.2)
sudo grub-install /dev/sdb
When prompted for a password, use the same password as previously.
Shutdown the system, as follows, in the web interface: Tools menu=>System=>Shutdown system. Or
alternatively, from the command line:
sudo halt
Then, replace the failed hard disk, with a new empty one with the same size, reboot, and log on in the system
shell (command prompt).
We need to prepare and then add the replaced drive to the RAID array. The commands that we need to issue,
depends on which drive we have replaced.
If the first drive (SATA0) was replaced, then type the following commands:
The next command should display no partitions.
sudo sfdisk -d /dev/sda
The next command should display a list of partitions.
sudo sfdisk -d /dev/sdb
If this is so, then preceed to the following command. Be very careful to write this command correctly.
sudo sfdisk -d /dev/sdb | sudo sfdisk --force /dev/sda
sudo mdadm -a /dev/md0 /dev/sda1
sudo mdadm -a /dev/md1 /dev/sda2
sudo mdadm -a /dev/md2 /dev/sda3
If the second drive (SATA1) was replaced, then type:
The next command should display no partitions.
sudo sfdisk -d /dev/sdb
81
INSTALLATION MANUAL APRESA
COPYRIGHT © 2011-2017 VIDICODE ®

Advertisement

Table of Contents
loading

Table of Contents