TAG | assemble
21
Reassembling my RAID5 array after reinstall of Ubuntu Linux
0 Comments | Posted by Jeremy in disk, Karmic Koala 9.1, mdadm, OS Reinstall, raid5, Ubuntu
Karmic Koala instructions for reassembling my RAID 5 software array on my Server after reinstalling the OS
I didn’t learn to do this by choice! I mucked up my video configuraiton and couldn’t boot into the gnome… after spending about 4 or 5 hours trying to fix it; I “bit the bullet” and reinstalled ubuntu.
1. I installed mdadm
sudo apt-get install mdadm
2. I (re) assembled the array
sudo mdadm –assemble /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1
3. I got the details of the array
sudo mdadm –detail –scan
Output on this occasion was as follows; do not copy and paste this directly – it will be a different UUID for future arrays I create
ARRAY /dev/md0 level=raid5 num-devices=6 metadata=00.90 UUID=58155936:66553965:01f9e43d:ac30fbff
I found out later that I needed to remove one of the zeroes from the metadata version… when I did a sudo mdadm -D it gave me an error for the version information.
ARRAY /dev/md0 level=raid5 num-devices=6 metadata=0.90 UUID=58155936:66553965:01f9e43d:ac30fbff
4. I copied and pasted the above line into mdadm.conf
sudo nano /etc/mdadm.conf
File now has the following entry:
# definitions of existing MD arrays
ARRAY /dev/md0 level=raid5 num-devices=6 metadata=0.90 UUID=58155936:66553965:01f9e43d:ac30fbff
5. I created somewhere for the array to be mounted
cd /mnt
sudo mkdir raid
6. I wanted the drive to be mounted automaticaly on startup
sudo nano /etc/fstab
7. I added the following line
/dev/md0 /mnt/raid ext3 defaults 0 0
8. I mounted all arrays without rebooting
sudo mount -a
