Jump to content

Software RAID Under Debian


gamehead200

Recommended Posts

Hey guys,

I've been Googling for few hours but haven't found any descriptive guides on how to setup a software RAID under Debian, specifically a JBOD array (just a bunch of disks) or Linear RAID. I've read a bit about mdadm, but really have no clue where to start...

Why do I want this? So that I can combine a bunch of hard drives into a larger virtual one. I have done it under Windows, but have no idea how to do it under Linux.

Any help would be very much appreciated. :)

Link to comment
Share on other sites


This is what I've been doing:

Set up a partition on /dev/hdb, /dev/hdc, and /dev/hdd. Then, I ran:

mdadm --create --verbose /dev/md0 --level=linear --raid-devices=3 /dev/hdb1 /dev/hdc1 /dev/hdd1

And it created /dev/md0.

I ran:

cat /proc/mdstat

and it would show up in there... Then I added a file system to /dev/md0 by running:

mke2fs -j /dev/md0

and then mounted it under /files by running:

mount /dev/md0 /files

I also ran:

echo "DEVICES /dev/hdb /dev/hdc /dev/hdd" > /etc/mdadm/mdadm.conf

mdadm --brief --detail --verbose /dev/md0 >> /etc/mdadm/mdadm.conf

and added this line in /etc/fstab:

/dev/md0  /files  ext3  defaults  0  0

The, after reboot, it wouldn't exist anymore! What am I doing wrong?

Link to comment
Share on other sites

Success!!!!!!!! Here are my exact steps!

1. Created a partition on each drive and set the type as Linux Raid Autodetect (FD).

2. Ran the following on each partition to clear the superblock in the MD:

mdadm --zero-superblock /dev/hdb1

3. Created the array:

mdadm --create --verbose /dev/md0 --level=linear --raid-devices=3 /dev/hdb1 /dev/hdc1 /dev/hdd1

4. Gave it a filesystem:

mke2fs -j /dev/md0

5. Added the following line in /etc/fstab:

/dev/md0 /files ext3 rw,user 0 0

6. Copied the RAID configuration to the mdadm.conf file:

mdadm --detail --scan >> /etc/mdadm.conf

7. Mounted everything:

mount -a

8. Rebooted, and everything still shows up in /files!! :D

Filesystem		   1K-blocks	  Used Available Use% Mounted on
/dev/hda1 9487640 406704 8598988 5% /
tmpfs 59640 0 59640 0% /dev/shm
/dev/md0 44332080 32828 42047276 1% /files

Thanks to TAiN for doing some 1337 Googling! :D

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...