# [solved] mdadm "not an md array" using 3tb disks.

## chenko

When I try and create a raid array, I get: "mdadm: device /dev/sdf1 exists but is not an md array."

This is on a machine that I previously had a bunch of 750gb drives working, so all is okay on that side.

Difference now is im trying to replace them with 3tb drives. The machine supports it, I can partition, format and mount the disks induvidually.

Normally I would go into fdisk and setup a partition with type fd for raid auto detect. But this time since they are over 3tb I am using parted, mklabel to gpt, and setting the "raid" flag. The partition is aligned (as in, I don't get a warning if I use parted -a optimal).

But I get the above error when using --create, I also get this error if I try and create an array using the devices themselves without any partitions so im not sure if this is a partion/parted problem.

I've tried metadata=1.2, although I think its default anyway for mdadm version I have (v3.1.4 - 31st August 2010), also tried setting --chunk=4096 etc (and some other variants).

Here is parted -l for one of the drives, the others are similar.

```

Model: ATA ST3000DM001-9YN1 (scsi)

Disk /dev/sdf: 3001GB

Sector size (logical/physical): 512B/4096B

Partition Table: gpt

Disk Flags:

Number  Start   End     Size    File system  Name     Flags

 1      20.5kB  3001GB  3001GB               primary  raid

```

What I first thought was the problem, is that im running a 32bit system - but most places I have looked at suggest 32bit isn't an issue (and they work on their own anyway).

```

3.5.7-gentoo #1 SMP Sat Dec 8 22:57:53 GMT 2012 i686 AMD Athlon(tm) II Neo N36L Dual-Core Processor AuthenticAMD GNU/Linux

```

```

# cat /proc/mdstat

Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]

unused devices: <none>

```

Last edited by chenko on Fri Jan 18, 2013 3:57 pm; edited 1 time in total

----------

## py-ro

raid Flag ist not used, set type FD00 (or 00FD?)

----------

## chenko

I'm not really sure which command is which in parted - any that refers to flags doesn't like FD00 (or 00FD).

Just merged gdisk to use instead, set the fd00 flag, if I look at the disk in parted it shows "raid" under flags just like I did myself using "set 1 raid on".

Used gdisk, set fd00 on the drives and I still get the same error.

```

# mdadm --create --verbose --level=raid1 --chunk=4096 /dev/sd[fg]1 --metadata=1.2

mdadm: device /dev/sdf1 exists but is not an md array.

# mdadm --create --verbose --level=raid5 --chunk=4096 --raid-devices=4 /dev/sd[fghi]1 --metadata=1.2

mdadm: device /dev/sdf1 exists but is not an md array.

```

----------

## py-ro

Thats simpe you forgot to mention the Device you want to create, write /dev/md0 before the component devices.

Bye

Py

----------

## chenko

Okay, that was a bit silly. Although when I first started doing this (before I realised to change to gpt) I was putting that info in and getting another issue which I have since sorted.

Thanks  :Smile: 

----------

