I would like to change the partition of my HD, an exception is thrown when I try to change or delete the whole disk volume. See the image of my HDD below:

  • My actual setup. I would like to delete /dev/sda1.

    enter image description here

  • The error:

    enter image description here

Can anyone help me, please?

  • Welcome to Ask Ubuntu! ;-) What are you trying to accomplish? Use the disks separately instead of in a RAID config??? – Fabby Jun 19 at 13:29
  • Hi Fabby, how are you? So I had a raid on another machine running. this error hd is what was part of a raid array. I would like to clean it and redo a new raid configuration on this machine. – Júlio Amorim Jun 19 at 13:34
  • 3
    Possible duplicate of remove mdadm raid1 without loosing data – Fabby Jun 19 at 13:39
  • I think not Fabby, my problem is not with the md0 array but in not being able to delete the disk /dev/sda1 – Júlio Amorim Jun 19 at 13:49
  • You need to break the array before you can do anything with the disk... Try out the duplicate first. – Fabby Jun 19 at 13:53

Just as Fabby said, you have to stop the array before making any changes. I did not have that in mind, thank you Fabby.

Here is the solution step by step:

# mdadm -S /dev/md0

# mdadm /dev/md0 -r /dev/sda

# dd if=/dev/zero of=/dev/sda bs=1M count=1024

after changes

# rm /etc/mdadm/mdadm.conf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.