[mythtv-users] RAID: full disk or partition (was: Question re: available SATA ports and linux software RAID)

John Drescher drescherjm at gmail.com
Wed Apr 27 01:54:37 UTC 2011


On Tue, Apr 26, 2011 at 9:51 PM, Jean-Yves Avenard <jyavenard at gmail.com> wrote:
> I'm having a bit of troubles as mdadm doesn't survive a reboot (e.g.
> it doesn't restart the RAID)
>
> I can start md manually with:
> root at htpc:~# mdadm -ARs
> mdadm: superblock on /dev/sdd doesn't match others - assembly aborted
> mdadm: superblock on /dev/sdd doesn't match others - assembly aborted
> /dev/md0: File exists
> mdadm: /dev/md/0 has been started with 5 drives.
>
> root at htpc:/data# sudo mdadm --detail /dev/md0
> /dev/md0:
>        Version : 00.90
>  Creation Time : Sat Apr  4 02:32:09 2009
>     Raid Level : raid5
>     Array Size : 7814047744 (7452.06 GiB 8001.58 GB)
>  Used Dev Size : 1953511936 (1863.01 GiB 2000.40 GB)
>   Raid Devices : 5
>  Total Devices : 5
> Preferred Minor : 0
>    Persistence : Superblock is persistent
>
>    Update Time : Wed Apr 27 11:47:55 2011
>          State : clean
>  Active Devices : 5
> Working Devices : 5
>  Failed Devices : 0
>  Spare Devices : 0
>
>         Layout : left-symmetric
>     Chunk Size : 128K
>
>           UUID : c4da37ea:99c0fc03:a5e8058a:6a55fa23 (local to host
> htpc.avenard.org)
>         Events : 0.9720100
>
>    Number   Major   Minor   RaidDevice State
>       0       8       49        0      active sync   /dev/sdd1
>       1       8       65        1      active sync   /dev/sde1
>       2       8       33        2      active sync   /dev/sdc1
>       3       8       81        3      active sync   /dev/sdf1
>       4       8        1        4      active sync   /dev/sda1
>
> ---
> The problem comes that I first added /dev/sdd as full disk ; I then
> removed that disk and added it as a partition /dev/sdd1.
> root at htpc:/data# mdadm --examine /dev/sdd
> /dev/sdd:
>          Magic : a92b4efc
>        Version : 00.90.00
>           UUID : c4da37ea:99c0fc03:a5e8058a:6a55fa23 (local to host
> htpc.avenard.org)
>  Creation Time : Sat Apr  4 02:32:09 2009
>     Raid Level : raid5
>  Used Dev Size : 1465135872 (1397.26 GiB 1500.30 GB)
>     Array Size : 5860543488 (5589.05 GiB 6001.20 GB)
>   Raid Devices : 5
>  Total Devices : 5
> Preferred Minor : 0
>
>    Update Time : Mon Apr 25 14:27:10 2011
>          State : clean
>  Active Devices : 5
> Working Devices : 5
>  Failed Devices : 0
>  Spare Devices : 0
>       Checksum : 80dc4b5 - correct
>         Events : 9696394
>
>         Layout : left-symmetric
>     Chunk Size : 128K
>
>      Number   Major   Minor   RaidDevice State
> this     0       8       48        0      active sync   /dev/sdd
>
>   0     0       8       48        0      active sync   /dev/sdd
>   1     1       8       64        1      active sync   /dev/sde
>   2     2       8       33        2      active sync   /dev/sdc1
>   3     3       8       80        3      active sync   /dev/sdf
>   4     4       8        1        4      active sync   /dev/sda1
>
> which is different than the superblock found in /dev/sdd1
> root at htpc:/data# mdadm --examine /dev/sdd1
> /dev/sdd1:
>          Magic : a92b4efc
>        Version : 00.90.00
>           UUID : c4da37ea:99c0fc03:a5e8058a:6a55fa23 (local to host
> htpc.avenard.org)
>  Creation Time : Sat Apr  4 02:32:09 2009
>     Raid Level : raid5
>  Used Dev Size : 1953511936 (1863.01 GiB 2000.40 GB)
>     Array Size : 7814047744 (7452.06 GiB 8001.58 GB)
>   Raid Devices : 5
>  Total Devices : 5
> Preferred Minor : 0
>
>    Update Time : Wed Apr 27 11:48:37 2011
>          State : clean
>  Active Devices : 5
> Working Devices : 5
>  Failed Devices : 0
>  Spare Devices : 0
>       Checksum : 252d02c4 - correct
>         Events : 9720100
>
>         Layout : left-symmetric
>     Chunk Size : 128K
>
>      Number   Major   Minor   RaidDevice State
> this     0       8       49        0      active sync   /dev/sdd1
>
>   0     0       8       49        0      active sync   /dev/sdd1
>   1     1       8       65        1      active sync   /dev/sde1
>   2     2       8       33        2      active sync   /dev/sdc1
>   3     3       8       81        3      active sync   /dev/sdf1
>   4     4       8        1        4      active sync   /dev/sda1
>
> I tried zeroing the superblock, but it fails (that was before md was
> started, so /dev/sdd shouldn't even have been in use)
> root at htpc:~# mdadm --zero-superblock /dev/sdd
> mdadm: Couldn't open /dev/sdd for write - not zeroing
>
> Any ideas ?
>

look at the output of cat /proc/mdstat

/dev/sdd is probably in an array like md125

John M. Drescher


More information about the mythtv-users mailing list