M
M
mazer13252019-08-06 12:18:48
linux
mazer1325, 2019-08-06 12:18:48

"Broken" RAID, how to fix it?

Good day of the day.
Given: Server, Debian, Proxmox. Installed: HDD - 2pcs (RAID-1) and SSD - 2pcs (RAID-1). Debian is installed on Hdd, proxmox is installed on top of it. All raids are soft. Reid from HDD is used for the system and the GPU, raid from ssd for virtual machines.
sda and sdc are HDD
sdb and sdd are SSD
Here is the output

cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] 
md3 : active raid1 sda4[3]
      919490560 blocks super 1.2 [2/1] [U_]
      bitmap: 6/7 pages [24KB], 65536KB chunk

md0 : active raid1 sda1[2] sdc1[3]
      498368 blocks super 1.2 [2/2] [UU]
      
md2 : active raid1 sda3[3]
      7808000 blocks super 1.2 [2/1] [U_]
      
md1 : active raid1 sda2[2]
      48795648 blocks super 1.2 [2/1] [U_]
      
md127 : active (auto-read-only) raid1 sdb1[0]
      468719424 blocks super 1.2 [2/1] [U_]
      bitmap: 3/4 pages [12KB], 65536KB chunk

unused devices: <none>

And another conclusion
lsblk
NAME      MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda         8:0    0 931,5G  0 disk  
├─sda1      8:1    0   487M  0 part  
│ └─md0     9:0    0 486,7M  0 raid1 /boot
├─sda2      8:2    0  46,6G  0 part  
│ └─md1     9:1    0  46,5G  0 raid1 /
├─sda3      8:3    0   7,5G  0 part  
│ └─md2     9:2    0   7,5G  0 raid1 [SWAP]
└─sda4      8:4    0   877G  0 part  
  └─md3     9:3    0 876,9G  0 raid1 /mnt/vm_iso
sdb         8:16   0 447,1G  0 disk  
└─sdb1      8:17   0 447,1G  0 part  
  └─md127   9:127  0   447G  0 raid1 
sdc         8:32   0 931,5G  0 disk  
├─sdc1      8:33   0   487M  0 part  
│ └─md0     9:0    0 486,7M  0 raid1 /boot
├─sdc2      8:34   0  46,6G  0 part  
├─sdc3      8:35   0   7,5G  0 part  
└─sdc4      8:36   0   877G  0 part  
sdd         8:48   0 447,1G  0 disk  
└─sdd1      8:49   0 447,1G  0 part

At the moment, the server is in operation, I suppose it booted from sda , the hypervisor works, but does not see the VM, respectively. HDD drove out badblocks, there are no comments.
What do you advise? How to fix? Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mazer1325, 2019-08-07
@mazer1325

Collected all raids back
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 487M 0 part
│ └─md0 9:0 0 486.7M 0 raid1 /boot
├ ─sda2 8:2 0 46.6G 0 part
│ └─md1 9:1 0 46.5G 0 raid1 /
├─sda3 8:3 0 7.5G 0 part
│ └─md2 9:2 0 7.5G 0 raid1 [SWAP]
└─sda4 8:4 0 877G 0 part
└─md3 9:3 0 876.9G 0 raid1 /mnt/vm_iso
sdb 8:16 0 447.1G 0 disk
└─sdb1 8:17 0 447.1G 0 part
└─md127 9:127 0 447G 0 raid1
sdc 8:32 0 931.5G 0 disk
├─sdc1 8:33 0 487M 0 part
│ └─md0 9:0 0 486.7M 0 raid1 /boot
├─sdc2 8:34 0 46.6G 0 part
│ └─md1 9:1 0 46.5G 0 raid1 /
├─sdc3 8:35 0 7, 5G 0 part
│ └─md2 9:2 0 7.5G 0 raid1 [SWAP]
└─sdc4 8:36 0 877G 0 part
└─md3 9:3 0 876.9G 0 raid1 /mnt/vm_iso
sdd 8:48 0 447.1G 0 disk
└─sdd1 8:49 0 447.1G 0 part
└─md127 9:127 0 447G 0 raid1
cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [ raid5] [raid4] [ra id10]
md0 : active raid1 sda1[2] sdc1[3]
498368 blocks super 1.2 [2/2] [UU]
md3 : active raid1 sda4[3] sdc4[2]
919490560 blocks super 1.2 [2/2] [UU]
bitmap: 5/7 pages [20KB], 65536KB chunk
md1 : active raid1 sda2[2] sdc2[3]
48795648 blocks super 1.2 [2/2] [UU]
md2 : active raid1 sda3[3] sdc3[2]
7808000 blocks super 1.2 [2/2] [UU]
md127 : active (auto-read-only) raid1 sdb1[0] sdd1[1]
468719424 blocks super 1.2 [2/2] [UU]
bitmap: 0/4 pages [0KB], 65536KB chunk
Now we need to rename md127 to md4 and mount it in the same folder (if it doesn't mount itself after renaming), how to do it without losing information?
And like this (I'm adding it a little later):
update-initramfs -u
reboot
md127 was renamed to md4, but was not automatically mounted to the previous folder
, mount:
mount /dev/md4 /mnt/previous folder
.

V
Victor Taran, 2019-08-06
@shambler81

I wrote for a long time, in theory it should not change much
https://klondike-studio.ru/blog/raid-recovery/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question