This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
managing_linux_software_raid [2008/08/27 09:57] adam created |
managing_linux_software_raid [2016/11/25 22:38] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
===== Managing Linux Software RAID ===== | ===== Managing Linux Software RAID ===== | ||
- | |||
- | [[http:// | ||
Below are some notes on using Linux Software RAID. It's not complete yet of course :) | Below are some notes on using Linux Software RAID. It's not complete yet of course :) | ||
Line 7: | Line 5: | ||
Marking a damaged disk as failed: | Marking a damaged disk as failed: | ||
- | mdadm --manage --set-faulty /dev/md0 /dev/sdc1 | + | mdadm --manage --set-faulty /dev/md1 /dev/sdd1 |
Removing the damaged disk from the array: | Removing the damaged disk from the array: | ||
- | mdadm /dev/md0 -r /dev/sdc1 | + | mdadm /dev/md1 -r /dev/sdd1 |
Shutdown your system, bring it up into single user mode and partition and format your new disk. Set the partition type as Linux Software RAID autodetect. Of course you need to partition your new disk the same as the previous one. Bring the machine up into it's default runlevel, either by rebooting or by doing init 5 or init 2 depending on your Linux distribution. | Shutdown your system, bring it up into single user mode and partition and format your new disk. Set the partition type as Linux Software RAID autodetect. Of course you need to partition your new disk the same as the previous one. Bring the machine up into it's default runlevel, either by rebooting or by doing init 5 or init 2 depending on your Linux distribution. | ||
Line 17: | Line 15: | ||
Add your new disk to the array: | Add your new disk to the array: | ||
- | mdadm /dev/md0 -a /dev/sdc1 | + | mdadm /dev/md1 -a /dev/sdd1 |
+ | |||
+ | Viewing the status of the array (the one shown here is repairing): | ||
+ | |||
+ | [root@host ~]# cat / | ||
+ | Personalities : [raid1] | ||
+ | md1 : active raid1 sdc1[2] sdd1[1] | ||
+ | 142327744 blocks [2/1] [_U] | ||
+ | [==========> | ||
+ | | ||
+ | 142327744 blocks [2/2] [UU] | ||
+ | |||
+ | unused devices: < | ||
+ | |||
+ | Showing status detail for a particular array: | ||
+ | |||
+ | [root@host ~]# mdadm --detail /dev/md1 | ||
+ | /dev/md1: | ||
+ | Version : 00.90.01 | ||
+ | Creation Time : Mon Sep 8 09:27:41 2008 | ||
+ | Raid Level : raid1 | ||
+ | Array Size : 142327744 (135.73 GiB 145.74 GB) | ||
+ | Device Size : 142327744 (135.73 GiB 145.74 GB) | ||
+ | Raid Devices : 2 | ||
+ | Total Devices : 2 | ||
+ | Preferred Minor : 1 | ||
+ | Persistence : Superblock is persistent | ||
+ | |||
+ | Update Time : Fri Sep 12 12:07:18 2008 | ||
+ | State : clean | ||
+ | | ||
+ | Working Devices : 2 | ||
+ | | ||
+ | Spare Devices : 0 | ||
+ | |||
+ | |||
+ | Number | ||
+ | | ||
+ | | ||
+ | UUID : 4f4ab348: | ||
+ | | ||
+ | |||
+ | View the Detail of a Particular Disk in an Array: | ||
+ | |||
+ | [root@host ~]# mdadm --examine /dev/sdd1 | ||
+ | / | ||
+ | Magic : a92b4efc | ||
+ | Version : 00.90.00 | ||
+ | UUID : 4f4ab348: | ||
+ | Creation Time : Mon Sep 8 09:27:41 2008 | ||
+ | Raid Level : raid1 | ||
+ | Device Size : 142327744 (135.73 GiB 145.74 GB) | ||
+ | Raid Devices : 2 | ||
+ | Total Devices : 2 | ||
+ | Preferred Minor : 1 | ||
+ | |||
+ | Update Time : Fri Sep 12 12:05:33 2008 | ||
+ | State : clean | ||
+ | | ||
+ | Working Devices : 2 | ||
+ | | ||
+ | Spare Devices : 0 | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | Number | ||
+ | this | ||
+ | | ||
+ | | ||
+ | ==== Other Articles on Linux Software RAID ==== | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// |