• 0 Posts
  • 3 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle
  • In my system, the raid arrays seem to do periodic data scrubbing automatically. Maybe it’s something that’s part of Debian, or maybe it’s just a default kernel setting. I don’t think it helps much with data integrity – I think it helps more just by ensuring the continued functionality of the drives.

    When it’s running, you can type cat /proc/mdstat to see the progress.

    That command will also show you if there is a failing drive, so that you can replace it.


  • Sure. First you set up a RAID5/6 array in mdadm. This is a purely software thing, which is built into the Linux kernel. It doesn’t require any hardware RAID system. If you have 3-4 drives, RAID5 is probably best, and if you have 5+ drives RAID6 is probably best.

    If your 3 blank drives are sdb1, sdc1, and sdd1, run this:

    mdadm --create --verbose /dev/md0 --level=5 -n 3 /dev/sdb1 /dev/sdc1 /dev/sdd1

    This will create a block device called /dev/md0 that you can use as if it were a single large hard drive.

    mkfs.btrfs /dev/md0

    That will make the filesystem on the block device.

    mkdir /mnt/bigraid
    mount /dev/md0 /mnt/bigraid
    

    This creates a mount point and mounts the filesystem.

    To get it to mount every time you boot, add an entry for this filesystem in /etc/fstab