Confused about device counting in MD RAID1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
i am working on implementation of MD RAID1 and i am bit lost regarding superblock 1.2 format. Can you please help with following?

I've created RAID1 like this:

DEVICE_COUNT = 1
DEVICE_NUMBER = 0
ROLES: 0x0000

mdadm reports it to be correct, used mdadm to grow it like this:

mdadm --grow /dev/md23 --raid-disks=2 --force
maddm /dev/md23 --add /dev/sdb1

Now i've inspected superblocks of both devices and i have following:

DEVICE_COUNT = 2
DEVICE_NUMBER = 0
ROLES: 0x0000 0xFFFF 0x0100

DEVICE_COUNT = 1
DEVICE_NUMBER = 2
ROLES: 0x0000 0xFFFF 0x0100


First device number is 0, why second device is 2 (while 1 being skipped)? Should the count start at 1? Why are there 3 roles now, when DEVICE_COUNT is 2 ? If count starts at 1, why would there be roles[0]? I am bit confused. Obviously i am making some trivial mistake and i don't want to keep guessing anymore.
Can you please tell me how to correctly handle this?

Thank you
Happy holidays!

--
S pozdravem
Best regards
     Tomáš Mudruňka




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux