On Wed, 2020-05-20 at 15:50 -0700, Samuel Sieb wrote:
On 5/20/20 2:16 PM, Patrick O'Callaghan wrote:
> I formatted 2 1TB drives with ext4 and created a new md volume as
> RAID1. However they are taking many hours to sync, despite being empty.
> Is this normal?
This is somewhat unclear. It sounds like you formatted the drives
before making the raid. If that's the case, you got it backwards. You
need to make the raid first, then format that. And yes, it has to sync
the entire array first, so however long it takes to read and write 1TB
of data.
> Also, I presume I should mount the md device, using an fstab entry like
> this:
>
> /dev/md0 /raid ext4 defaults 0 0
>
> but attempts to do that give an error:
>
> mount: /raid: wrong fs type, bad option, bad superblock on /dev/md0, missing
codepage or helper program, or other error.
That confirms my understanding of what you did. The raid device doesn't
have a filesystem, you need to format it before you can mount it.
> Number Major Minor RaidDevice State
> 0 8 80 0 active sync /dev/sdf
> 1 8 96 1 active sync /dev/sdg
It's recommended to partition the drives first and then raid the
partitions. It definitely helps with autodetection.
Thanks Samuel. See my reply to Ed.
poc