Difference between revisions of "CentOS 8.x Software raid try to recover failed raid device"
From Notes_Wiki
(Created page with "<yambe:breadcrumb self="Try to recover failed raid device">CentOS 8.x Software raid using mdadm|Software raid using mdadm</yambe:breadcrumb> =CentOS 8.x Software raid try to r...") |
m |
||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x System Administration|System Administration]] > [[CentOS 8.x File system management|Filesystem management]] > [[CentOS 8.x Software raid using mdadm|Software raid using mdadm]] > [[CentOS 8.x Software raid try to recover failed raid device|Try to recover failed raid device]] | |||
Try to recover a removed and reinserted disk issue. The below steps do not work. The issue may not be just with steps but also with hardware. Later it was realized that one of the hard-disks had loose contact and was getting disconnected very often. '''In any case note that these steps led to complete loss of data on RAID5 system. Perhaps instead of --stop and --create, --assemble should have been used. ''' | Try to recover a removed and reinserted disk issue. The below steps do not work. The issue may not be just with steps but also with hardware. Later it was realized that one of the hard-disks had loose contact and was getting disconnected very often. '''In any case note that these steps led to complete loss of data on RAID5 system. Perhaps instead of --stop and --create, --assemble should have been used. ''' | ||
# First try: | # First try: | ||
Line 42: | Line 42: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x System Administration|System Administration]] > [[CentOS 8.x File system management|Filesystem management]] > [[CentOS 8.x Software raid using mdadm|Software raid using mdadm]] > [[CentOS 8.x Software raid try to recover failed raid device|Try to recover failed raid device]] |
Latest revision as of 04:18, 19 April 2022
Home > CentOS > CentOS 8.x > System Administration > Filesystem management > Software raid using mdadm > Try to recover failed raid device
Try to recover a removed and reinserted disk issue. The below steps do not work. The issue may not be just with steps but also with hardware. Later it was realized that one of the hard-disks had loose contact and was getting disconnected very often. In any case note that these steps led to complete loss of data on RAID5 system. Perhaps instead of --stop and --create, --assemble should have been used.
- First try:
- mdadm --assemble --scan
- For active array re-add missing device using:
- mdadm -a /dev/md<n> /dev/sd<x><n>
- For inactive array the only option seems to be
- mdadm --detail /dev/md127
- mdadm --stop /dev/md127
- mdadm --create /dev/md127 --level=5 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1
- The create instead of recreating array gives warning:
- /dev/sda1 appears to be a part of array
- /dev/sdb1 appears to be a part of array
- /dev/sdc1 appears to be a part of array
- Continue creating array? yes
- This start recovery of the array. Check status using:
- cat /proc/mdstat
- mdadm --detail /dev/md127
- #should show clean, degraded, recovering
- Wait for array to recover before rebooting the machine.
- Refer:
- If lvm is used scan and possibly reactive logical volumes:
- lvm lvscan
- lvm lvchange -a y vgname/lvmname
- lvm lvscan
Home > CentOS > CentOS 8.x > System Administration > Filesystem management > Software raid using mdadm > Try to recover failed raid device