I have got a server hosted by OVH, which is configured to have a soft RAID1 array, /dev/md0, that holds a LVM PV. There is another /dev/md1 array, which was supposed to be the /boot, but which is finally not in use.
This morning, I received from my server lots of logs indicating that my /dev/sdb produced I/O errors (basically I guess it's dead). Afterwards my MySQL crashed, and my SSH refused all connections. I had no choice but to reboot (since it's a remote server I cannot access physically).
When it booted up, the web server in use was nginx, which was the server I used initially, but that I replaced some time ago now by Apache.
Finding that disturbing, I immediately rebooted to a rescue mode, and try to calmly retrieve my data and try to get things ready to change my disk.
Now, I have done that, and to my surprise, after doing a mdadm --assemble --scan
, the resulting mdstats is:
# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty]
md125 : active raid1 sda1[0]
314571640 blocks super 1.2 [2/1] [U_]
md126 : active raid1 sdb1[2]
314571640 blocks super 1.2 [2/1] [_U]
md127 : active raid1 sda2[0] sdb2[1]
1048000 blocks super 1.2 [2/2] [UU]
unused devices: <none>
It looks rather plain that sda1 and sdb1 are both seen as different arrays, though the other part is missing. And whenever I try to run a pvscan, it tells me
# pvscan
Found duplicate PV fuQ8NF1x1aifPHtGffNEF1sKw6ZNwv29: using /dev/md126 not /dev/md125
PV /dev/md126 VG unit05 lvm2 [300.00 GiB / 112.00 GiB free]
Total: 1 [300.00 GiB] / in use: 1 [300.00 GiB] / in no VG: 0 [0 ]
The feeling I have got here, is that at some point in the past, one of my disks decided to go its own way and stopped being in sync.
It happens that the data found in the LVM (then the data from /dev/sdb) seems to be up-to-date.
What would be my course of action
- To check if data is indeed out of sync
- If so, get data synced back then change the disk
- If not, should I just change the disk and wait mdadm to sync the new disk?