[mythtv-users] OT: follies with RAID
Martin Bene
martin.bene at icomedias.com
Mon Feb 9 15:15:23 UTC 2009
> Note that sdd is the raw drive, not a partition.
>
> selene:/data/home/yan# /sbin/fdisk -l /dev/sdd
>
> Disk /dev/sdd: 400.0 GB, 400087375360 bytes
> 255 heads, 63 sectors/track, 48641 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0x00000000
>
> Disk /dev/sdd doesn't contain a valid partition table
>
> As opposed to
>
> selene:/data/home/yan# /sbin/fdisk -l /dev/sdg
>
> Disk /dev/sdg: 400.0 GB, 400088457216 bytes
> 255 heads, 63 sectors/track, 48641 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0x000315f4
>
> Device Boot Start End Blocks Id System
> /dev/sdg1 1 48641 390708801 fd Linux raid
> autodetect
>
>
> How do I go about fixing this?
Should be fairly easy: remove sdd from the raid array, partition it, add /dev/sdd1 to the array.
cat /proc/mdstat
==> Check that the array is fully operable, i.e that there are no failed drives/partitions (if output is the same as in your mail, it's OK)
mdadm --fail /dev/md10 /dev/sdd
==> device /dev/sdd is marked as failed in the raid array
mdadm --remove /dev/md10 /dev/sdd
==> device /dev/sdd is completely removed from the array
sfdisk -d /dev/sdg | sfdisk /dev/sdd
==> repartition sdd just like sdg - if you don't have sfdisk on your system, just partition the drive manually using fdisk
mdadm --add /dev/md10 /dev/sdd1
==> Add partitioned device back into array. This will cause a resync of /dev/sdd1.
Bye, Martin
PS: Warning: the mdadm commands are from memory; should be OK but still..
More information about the mythtv-users
mailing list