Linux Test Project

RAID1 Test Suite for LTP

written by Fei Fei

fei.fei@intel.com


Testcase Number Test Procedure Expected Results
1

Verify that disconnecting the power from disk1 will keep the system running healthy.

  1. Boot system with two disks connected.
  2. cat /proc/mdstat shows the two disks working in raid-1 mirror.
  3. Remove power cable from disk1 while the system is running.
  1. Ensure the system is still responding, and you can still read and write to the disk.
  2. Also, ensure an error message in /var/log/messages indicating one of the disks is off-line.
  3. If you have event logging installed, then look for event logger error (event_type=1021) using evlview -filter 'event_type=1021'.
2

Verify the system can boot from disk2 (the only connected disk).

  1. Before you do this step, make sure that lilo is set to boot from /dev/mdx device and not the sd device (boot=/dev/sdx).
  2. Boot system after test case 1.
  1. Verify the system reboot all the way with no problem.
  2. System responds to I/O commands after boot.
3

Verify the system boots from disk 1 only (disk 2 disconnected).

  1. Before you do this step, make sure that lilo is set to boot from /dev/mdx device and not the sd device (boot=/dev/sdx).
  2. Take the system down (normal shutdown).
  3. Disconnect the power from disk2 and connect it to disk1.
  1. Verify the system reboot all the way with no problem.
  2. System responds to I/O commands after boot.
4

Verify that re-connecting the power to disk 1 and disk 2 will keep the system running healthy.

  1. Shut down.
  2. Re-connect the power cable to the disk was removed (connect both disks).
  3. Bring the system up.
  1. Verify the system comes up healthy.
  2. The OS sees both disks using "fdisk -l".
  3. One of the raid disks is attached (cat /proc/mdstat).
5

Verify that you can bring the system to a healthy raid state after re-connecting both disks.

  1. After case 5, run raidhotadd on all partitions of the inactive disk. (e.g. raidhotadd /dev/md0 /dev/sdb1).
  1. cat /proc/mdstat shows remirror is in progress.
  2. Once completed, cat /proc/mdstat will show two disks are active.
  3. Verify the system still healthy (can write/read to disk).
6

Verify that inserting a new disk will keep the system running healthy.

  1. Take system down (normal shutdown).
  2. Connect a new secondary disk (disk 3) to the system along with one of disk 1 or disk 2.
  3. Boot system.
  1. The OS sees two disks using "fdisk -l".
Note: If hot-insertion feature supported, skip test case 6,7,8,9.
7

Verify that you can bring the new disk to a healthy raid 1 system.

  1. Partition the disk to the same size of the active disk.
  2. Run raidhotadd on each partition.
  1. Check /proc/mdstat shows the new disk is being added to raid-1.
  2. All partitions will copy with no problem.
8

Verify that the system can reboot after copying all data to disk 3.

  1. Update lilo (/sbin/lilo).
  2. Reboot the system with both disks.
  1. Verify the system reboot and comes up with two raid disks are attached. (cat /proc/mdstat).
9

Verify that the system can reboot from the new inserted disk only (disk 3).

  1. Take the system down (normal shutdown).
  2. Disconnect power from disk 2 or 1, and leave the power connected to disk 3, then bring the system up.
  1. Verify the system reboot all the way with no problem.
  2. System responds to I/O commands after boot.

Sourceforge.net  Last modified on: August 02, 2006 - 17:13:58 UTC.
Theme: