gamehead200 Posted September 25, 2006 Share Posted September 25, 2006 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 More sharing options...
allen2 Posted September 25, 2006 Share Posted September 25, 2006 Look for mdadd, mdcreate, mdrun commands. http://tldp.org/HOWTO/Software-RAID-HOWTO.html Link to comment Share on other sites More sharing options...
gamehead200 Posted September 25, 2006 Author Share Posted September 25, 2006 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/hdd1And 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 /filesI also ran:echo "DEVICES /dev/hdb /dev/hdc /dev/hdd" > /etc/mdadm/mdadm.confmdadm --brief --detail --verbose /dev/md0 >> /etc/mdadm/mdadm.conf and added this line in /etc/fstab:/dev/md0 /files ext3 defaults 0 0The, after reboot, it wouldn't exist anymore! What am I doing wrong? Link to comment Share on other sites More sharing options...
tain Posted September 25, 2006 Share Posted September 25, 2006 EDIT: I misread your post. Sorry. Link to comment Share on other sites More sharing options...
gamehead200 Posted September 25, 2006 Author Share Posted September 25, 2006 I haven't used mdadm, but it looks like you need to add the mounted drive to your fstab. Mounting doesn't get saved to a hard config.pico /etc/fstabI did. Check out my last step.Edit: Not a problem! Link to comment Share on other sites More sharing options...
gamehead200 Posted September 26, 2006 Author Share Posted September 26, 2006 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/hdb13. Created the array:mdadm --create --verbose /dev/md0 --level=linear --raid-devices=3 /dev/hdb1 /dev/hdc1 /dev/hdd14. Gave it a filesystem:mke2fs -j /dev/md05. Added the following line in /etc/fstab:/dev/md0 /files ext3 rw,user 0 06. Copied the RAID configuration to the mdadm.conf file:mdadm --detail --scan >> /etc/mdadm.conf7. Mounted everything:mount -a8. Rebooted, and everything still shows up in /files!! 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% /filesThanks to TAiN for doing some 1337 Googling! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now