Guest User

Raid remove from array

a guest
Feb 10th, 2015
93
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. root@host:/dev# mdadm --create --verbose /dev/md1 --level=mirror --raid-devices=4 ram0 ram1 ram2 ram3
  2. mdadm: Note: this array has metadata at the start and
  3. may not be suitable as a boot device. If you plan to
  4. store '/boot' on this device please ensure that
  5. your boot-loader understands md/v1.x metadata, or use
  6. --metadata=0.90
  7. mdadm: size set to 65472K
  8. Continue creating array? y
  9. mdadm: Defaulting to version 1.2 metadata
  10. mdadm: array /dev/md1 started.
  11. root@host:/dev# cat /proc/mdstat
  12. Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
  13. md1 : active raid1 ram3[3] ram2[2] ram1[1] ram0[0]
  14. 65472 blocks super 1.2 [4/4] [UUUU]
  15.  
  16. md0 : active raid1 sdb6[2] sda6[0]
  17. 76105600 blocks super 1.2 [2/2] [UU]
  18.  
  19. unused devices: <none>
  20. root@host:/dev# mdadm --fail /dev/md1 ram2
  21. mdadm: set ram2 faulty in /dev/md1
  22. root@host:/dev# mdadm --remove /dev/md1 ram2
  23. mdadm: hot removed ram2 from /dev/md1
  24. root@host:/dev# cat /proc/mdstat
  25. Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
  26. md1 : active raid1 ram3[3] ram1[1] ram0[0]
  27. 65472 blocks super 1.2 [4/3] [UU_U]
  28.  
  29. md0 : active raid1 sdb6[2] sda6[0]
  30. 76105600 blocks super 1.2 [2/2] [UU]
  31.  
  32. unused devices: <none>
  33. root@host:/dev# mdadm --grow /dev/md1 --raid-devices=3
  34. raid_disks for /dev/md1 set to 3
  35. root@host:/dev# cat /proc/mdstat
  36. Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
  37. md1 : active raid1 ram3[3] ram1[1] ram0[0]
  38. 65472 blocks super 1.2 [3/3] [UUU]
  39.  
  40. md0 : active raid1 sdb6[2] sda6[0]
  41. 76105600 blocks super 1.2 [2/2] [UU]
  42.  
  43. unused devices: <none>
RAW Paste Data