Professional Documents
Culture Documents
rooms and finding less noisy places to sit. I may say the wrong thing several t
imes during the tutorial, but hopefully it will still be helpful. :o)
Steps:
1) Make the blank dd disk images
2) losetup the disks
3) Create the RAID
4) Create the NEW partition
5) Format the new partition
6) Make the new directory Mount Point
7) Mount the partition
8) df -h (show your work)
Open a root Shell:
sudo -s
Change directory to /tmp
cd /tmp
ls -lh
Create the Fake
dd if=/dev/zero
dd if=/dev/zero
dd if=/dev/zero
Drives:
of=./disk0.img bs=1M count=100
of=./disk1.img bs=1M count=100
of=./disk2.img bs=1M count=100
df -h
Create a log file on the Array:
mdadm --detail /dev/md0 | tee /mnt/database/1-RAID_Working.log
Fail a Drive:
mdadm /dev/md0 --fail /dev/loop0
Create a log file on the Array:
mdadm --detail /dev/md0 | tee /mnt/database/2-RAID_Fail_loop0.log
View the directory contents:
ls -lha /mnt/database
View the File Contents:
cat /mnt/database/*.log
Remove the Failed Drive:
mdadm /dev/md0 --remove /dev/loop0
Create a log file on the Array:
mdadm --detail /dev/md0 | tee /mnt/database/3-RAID_Remove_loop0.log
Re-Add the Failed Drive:
mdadm /dev/md0 -a /dev/loop0
Create a log file on the Array:
mdadm --detail /dev/md0 | tee /mnt/database/4-RAID_Re-add_loop0.log
Remove the Mount Point, Array, Devices, and Disk Files:
umount /mnt/database
rm -rf /mnt/database
df -h
mdadm
mdadm
mdadm
mdadm
--detail /dev/md0
--stop /dev/md0
--remove /dev/md0
--detail /dev/md0
losetup -d /dev/loop0
( -d deatached loop0)
losetup -d /dev/loop1
losetup -d /dev/loop2 ARCHIVE - This will be replaced by new videos in 2015.
rm -f disk*.img