0

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?

ThunderBird
  • 1,915
  • 13
  • 19
  • 31
  • Welcome to [ubuntu.se]! **;-)** What are you trying to accomplish? Use the disks separately instead of in a RAID config??? – Fabby Jun 19 '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 '19 at 13:34
  • 3
    Possible duplicate of [remove mdadm raid1 without loosing data](https://askubuntu.com/questions/684453/remove-mdadm-raid1-without-loosing-data) – Fabby Jun 19 '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 '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 '19 at 13:53

1 Answers1

0

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