To create a RAID 5 array with mdadm on Ubuntu 22.04, first install the mdadm package, identify your available disks using lsblk, and then use the mdadm --create command with the --level=5 and --raid-devices options to build the array, followed by formatting and mounting the new RAID device.
- Install
mdadm:
mdadm is not already installed, open your terminal and run:- Identify Available Disks:
lsblk to list all available disks and identify the ones you want to include in your RAID 5 array. Be careful to select the correct disks, as the process will erase any data on them. - Create the RAID 5 Array:
mdadm --create command to build the RAID 5 array. Replace /dev/md0 with your desired RAID device name (e.g., /dev/md0, /dev/md1, etc.), 3 with the number of devices in your array, and /dev/sda, /dev/sdb, /dev/sdc with the actual device names you identified in the previous step. For RAID 5, you need a minimum of three devices. - Verify RAID Creation:
- Format the RAID 5 Array:
ext4: - Mount the RAID 5 Array:
- Configure Automatic Mount on Boot (Optional):
/etc/fstab file:
No comments:
Post a Comment