This article describes steps to be taken to replace a hard disk in a Malware Analysis appliance. You may want to replace a disk due to either of the following:
This process applies to both S400 and S500 appliances.
All existing profiles will remain after completing this procedure.
Prerequisites
Command Line Shell in serial console or SSH access
Before You Begin - Maintenance Activity
If the disk is not faulty, you must first mark the disk as faulty before removing it from RAID (for /dev/sdc). Run the following command:
[email protected]:~$ sudo mdadm --manage /dev/md127 --fail /dev/sdc1
mdadm: set /dev/sdc1 faulty in /dev/md127
Procedure
Follow these steps to replace a Malware Analysis appliance hard disk.
[email protected]:~$ sudo python /opt/mag2/usr/share/mag2/pyscripts/raidcheck.pyc
Bay Device State
1 /dev/sdc1 faulty spare
2 /dev/sdd1 active sync
3 /dev/sde1 active sync
4 /dev/sdf1 active sync
5 /dev/sdg1 active sync
6 /dev/sdh1 active sync
/dev/sdc1 is marked as faulty and needs to be removed from the RAID array.
Continue to remove faulty disk? [y/N] y
mdadm: hot removed /dev/sdc1 from /dev/md127
Instructions:
- Shut down the system and replace the faulty disk in bay 1.
Done.
[email protected]:~$
[email protected]:~$ sudo python /opt/mag2/usr/share/mag2/pyscripts/raidcheck.pyc
[sudo] password for g2:
Bay Device State
1 /dev/sdc1 removed?
2 /dev/sdd1 active sync
3 /dev/sde1 active sync
4 /dev/sdf1 active sync
5 /dev/sdg1 active sync
6 /dev/sdh1 active sync
Replacement disk /dev/sdc found.
Continue to partition the new disk? [y/N] y
Checking that no-one is using this disk right now ...
OK
sfdisk: ERROR: sector 0 does not have an msdos signature
/dev/sdc: unrecognized partition table type
No partitions found
Warning: partition 1 does not end at a cylinder boundary
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
mdadm: added /dev/sdc1
Waiting until all RAID tasks are done: /dev/sdc1: spare rebuilding
[email protected]:~$ sudo python /opt/mag2/usr/share/mag2/pyscripts/raidcheck.pyc
Bay Device State
1 /dev/sdc1 active sync
2 /dev/sdd1 active sync
3 /dev/sde1 active sync
4 /dev/sdf1 active sync
5 /dev/sdg1 active sync
6 /dev/sdh1 active sync
Done.
S400 Example
[email protected]:~$ sudo python /opt/mag2/usr/share/mag2/pyscripts/raidcheck.pyc
Bay Device State
1 /dev/sda1 active sync
2 /dev/sdc1 active sync
Done.