User Tools

Site Tools


computers:mdadm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computers:mdadm [2011/02/03 17:21] chkuocomputers:mdadm [2011/08/24 15:15] (current) chkuo
Line 1: Line 1:
 ====== mdadm ====== ====== mdadm ======
 ===== Usage ===== ===== Usage =====
 +  * Overview: <code bash>cat /proc/mdstat</code> 
   * To view the status of an array: <code bash>sudo mdadm --detail /dev/md0</code>   * To view the status of an array: <code bash>sudo mdadm --detail /dev/md0</code>
-  * To mark a device as faulty: <code bash>sudo mdadm /dev/md0 --set-faulty /dev/sda</code> +  * To mark a device as faulty: <code bash>sudo mdadm /dev/md0 --set-faulty /dev/sda1</code> 
-  * To remove a failed or spare device: <code bash>sudo mdadm /dev/md0 --remove /dev/sda</code> +  * To remove a failed or spare device: <code bash>sudo mdadm /dev/md0 --remove /dev/sda1</code> 
-  * To add a device: <code bash>sudo mdadm /dev/md0 --add /dev/sda</code>+  * To add a device: <code bash>sudo mdadm /dev/md0 --add /dev/sda1</code>
  
 ===== Note ===== ===== Note =====
 Ubuntu server 10.04.1 installer has a known bug that prevents new installation on software RAID system from booting correctly (see [[http://ubuntuforums.org/showthread.php?t=1474950]] for more details). One possible solution to get around this problem is to setup disk partition and software RAID using 9.10 installation CD before installing 10.04. Ubuntu server 10.04.1 installer has a known bug that prevents new installation on software RAID system from booting correctly (see [[http://ubuntuforums.org/showthread.php?t=1474950]] for more details). One possible solution to get around this problem is to setup disk partition and software RAID using 9.10 installation CD before installing 10.04.
 +
 +===== Sample partition =====
 +  * HD: 500Gb * 3 (RAID 1, 1 hot spare)
 +    * /dev/md0: /boot, 200Mb, primary, ext2
 +    * /dev/md1: swap, 8G, primary
 +    * /dev/md2: /, 200Gb, primary, ext4
 +    * /dev/md3: /var, 150Gb, logical, ext4
 +    * /dev/md4: /home, 100Gb, logical, ext4
 +    * /dev/md5: /tmp, max, logical, ext4
 +
  
computers/mdadm.1296724878.txt.gz · Last modified: 2011/02/03 17:21 by chkuo