<<

System Test Procedure

1) RAID-1 Test Case: On your VB-Linux system, do sudo apt-get install mdadm. NOTE: You should be very careful not use your system disk (e.g. /dev/sda) for system tests since this would likely wipe out your file systems. Use only the RAM disks to be safe and always think twice before performing any tests the write to system critical storage block devices.

a) Create a simple mirrored RAID volume using MDADM for Multi-Device Administration as described in mdadm manual (also described on Wikipedia and in Linux Magazine) as follows:

mdadm --create /dev/md0 --chunk=4 --level=1 --raid-devices=2 /dev/ram0 /dev/ram1

Test this new device /dev/md0 like any block device by running:

dd if=/dev/md0 of=/dev/null bs=4k count=1000 dd if=/dev/zero of=/dev/md0 bs=4k count=1000

Produce a report on observed read and write performance compared to running the same tests on a simple RAM disk that is not mirrored (e.g. /dev/ram2). Note that “iostat” a utility from “sysstat” may be useful for measuring performance (I/Os per second).

b) Build a on your mirrored volume and testing failure and recovery with MDADM as follows:

mke2fs -m 0 /dev/md0 mkdir /mnt/raid1 mount /dev/md0 /mnt/raid1 dd if=/dev/zero of=/mnt/raid1/newfile bs=64k count=100 cat /proc/mdstat mdadm --detail /dev/md0

Provide sample output of the status of your /dev/md0 that has your file system using “df”.

Now continue with the following test command to simulate failure of one of the two member devices in the RAID volume, writes to the volume in , and subsequent recovery of the member after the writes:

mdadm --manage --set-faulty /dev/md0 /dev/ram0 mdadm --detail /dev/md0 dd if=/dev/zero of=/mnt/raid1/newfile2 bs=64k count=100 mdadm /dev/md0 -r /dev/ram0 mdadm --detail /dev/md0 mdadm /dev/md0 -a /dev/ram0 mdadm --detail /dev/md0

Report on what you observe for the above sequence of RAID member simulated failure and recovery commands.

1. Verify that MDADM can handle intermittent loss of communication with a disk drive in the RAID1 volume. 2. Verify that MDADM restores the mirrored data that was written to the file system on the RAID volume to the faulty drive when it is added back to the volume.

To make sure you can re-use the test RAM disks for future test cases (so they are not busy), stop and remove your /dev/md0

mdadm --stop /dev/md0 mdadm --remove /dev/md0

2) RAID-5 Test Case: repeat the data protection verification system tests from #1.

a) Create a 3+1 RAID5 volume using MDADM for Mulit-Device Administration as follows:

mdadm --create /dev/md1 --level=5 --raid-devices=4 /dev/ram0 /dev/ram1 /dev/ram2 /dev/ram3

Test this new device /dev/md0 like any block device by running:

dd if=/dev/md1 of=/dev/null bs=4k count=1000 dd if=/dev/zero of=/dev/md1 bs=4k count=1000

Produce a report on observed read and write performance compared to running the same tests on a simple RAM disk that is not mirrored (e.g. /dev/ram4). Note that “iostat” a utility from “sysstat” may be useful for measuring performance (I/Os per second).

How much does the the parity computation slow down read or write operations on a RAM disk?

Verify that this is within expectation (which is?).

b) Build a file system on the XOR parity protected volume and test failure and recovery with MDADM as follows:

mke2fs -m 0 /dev/md1 mkdir /mnt/raid1 mount /dev/md1 /mnt/raid1 dd if=/dev/zero of=/mnt/raid1/newfile bs=64k count=100 cat /proc/mdstat mdadm --detail /dev/md1

Provide sample output of the status of your /dev/md0 that has your file system using “df”.

Now continue with the following test command to simulate failure of one of the two member devices in the RAID volume, writes to the volume in degraded mode, and subsequent recovery of the member after the writes:

mdadm --manage --set-faulty /dev/md1 /dev/ram0 mdadm --detail /dev/md1 dd if=/dev/zero of=/mnt/raid1/newfile2 bs=64k count=100 mdadm /dev/md1 -r /dev/ram0 mdadm --detail /dev/md1 mdadm /dev/md1 -a /dev/ram0 mdadm --detail /dev/md1

Report on what you observe for the above sequence of RAID member simulated failure and recovery commands.

Verify that MDADM can handle intermittent loss of communication with a disk drive in the RAID1 volume. Verify that MDADM restores the mirrored data that was written to the file system on the RAID volume to the faulty drive when it is added back to the volume.

To make sure you can re-use the test RAM disks for future test cases (so they are not busy), stop and remove your /dev/md0

mdadm --stop /dev/md1 mdadm --remove /dev/md1

Testing Tips

Here are some tips for working with the Linux platform for this test:

1) You can list driver modules with “lsmod”

2) Use “dmesg” to see printk and other kernel log messages