Not able to remove a RAID6 array on /dev/md0 or remove XFS file system using this array.

  • I have a new server that is still in testing. I have a five disks in a Raid6 array using MD with a XFS file system on that /dev/md0 array. I want to remove/delete the array and try something different. My /dev/md0 raid6 array is still 'referenced' and therefor I can not delete it. I also can not delete/remove the XFS file system that using this array. How can I identify the 'reference' and delete it?

    What I have done:

    Removed NFS share using MD0 and also disabled NFS.

    Removed all files and all folders that were on XFS share of /dev/md0

    Removed the one SMB share that was using /dev/md0 and disabled 'Home Directory' in SMB just to be safe.

    There are no more shares on MD0 XFS.

    Tried to remove OMV->Storage->FileSystem-> XFS file system on dev/md0. The square button for remove is not highlighted.

    Tried to remove /dev/md0 from OMV->Storage-->Multiple devices. The square button for remove is not highlighted.

    Tried the command: sudo mdadm --stop /dev/dm0
    Response:: Cannot get exclusive access to /dev/md0: Perhaps a running process, mounted filesystem or active volume group?

    Ran OMV->Diagnostics->Report and got this: Full report is attached.

    ================================================================================

    = Linux Software RAID
    ================================================================================
    md0 : active raid6 sdb[1] sda[0] sdd[3] sdc[2] sde[4]
    Personalities : [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid1] [raid10]
    md0 : active raid6 sdb[1] sda[0] sdd[3] sdc[2] sde[4] 35156259840 blocks super 1.2 level 6, 512k chunk, algorithm 2 [5/5] [UUUUU] bitmap: 0/88 pages [0KB], 65536KB chunk


    I have run out thoughts on what is 'referencing' the /dev/md0 array.


    How can I find the reference?

    Can I somehow delete the file system and MD array without finding the reference?

    Any help would be appreciated.

  • Use the Reset Permissions plugin available in the omv-extras addon. It will show you all the references in place for a filesystem.

    Asrock B450M, AMD 5600G, 64GB RAM, 6 x 4TB RAID 5 array, 2 x 10TB RAID 1 array, 100GB SSD for OS, 1TB SSD for docker and VMs, 1TB external SSD for fsarchiver OS and docker data daily backups

  • Thank you BernH. Sounds like the perfect solution. But .... There's a glitch.

    What I did:

    Found OMV-Extras and installed it.

    Installed OMV-Reset-Permissions

    Rebooted (just in case)

    ran OMV-Reset-Permissions

    * Sure enough - there were two permissions still linked to my /dev/Raid6 array

    * Chose /dev/Raid6 and hit the reset icon

    * on new window chose 'reset ACLs' checkbox to activate the reset button and then pressed the 'reset' button

    * * received an error message about invalid parameters.

    * Rebooted,OMV and tried again with same results.


    Is this a glitch on my side or do I need to tell OMV-Reset-Permissions about this issue?


    FYI - Note to others trying to get and install OMV-Extras and OMV-Reset-Permissions

    1. To install OMV-Reset-Permissions you must first install OMV-Extras (Plug-Ins not supported by OMV that are not tested by OMV).

    * The OMV-Extras web site is at: https://wiki.omv-extras.org/doku.php?id=misc_docs:omv_extras

    * It will tell you to execute a command with 'root' privileges' to install OMV-Extras Use Putty or your favorite SSH tool.

    * This is not as simple as just using sudo. Why: sudo works for only one command and this line has multiple commands. in it

    ** Option 1 - login as root (root has root permissions by, definition, until logged out)

    ** Option 2 - use "sudo -s" to get and retain root privileges with your regular ID until you logout

    *** The command is: wget -O - https://github.com/OpenMediaVa…ckages/raw/master/install | bash

    2. Install OMV-Reset-Permissions using OVM->System->Plugins

    * The new plug-ins are now in the list.

    3. Run OMV-Reset-Permissions using OMV->Services->Reset-Permissions

  • The reset permissions shows you the services that are still using the drive/raid, it does not remove them. It will reset permissions to defaults, but you have to deal with the service mappings yourself now that you know what is using them.

    Asrock B450M, AMD 5600G, 64GB RAM, 6 x 4TB RAID 5 array, 2 x 10TB RAID 1 array, 100GB SSD for OS, 1TB SSD for docker and VMs, 1TB external SSD for fsarchiver OS and docker data daily backups

  • Solved:

    Thanks BernH, I finally got it to work. My Raid6 array is gone and I have my five drives back for another test.



    The reset permissions plugin finally showed nothing "in use by"/remaining on my raid6 array.

    I still could not unmount the XFS file system from OMV_Raid6 or remove the OMV_Raid6 array from md. The icons were still greyed out.

    Then I went back and looked at the usual suspects and found one share "/" remaining on OMV_Raid6. Then I deleted the "/" share.

    Now I can select OMV_Raid6 in multiple devices and press the active delete icon. It worked.


    Prior steps:
    1. removed permissions to all files and folders on OMV_Raid6

    2. removed all files and folders on OMV_Raid6

    What I finally did:

    1. Stopped all services shown in resetpermissions.

    2. Turned off homedirectory (everywhere I could find references to it)

    3. Uninstalled the filebrowser plugin from OMV. I could stop the service but it still showed as loaded and showed in resetpermissions.

    4. Removed the share "/" to file system XFS on OMV_Raid6 (This was the last thing I did)

    I could finally select OMV_Raid6 in Multiple Devices and used the now active delete icon.


    I don't know how to mark this as solved.

  • chente

    Added the Label resolved

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!