L
L
lohmag2014-10-22 09:15:18
linux
lohmag, 2014-10-22 09:15:18

Linux disk naming with hotswap enabled?

There was such a question - there is a soft raid on Linux
at /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sdb1[1] sda1[ 2](F)
488384448 blocks [2/1] [_U]
There are bad sectors on the disks, in order to prevent the problem, I decided to change them in advance. The sda ​​disk is disconnected and hot connected a new one, it was defined in the system as sdc. I have a question, if I add it instead of sda to the raid, copy grub to it, then when I reboot it will be sdc again or will it be defined as sda and the raid will fall apart?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Melkij, 2014-10-22
@lohmag

Defined as sda, the raid will not fall apart. The first 2048 sectors of the partition are the superblock of the raid partition, it is on it that the raid starts, regardless of the naming of disks in the system.

J
jcmvbkbc, 2014-10-22
@jcmvbkbc

reboot it will again be sdc or it will be defined as sda and the raid will fall apart

The assembly of the raid does not depend on specific device letters, but on the metadata recorded on the devices.

M
mikes, 2014-10-22
@mikes

Add to the raid not by name but by uuid as an option. But it won't fall apart at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question