mdadm Linear Device

mdadm Library for Linear Devices (December 2023)

In Linux, mdadm (Multiple Disk and Device Management) is a utility used to manage software RAID (Redundant Array of Independent Disks) devices, which combines multiple physical disks into a single logical device to increase performance and reliability. Over the course of a few months, I worked on developing a linear device—a Non-RAID configuration that concatenates the disks like a normal RAID configuration but without the performance increase and redundancy. To clarify, not having redundancy means that if one disk fails, the data on that disk may be lost.

This mdadm library allows users to work with the linear device with ease. Users may mount the linear device to read or write into disks or blocks and unmount the device once they finish. Furthermore, caching was implemented to improve latency and reduce overall cost. Networking was also added to provide greater flexibility and give users the ability to connect to and interact with remote servers.

I learned how to...

  • Write a program using the C programming language.
  • Fix segmentation faults and other memory-related errors.
  • Gain experience using a debugger (i.e., gdb).
  • Code functionalities of the cache.
  • Program a client that connects to a server and can send/receive packets.