Results 1 to 5 of 5

Thread: Cannot modify partition because of RAID

  1. #1
    Join Date
    Mar 2014
    Beans
    3

    Cannot modify partition because of RAID

    I'm installing 18.04 on a new machine and need to modify the partitioning of devices on which I installed software RAID. Per Want to Remove Software RAID (closed as solved) I have done this:
    mdadm --stop /dev/md0
    mdadm --stop /dev/md1
    mdadm --zero-superblock /dev/sda1
    mdadm --zero-superblock /dev/sda2
    mdadm --zero-superblock /dev/sdb1
    mdadm --zero-superblock /dev/sdb2

    The installer no longer shows the RAID arrays but still sees the partitions as being RAID and won't allow them to be changed:

    No modifications can be made to partition #1 of device SCSI (0,0,0) (sda) for the following reasons:
    In use by software RAID device md0.


    But /dev/md0 no longer exists.

    How can I get back to where I can re-partition?

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Cannot modify partition because of RAID

    Did you remove the RAID tag on the partitions?
    Try
    Code:
    sudo dd if=/dev/zero of=$DEVICE bs=512 seek=$(( $(blockdev --getsz $DEVICE) - 1024 )) count=1024
    where DEVICE is the partition, something like /dev/sda1

  3. #3
    Join Date
    Jan 2008
    Beans
    164
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: Cannot modify partition because of RAID

    Eric_Lee, RAID device has to be stopped AND removed (--remove) prior to zeroing superblocks, otherwise it will come back.

    TheFu, the command you mention does exactly the same as --zero-superblock.

  4. #4
    Join Date
    Mar 2014
    Beans
    3

    Re: Cannot modify partition because of RAID

    Elsewhere it was suggested to use sudo fdisk /sda, then probably g for my environment. But I couldn't because the shell, ash, in the Installer doesn't have fdisk. I don't know if the same would have applied to dd.

    Instead of Aborting the Install I unintentionally rebooted. No disaster. I started the Install again and when I got to the Partitioning it still had them marked raid (image) but there was no more No modifications allowed message when I tried to re-partition. Following these instructions the Install went smoothly.

    Thank you TheFu and lvm. I ended up getting there a different way.

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Cannot modify partition because of RAID

    Please mark the thread as "SOLVED" using the thread tools button. Help out the community.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •