From Fedora Project Wiki

Revision as of 11:56, 9 September 2014 by Mvo (talk | contribs)

Description

Create a RAID device with Cockpit

Setup

Open Cockpit in your browser as described here.

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=20
# losetup -f /disk1.img

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

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

# dd if=/dev/zero of=/disk4.img bs=1M count=20
# 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. Log in as "root".
  2. Navigate to "Storage" for your machine.
  3. Create a RAID device of level "raid5" out of *three* of the two devices.
  4. Format the device as "ext4" and mount it on "/data".
  5. Remove one of the disks from the RAID device and observe that the RAID device is now "degraded".
  6. Add the forth disks and watch the RAID device recover.
  7. Unmount the filesystem.
  8. Delete the RAID device.

Expected Results

No errors should occur.