M
M
mazer13252019-04-16 19:26:28
Debian
mazer1325, 2019-04-16 19:26:28

RAID-1, why are all partitions not visible?

Good afternoon
Debian 9
There are 2 screws in the system, compiled into software raid 1.
cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sdb2[1]
48795648 blocks super 1.2 [2/1] [_U]
md3 : active raid1 sdb4[1]
919490560 blocks super 1.2 [2/1] [_U]
bitmap: 3/7 pages [12KB], 65536KB chunk
md0 : active raid1 sdb1[1]
498368 blocks super 1.2 [2/1] [_U]
md2 : active raid1 sda3[0] sdb3[1]
7808000 blocks super 1.2 [2/2] [UU]
Why doesn't it see sda1, sda2 and sda4 ?
If you turn off one at a time, then everything is fine, all sections are visible.
Here is another conclusion
fdisk -l
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal ): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x796d0f4d
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M fd Linux raid autodetect
/dev/sda2 999424 98656255 97656832 46.6G Linux autodet raid fd
/dev/sda3 98656256 114280447 15624192 7.5G fd Linux raid autodetect
/dev/sda4 114280448 1953523711 1839243264 877G fd Linux raid autodetect
Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9d919dcc
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 999423 997376 487M fd Linux raid autodetect
/dev/sdb2 999424 98656255 97656832 46.6G fd Linux raid
/ autodetect sdb3 98656256 114280447 15624192 7.5G fd Linux raid autodetect
/dev/sdb4 114280448 1953523711 1839243264 877G fd Linux raid autodetect
Disk /dev/md2: 7.5 GiB, 7995392000 sectors160
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md0: 486.7 MiB, 510328832 bytes, 996736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md3: 876, 9 GiB, 941558333440 bytes, 1838981120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/ md1: 46.5 GiB, 49966743552 bytes, 97591296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Why is this happening?
How it all started::
The disks in the raid began to crumble, I decided to replace them one by one, checked that the system was booting from each disk separately (disconnected and connected them to a turned off PC), started the replacement procedure, for example, according to this instruction (there are many on the Internet) https://www.sysadmin.in.ua/2013/05/09/zamena-zhest... , but at the stage of deleting partitions of the damaged disk, it slowed down:
mdadm /dev/md0 -r /dev/sda1
mdadm: hot remove failed for /dev/sda1: No such device or address
How to be, tell me good people.
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2019-04-16
@mazer1325

In /proc/mdstat, only the disk arrays that are currently active. And, again, only the volumes included in this array. If you were doing something weird (and you were doing something weird) - then the kernel quite reasonably decided that it wanted to talk to the operator.
You need to take the disk whose version you want to keep (since you booted from them independently of each other - you now have two different arrays. md2, as you can see, has not been modified and survived mockery) and add the necessary sections to the array. -r (remove) quite expectedly answers that it cannot remove a volume that is not in the array.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question