How to Mount Linux RAID Partitions and Fix “unknown filesystem type ‘linux_raid_member'” Error


9 views

When examining your fdisk -l output, we can see this is a software RAID setup with:

  • /dev/sda1 and /dev/sda2 marked as Linux RAID members (type fd)
  • Two active RAID arrays: /dev/md1 (10.7GB) and /dev/md2 (988.9GB)

The error occurs because you're trying to mount a RAID component directly. In Linux software RAID (mdadm), you should mount the assembled array (/dev/md*), not individual components.

First, check if the arrays are already active:

cat /proc/mdstat

If not assembled, scan and activate the arrays:

mdadm --assemble --scan
mdadm --examine --scan

For your specific case with /dev/sda1 being part of /dev/md1, you would:

mdadm --assemble /dev/md1 /dev/sda1
mount /dev/md1 /mnt

If the array won't assemble cleanly:

# Force assembly if needed (use with caution)
mdadm --assemble --force /dev/md1 /dev/sda1

# Check filesystem before mounting
fsck -y /dev/md1

Here's a complete workflow for resetting root password in your situation:

# Assemble all arrays
mdadm --assemble --scan

# Mount root partition (assuming /dev/md1 contains /)
mount /dev/md1 /mnt

# Mount critical directories for chroot
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys

# Change root
chroot /mnt

# Reset password
passwd root

To understand your RAID setup better:

mdadm --detail /dev/md1
mdadm --detail /dev/md2

This will show you the RAID level, component devices, and array status - crucial information for proper recovery.


From your fdisk -l output, I can see you're dealing with a Linux software RAID (mdadm) setup. The partitions /dev/sda1 and /dev/sda2 are marked as type fd (Linux RAID autodetect), and the system has already assembled two RAID arrays: /dev/md1 (likely your root) and /dev/md2 (probably your data partition).

The error mount: unknown filesystem type 'linux_raid_member' occurs because you're trying to mount a RAID component directly. In Linux software RAID, you should mount the assembled array (/dev/md*), not the individual disks.

First, let's verify if the RAID arrays are properly assembled:

cat /proc/mdstat

If the arrays aren't active, we need to assemble them manually:

mdadm --assemble --scan
# Or for specific arrays:
mdadm --assemble /dev/md1 /dev/sda1
mdadm --assemble /dev/md2 /dev/sda2

Once the arrays are assembled, you can mount the root partition (likely /dev/md1) to reset the password:

mount /dev/md1 /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
passwd
# Follow password change prompts
exit
umount -R /mnt

If you encounter issues during assembly, examine the RAID superblock:

mdadm --examine /dev/sda1
mdadm --examine /dev/sda2

For degraded arrays, you might need to force assembly:

mdadm --assemble --force /dev/md1 /dev/sda1

If the arrays won't assemble, you can try mounting the filesystem directly (not recommended for production):

modprobe linear
mdadm --build --level=linear --raid-devices=1 /dev/md9 /dev/sda1
mount /dev/md9 /mnt

Remember to clean up after password reset:

mdadm --stop /dev/md9