From Fedora Project Wiki

(Created page with "{{QA/Test_Case |description= Create a RAID device with Cockpit |setup= Open Cockpit in your browser as described here. Make sur...")
 
No edit summary
 
(7 intermediate revisions by one other user not shown)
Line 3: Line 3:
Create a RAID device with Cockpit
Create a RAID device with Cockpit
|setup=
|setup=
Open Cockpit in your browser as described [[Test_Day:2014-09-16_Cockpit#How_to_test.3F|here]].
Log into Cockpit.
 
'''Make sure you have at least kernel 4.0.0-0.rc4.git1.3.''' Earlier kernels have this [https://bugzilla.redhat.com/show_bug.cgi?id=1202362 bug] and this test is known to fail.


Make sure you have at least four unused block devices.  If you don't
Make sure you have at least four unused block devices.  If you don't
Line 10: Line 12:


<pre>
<pre>
# dd if=/dev/zero of=/disk1.img bs=1M count=20
# dd if=/dev/zero of=/disk1.img bs=1M count=100
# losetup -f /disk1.img
# losetup -f /disk1.img


# dd if=/dev/zero of=/disk2.img bs=1M count=20
# dd if=/dev/zero of=/disk2.img bs=1M count=100
# losetup -f /disk2.img
# losetup -f /disk2.img


# dd if=/dev/zero of=/disk3.img bs=1M count=20
# dd if=/dev/zero of=/disk3.img bs=1M count=100
# losetup -f /disk3.img
# losetup -f /disk3.img


# dd if=/dev/zero of=/disk4.img bs=1M count=20
# dd if=/dev/zero of=/disk4.img bs=1M count=100
# losetup -f /disk4.img
# losetup -f /disk4.img
</pre>
</pre>
Line 29: Line 31:


|actions=
|actions=
# Log in as "root".
# Navigate to "Storage" for your machine.
# Navigate to "Storage" for your machine.
# Create a RAID device of level "raid5" out of *three* of the two devices.
# Create a RAID device of level "raid5" out of '''three''' of the four devices.
# Format the device as "ext4" and mount it on "/data".
# Format the device as "ext4" and mount it on "/data".
# Remove one of the disks from the RAID device and observe that the
# Remove one of the disks from the RAID device and observe that the RAID device is now "degraded".
  RAID device is now "degraded".
# Add the forth disks and watch the RAID device recover.
# Add the forth disks and watch the RAID device recover.
# Unmount the filesystem.
# Unmount the filesystem.
# Set the "Mount Point" of the filesystem in the "Filesystem Options" dialog to the empty string.  This will remove the corresponding line from /etc/fstab.  (Cockpit should do this automatically when the RAID device is deleted in the next step, but it currently does not, unfortunately.)
# Delete the RAID device.
# Delete the RAID device.
|results=
|results=
No errors should occur.
No errors should occur.
}}
}}

Latest revision as of 15:12, 24 March 2015

Description

Create a RAID device with Cockpit

Setup

Log into Cockpit.

Make sure you have at least kernel 4.0.0-0.rc4.git1.3. Earlier kernels have this bug and this test is known to fail.

Make sure you have at least four unused block devices. If you don't have enough real ones (such as USB sticks), you can make loopback devices like so:

# dd if=/dev/zero of=/disk1.img bs=1M count=100
# losetup -f /disk1.img

# dd if=/dev/zero of=/disk2.img bs=1M count=100
# losetup -f /disk2.img

# dd if=/dev/zero of=/disk3.img bs=1M count=100
# losetup -f /disk3.img

# dd if=/dev/zero of=/disk4.img bs=1M count=100
# losetup -f /disk4.img

These devices should imediately show up in Cockpit in the "Other Devices" section.

Make sure that these devices contain only zeros. Otherwise Cockpit might assume that they are in use for something and will not allow to use them for a new RAID device.

How to test

  1. Navigate to "Storage" for your machine.
  2. Create a RAID device of level "raid5" out of three of the four devices.
  3. Format the device as "ext4" and mount it on "/data".
  4. Remove one of the disks from the RAID device and observe that the RAID device is now "degraded".
  5. Add the forth disks and watch the RAID device recover.
  6. Unmount the filesystem.
  7. Set the "Mount Point" of the filesystem in the "Filesystem Options" dialog to the empty string. This will remove the corresponding line from /etc/fstab. (Cockpit should do this automatically when the RAID device is deleted in the next step, but it currently does not, unfortunately.)
  8. Delete the RAID device.

Expected Results

No errors should occur.