Re: Brocken Raid & LUKS

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

 



You forgot linux-raid again.

On 02/22/2013 12:53 PM, Stone wrote:

> a littel question.
> i have now created my new raid on my new devices with:
> mdadm --create --verbose /dev/md0 --level=5 --raid-devices=4 /dev/sdb1
> /dev/sdc1 /dev/sdd1 /dev/sde1
> mdadm --detail --scan --verbose > /etc/mdadm/mdadm.conf
> cat /etc/mdadm/mdadm.conf
> ARRAY /dev/md0 level=raid5 num-devices=4 metadata=1.2 spares=1
> name=bender:0 UUID=a3ff1ec9:83c2cc4b:7c5e0550:5655e4d0
>    devices=/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sde1
> 
> md0 is now synced
> after a reboot my md0 is now a md127

You forgot to update your initramfs after you changed mdadm.conf.

> cat /proc/mdstat
> Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5]
> [raid4] [raid10]
> md127 : active (auto-read-only) raid5 sde1[4] sdb1[0] sdd1[2] sdc1[1]
>       8788597248 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4]
> [UUUU]
> 
> unused devices: <none>
> 
>  mdadm -D /dev/md127
> /dev/md127:
>         Version : 1.2
>   Creation Time : Fri Feb 22 10:42:16 2013
>      Raid Level : raid5
>      Array Size : 8788597248 (8381.46 GiB 8999.52 GB)
>   Used Dev Size : 2929532416 (2793.82 GiB 2999.84 GB)
>    Raid Devices : 4
>   Total Devices : 4
>     Persistence : Superblock is persistent
> 
>     Update Time : Fri Feb 22 18:09:13 2013
>           State : clean
>  Active Devices : 4
> Working Devices : 4
>  Failed Devices : 0
>   Spare Devices : 0
> 
>          Layout : left-symmetric
>      Chunk Size : 512K
> 
>            Name : bender:0  (local to host bender)
>            UUID : a3ff1ec9:83c2cc4b:7c5e0550:5655e4d0
>          Events : 28
> 
>     Number   Major   Minor   RaidDevice State
>        0       8       17        0      active sync   /dev/sdb1
>        1       8       33        1      active sync   /dev/sdc1
>        2       8       49        2      active sync   /dev/sdd1
>        4       8       65        3      active sync   /dev/sde1
> 
> WTF is going on here?
> i had never this problem :)

Not a problem.  User error.  How raids are put together during boot
happens inside the initramfs.  Your root filesystem isn't even mounted
yet at that point, so mdadm.conf can't be read from it.

If you don't want the array assembled by the initramfs, you need two
mdadm.conf.  One inside the initramfs to disable assembly, and another
in /etc/...  to control later assembly.

Phil
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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