0

I built a RAID1 (mirror) with two identical disks of 2TB connected by SATA with mdadm tool (boot disk is an m.2 NMVe disk, the RAID is for storing data). The OS is BunsenLabs Lithium (based on Debian 10).

The commands issued were the following:

sudo apt-get install --no-install-recommends mdadm  #to avoid installing (unneeded?) mysql packages
sudo mdadm --create /dev/md0 /dev/sda1 /dev/sdb1 --level=1 --raid-devices=2
sudo mkfs.ext4 -F /dev/md0
sudo mkdir -p /mnt/md0
sudo chmod 777 /mnt/md0  #so non-sudo users can write to the disk
sudo mount /dev/md0 /mnt/md0

I tried to create and copy some files to test the array. Then I decided to reboot the system to see if the raid disk would automatically assemble and mount (or at least appear in the desktop), but to my surprise the disks disappeared. Linux doesn't recognize any /dev/sda or /dev/sdb, nor /dev/md0. So I can't reassemble the RAID, or reformat the disks to start it over again. The disks are recognized by the BIOS, but are invisible to Linux now, and I have no idea of what to do...

2
  • have you try fdisk -l /dev/sda? Mar 27 at 13:28
  • 1
    Doesn't fix the question you're asking, but swap the order of the mount and chmod. The filesystem's root directory permissions will override the permissions on the mountpoint, so it's those you need to fix, not the mountpoint.
    – roaima
    Mar 28 at 12:35

1 Answer 1

1

Before trying with mdadm, I was playing with BIOS RAID configuration, which instructions told me that I have to blacklist the ahci module in the grub configuration. That was the cause why /dev/sda and /dev/sdb weren't appearing.

Just make sure that in /etc/default/grub the line with GRUB_CMDLINE_LINUX_DEFAULT= doesn't include modprobe.blacklist=ahci. If you finally modify the file, don't forget to run update-grub afterwards.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.