5

I am trying to delete my RAID array and start again because of some annoying error listing my gpt is corrupt. I used gparted to delete all the info off the disks, so they say "unallocated" on each drive. I then try to create an array using the commands below, but it always says "/dev/sdX appears to be part of a raid array". How do I fix it? It is not part of an array, there isn't even a file system on any of the disks!

$ sudo mdadm --create /dev/md0 --level=linear --raid-devices=5 /dev/sda /dev/sdb /dev/sdd /dev/sde /dev/sdf
mdadm: /dev/sda appears to be part of a raid array:
level=raid0 devices=0 ctime=Thu Jan  1 01:00:00 1970
mdadm: partition table exists on /dev/sda but will be lost or
   meaningless after creating array
mdadm: /dev/sdb appears to be part of a raid array:
level=raid0 devices=0 ctime=Thu Jan  1 01:00:00 1970
mdadm: partition table exists on /dev/sdb but will be lost or
   meaningless after creating array
mdadm: /dev/sdd appears to be part of a raid array:
level=raid0 devices=0 ctime=Thu Jan  1 01:00:00 1970
mdadm: partition table exists on /dev/sdd but will be lost or
   meaningless after creating array
mdadm: /dev/sde appears to be part of a raid array:
level=raid0 devices=0 ctime=Thu Jan  1 01:00:00 1970
mdadm: partition table exists on /dev/sde but will be lost or
   meaningless after creating array
mdadm: /dev/sdf appears to be part of a raid array:
level=raid0 devices=0 ctime=Thu Jan  1 01:00:00 1970
mdadm: partition table exists on /dev/sdf but will be lost or
   meaningless after creating array

One user suggested it was some superblock problem and asked me to zero the superblock, but the command doesn't work as shown below:

$ sudo mdadm --zero-superblock /dev/sdb
[sudo] password for pc: 
mdadm: Unrecognised md component device - /dev/sdb

1 Answer 1

5

This is because mdadm still finds the superblock of the old raid. You can easily delete it running

mdadm --zero-superblock /dev/sdX
2
  • 1
    main post updated. This command doesn't work.
    – john smith
    Commented Nov 27, 2015 at 21:31
  • Did you try with --force? The man page says: "With --force the block where the superblock would be is overwritten even if it doesn't appear to be valid." Commented Aug 2, 2017 at 7:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .