G
G
grabbee2016-11-28 22:45:06
linux
grabbee, 2016-11-28 22:45:06

How to see how many disks are in RAID5?

There is a server, according to the passport there should be 3 disks in RAID5 - how to see how many disks are really on this machine?
Background. The server is down, that's bad luck. With grief in half raised. There were errors on the disk and the RAID probably fell apart. I tried to compile it, it worked, but somehow xs ..
I do fdisk -l - it shows that I have only 2 disks sda and sdb - but the third one is not visible at close range.
sdc only in words. Here is what the support replied


you have 3 disk but actualy you are on RAID5. you see 2 disk and 1 disk is for the mirroring
dev/sda1 RAID 1 /boot EXT4 300 Mo
/dev/sdb1 RAID 1 /boot EXT4 300 Mo
/dev/sdc1 RAID 1 /boot EXT4 300 Mo
/dev/md1
/dev/ sda2 RAID 5 / EXT4 20 Go
/dev/sdb2 RAID 5 / EXT4 20 Go
/dev/sdc2 RAID 5 / EXT4 20 Go
/dev/md2
/dev/sda3 RAID 5 /data EXT4 219 Go
/dev/sdb3 RAID 5 /data EXT4 219 Go
/dev/sdc3 RAID 5 /data EXT4 219 Go
If you want the another RAID you have to launch a new installation a choose the RAID or No RAID

That is, there are three of them, but I see only 2, and the third is for the mirroring - and I don’t have to see it! It seems to me .. or am I being "deceived"?
~# more /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md125 : active raid5 sdb3[1] sda3[0]
      460208128 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [UU_]
      bitmap: 2/2 pages [8KB], 65536KB chunk

md126 : active raid5 sdb2[1] sda2[0]
      39028736 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [UU_]
      
md127 : active raid1 sdb1[1] sda1[0]
      291520 blocks super 1.2 [3/2] [UU_]

Disk /dev/sda: 238,5 GiB, 256060514304 bytes, 500118192 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: 0xa1a87c2a

Device     Boot    Start       End   Sectors   Size Id Type
/dev/sda1  *        2048    585727    583680   285M fd Linux raid autodetect
/dev/sda2         585728  39647231  39061504  18,6G fd Linux raid autodetect
/dev/sda3       39647232 500117503 460470272 219,6G fd Linux raid autodetect


Disk /dev/sdb: 238,5 GiB, 256060514304 bytes, 500118192 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: 0xbf06c875

Device     Boot    Start       End   Sectors   Size Id Type
/dev/sdb1  *        2048    585727    583680   285M fd Linux raid autodetect
/dev/sdb2         585728  39647231  39061504  18,6G fd Linux raid autodetect
/dev/sdb3       39647232 500117503 460470272 219,6G fd Linux raid autodetect


Disk /dev/md0: 284,7 MiB, 298516480 bytes, 583040 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/md2: 438,9 GiB, 471253123072 bytes, 920416256 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes


Disk /dev/md1: 37,2 GiB, 39965425664 bytes, 78057472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes

Number   Major   Minor   RaidDevice State
       0       8        3        0      active sync   /dev/sda3
       1       8       19        1      active sync   /dev/sdb3
       4       0        0        4      removed

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Erelecano Oioraen, 2016-11-29
@grabbee

The colleague above correctly said that [3/2] [UU_] indicates that the third one is still not in the raid.
smartctl -a /dev/sda
smartctl -a /dev/sdb
smartctl -a /dev/sdc
And this is a matter for support. For it will show that according to the third (apparently) the data cannot be read.
For the future. You can not monitor load and memory, you can not monitor services, but there are two things that must be monitored:
1. SMART
2. Raid status
Even if you don't have a monitoring system (although I can't imagine a server without monitoring it) there is /etc/mdadm/mdadm.conf where you can specify an e-mail to which to hysteria in case of problems with the raid and there is /etc/smartd. conf in which you can configure the sending of messages about problems with disks. If you set this up, then you will no longer have such surprises, you will immediately receive a notification when the problem starts (when the smart starts to see a problem with the hard).

D
Dmitry, 2016-11-29
@plin2s

The underscore after UU seems to hint that there is no one volume. The array is broken. The disk, apparently, died and took off. Warm up sdc to dmesg.
The answer about the fact that the third disk for mirroring is nonsense and excuses. Raid5 interleaves data and checksums.
First of all, run to make a backup, if it is not there, and only then bring the caliper to clean water.

G
grabbee, 2016-11-29
@grabbee

They give a new server, with the words - that server worked great, but since you insist so, here's a new one for you ...

Hello Mr,
On our side we did not detect any issue on your server, but we allow you to change it from your console,
You will have new server, new IP and new dedibackup space
Regards, Jonathan

So guys, you don't fucking understand them! The sdc disk - it's there, it's just not visible, because it 's for the mirroring - and you don't rummage around in the RAID5 structure! [3/2] [UU_] - this is the NORM, then that the device is removed - it should be so. Three disks. I even wrote this three times in support. And this is confirmed by their tests! All of you go trade shorties!..
I'll get a new server and write down what's wrong with the disks initially. I will twist different RAIDs to draw conclusions. I will write them a claim that they sold a defective server then.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question