Unable to remove a shared folder on a disk which no longer exists

  • I had a Share created in Access Rights Management / Shared Folders and in SMB/CIFS / Shares. It was created on a mechanical drive which was not part of a Raid Array or a Member of Grey Hole Drive Pool. The drive began clicking. I did not get the shares deleted before the drive failed.
    I searched the Forum but the search criteria I used was pointing to a solution involving Resetting Permissions like is mentioned in Unable to delete "Shared Folder" ... Also http://forums.openmediavault.org/index.php/Thread/4871 -RESOLVED-Can-t-delete-shared-folder-and-filesystem/?pageNo=2& ... Tried these but they did not help or really apply to this problem


    Word of advice to everyone ... If you don't get the answer you need change your Key Words of the search. I did that and found the solution.


    The exact error message I got when trying to remove the share was "Failed to get configuration (xpath=//system/fstab/mntent[dir='/media/bbc3d300-d79d-4622-8cae-6162c98ad8e6'])"


    can't remove shared folder - how to safely edit config.xml? Follow this post before performing the steps in the next post.


    [SOLVED]unable to remove a shared folder


    Re: unaable to remove a shared folderJun 29th 2013 Quote from tekkbebe


    To fix this issue you will have to edit the /etc/openmediavault/config.xml file. Why don't you post your complete file here then we can tell you what to edit. Put it in a code box please. You will learn fast to not do this again, delete shared folders outside of the web-gui.


    Also from tekkbebe .... But before doing this I would follow his more current post can't remove shared folder - how to safely edit config.xml?


    Jun 3rd 2015 Always backup the config.xml before editing:


    cd /etc/openmediavault
    cp config.xml config.bk


    Before you do that go to Access Right Management/User


    Then below highlight each user and click on the Settings TAB above. See if any of the users have a home directory set. Take off the check mark and set it to none. Then click on save/apply.


    If you find a user/s that had a home directory set to that drive it may be the issue. Now try to delete the share.


    After you have been using OMV longer you will get better at finding the problem.


    Jun 7th 2015 You will get better at solving these problems. They are a pain. It was definitely solvable. It takes a lot of time if one of the mods has to go onto a person's machine to help. We do this from time to time but we need to have time to do it. I have been busy this weekend. I was at the office and gfs yesterday. Today I'm going back to the office for a while. We all have lives....


    Glad you found it...


    Back to the step he recommended to fix the problem:


    Re: unaable to remove a shared folderJun 29th 2013 .... The following is what he said to do. I was going to paste an excerpt from my own config.xml fie for further clarity for those that want it but that exceeds character limit.


    Source Code
    <sharedfolder>
    <uuid>7b1b05f6-cb65-4750-b530-ad380131282d</uuid>
    <name>NAS</name>
    <comment></comment>
    <mntentref>92678fc5-b070-4919-8e98-4db30f71d260</mntentref>
    <reldirpath>lost+found/</reldirpath>
    <privileges>
    <privilege>
    <type>user</type>
    <name>florian</name>
    <perms>7</perms>
    </privilege>
    </privileges>
    </sharedfolder>


    You need to delete the above from your shares section of the config.xml.


    He does not mention that there are multiple entries if you have multiple shares ... only delete the section related to the UUID which is causing the problem. I make this comment because I have learned the hard way when guiding a novice you must be very explicit in your instructions.


    He later stated the following: Which is why being able to search in your text editor is important. The file could be searched for all occurrences of the offending UUID.


    Re: unable to remove a shared folderJun 30th 2013


    Source Code
    </network>
    <usermanagement>
    <homedirectory>
    <enable>0</enable>
    <sharedfolderref>7b1b05f6-cb65-4750-b530-ad380131282d</sharedfolderref>
    </homedirectory>


    In this part of your config.xml just delete this "7b1b05f6-cb65-4750-b530-ad380131282d</sharedfolderref>"


    Under User/Settings in the web-gui you had dropped down the drop down box and selected a shared folder as the home folder for a user. You did no enable it. You need to make sure this setting is none. If any share is selected for any user you will not be able to erase the shared folder. All services must be removed from a share before it can be deleted in the web-gui. This is a safety feature so people don't accidentally break services that are using a share.


    See also ... Can't delete some shared folders. for another reason to search the config.xml for all references to the offending UUID ... Reference to Quote from Shrek ...


    Re: Can't delete some shared folders.Aug 2nd 2014


    In my case I was unable to delete a shared folder after a previous attempt to enable User Home Directories.


    Although it was never actually enabled the config.xml still contained a reference to the uuid of the share in the <sharedfolderref> tag.


    Once I removed the id (leaving the tag as below), I was able to delete the shared folder.
    < sharedfolderref></sharedfolderref>

    These are all the steps I followed to fix my particular issue this time and it worked great.


    Thanks to the Community and the People who actually gave me the answers I needed to solve the problem without causing further damage.


    I quoted and commented so that it would not be necessary to dig through all the links I referenced .. this way it should not be needed to the read the posts in their entirety unless you wish to do so. I hope that at least one person finds this helpful.


    I have some experience with Nano Text editor but as I am using it there are no line numbers and I don't know how to search for keywords in the file I am editing. I would appreciate any input for ways to configure Nano or commands that would allow me to search. An alternate text editor and tips for getting and installing would be appreciated.

    OMV 2 |64 bit|


    Your Test Results are back: You are Granted License to Own a Computer But Your Recent Score Does Not Allow For You To Connect a Mouse and Keyboard to it.
    You may study and retake the Exam ... If your score is sufficiently improved the License may be upgraded to allow for Mouse and Keyboard Connection.

    • Offizieller Beitrag

    A lot of the commands are on the bottom of the screen. Ctrl-W search (called "where is").


    http://www.howtogeek.com/howto…command-line-text-editor/

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!