linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* MD device id change
@ 2003-04-03 16:20 Alexander Kisselev
  2003-04-03 22:16 ` Neil Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Kisselev @ 2003-04-03 16:20 UTC (permalink / raw)
  To: raid-list

  Hallo colleagues,

  I have few 4-disk boxes arranged in the following way:

  [root@data]: ~ > more /proc/mdstat
Personalities : [linear] [raid1]
read_ahead 1024 sectors
md1 : active linear sda2[0] 292021440 blocks 16k rounding
md2 : active linear sdb2[0] 292021440 blocks 16k rounding
md3 : active linear sdc2[0] 292021440 blocks 16k rounding
md0 : active raid1 sdd1[3] sdc1[2] sdb1[1] sda1[0] 1028032 blocks [4/4] [UUUU]
md4 : active linear sdd2[0] 292021440 blocks 16k rounding
unused devices: <none>

  as you see 'md0' is a small RAID1 across 1-st partitions of all 4
disks while md1..md4 are one-disk RAID linear volumes. Well, sda..sdd
are in turn 4-disk 3Ware hardware RAID5 volumes each, but I hope this does
not matter here.

  Now I want to shuffle volumes between machines and consequently
want to put let's say 'md1' from machine A and 'md1' from machine B
in one box C. This does not work (or at least it did not when I tried
it last time, perhaps with kernel 2.2.19), since RAID layer
recognizes only the first 'md1' device.

  Here is the question: is there an easy way to change RAID device ID?
If not, is the following sequence correct in my case (1-disk RAID linear):

  - stop device;
  - 'dd' 4k RAID superblock from /dev/sda2 at offset 292021440;
  - change 4-byte field at offset 11 (md_minor) to the desired number
    (say '5' for md5);
  - copy superblock back;
  - reboot;

  I remember I tried this trick once and it seemed to work, but am I
probably missing something here?

  Regards,
    Alexander.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-04-07  8:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-03 16:20 MD device id change Alexander Kisselev
2003-04-03 22:16 ` Neil Brown
2003-04-04 13:20   ` Mike Black
2003-04-06  5:20     ` Neil Brown
2003-04-07  8:41   ` Alexander Kisselev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).