Unable to delete a share in NFS

  • Hi,


    I want to delete a share in NFS and after apply I get the error:



    Code
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; rm --recursive --force '/export/intranet' 2>&1' with exit code '1': rm: cannot remove '/export/intranet': Device or resource busy

    I had four devices in the list and I had no problem to delete three of them. But the last one makes the trouble.


    There is no device in the network anymore except a notebook (with NFS removed).



    Which device or resource is ment by this error message?
    How can I detect it?



    Any hints are welcome.


    Thank you very much.
    Cheers
    marimuc

  • Hi subzero79,


    thank you for your replay.


    I've stopped the nfs server by switching it off under services->nfs. Then rebooting OMV, just to be sure, there is no lock on it. I've found in the forum, that some recommend rebooting (though it's often unneeded on Linux systems).


    Unfortunately with no success, the last share still can't be deleted.


    With lsof /export/intranet I get 1430 lines (counted with wc), but no really usefull information (at least for me ;-). E.G.
    php5-fpm 9536 openmediavault-webgui mem REG 8,1 47712 6163528 /lib/x86_64-linux-gnu/libnss_files-2.19.sophp5-fpm 9536 openmediavault-webgui mem REG 8,1 43592 6163530 /lib/x86_64-linux-gnu/libnss_nis-2.19.sophp5-fpm 9536 openmediavault-webgui mem REG 8,1 31632 6163526 /lib/x86_64-linux-gnu/libnss_compat-2.19.so


    Mainly libs are listed. Does this give a clue to you? Are there any particular files I have to look for?


    Should I give resetperms a try? Some forum discussions with "can't delete this or that" suggest it.


    Cheers
    marimuc

  • I get this output:

    Code
    /etc/exports:/export/intranet 192.168.0.106(fsid=5,ro,subtree_check,secure)
    /etc/openmediavault/config.xml: <dir>/export/intranet</dir>
    /etc/fstab:/media/e1c14040-688b-4afd-8a08-c43bdbb0640a/intranet/ /export/intranet none bind 0 0
  • I can roughly understand line 1: this refers to the entry at services->nfs->shares. This line should be deleted at the end.
    Line 3 is the fstab line and line 2 refers to the OMV database.


    You are right, the three lines above show the output with the share still in the list. The share refuses to be deleted emphaticaly.


    My OMV runs on a NAS with its own harddisc. Intranet is for clients. I hope, my system is still seperated and I did nothing to mix it (I hope so that at least).

  • I have now given the plugin "resetperm" a chance, but with no result. It just gives me the information (at Access Rights Management->Shared Folders), that an nfs share is in use. But this is the basic problem ;-)


    I've understood, that in OMV3.x hdds are included in the /srv folder, while in OMV2.x hdds had been included in the /media folder.
    My OMV is running a good while now and I had updated from 2.x to 3.x some weeks ago. So I can find hdds in /srv as well as in /media.


    If I could get access to the steps, OMV is executing after pressing "apply", I could check, if there is just a misspelling. E.g. OMV wants to remove the entry /srv/old_link (because of version 3.x), but actually has to remove an entry like /media/old_link (because this link exists already since 2.x).


    Is there any chance to get access to the steps, OMV is executing after pressing "apply"?

  • Still the same. Share can't be deleted.


    systemctl status shows:


    Code
    root@Babaorum:~# systemctl status nfs-kernel-server
    ● nfs-kernel-server.service - LSB: Kernel NFS server support
    Loaded: loaded (/etc/init.d/nfs-kernel-server)
    Active: inactive (dead)
    Apr 02 11:26:47 Babaorum systemd[1]: Stopped LSB: Kernel NFS server support.
    Apr 02 14:24:28 Babaorum systemd[1]: Stopped LSB: Kernel NFS server support.

    Dashboard shows both NFS "enabled" and "running" with grey color.

  • I've found a way to cheat OMV 3.x (not a gentleman like way I confess)


    Here is the walkthrought:


    1. In the GUI delete the share and press "apply". The well known error pops up. Ignore it .
    2. Log out from GUI
    3. Connect via ssh
    4. Stop OMV with monit stop omv-engined
    5. cd /etc/openmediavault
    6. Delete the two files config.xml.0001 and config.xml.0002
    7. Start OMV again: monit start omv-engined
    8. Start GUI - the yellow apply message pops up.
    9. Press revert
    10. Done


    As I said, not a gentleman like way. I hope someone can find a better one.


    When I go to "Rights Access Management" -> "Shared Folders", intranet is not referenced anymore. I assume, that may confirm my crude doings somehow.

  • 6. Delete the two files config.xml.0001 and config.xml.0002

    This just deleted backups. Everything you did should have basically been fixed by a reboot (or monit restart omv-engined).

    omv 5.6.13 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.2 | kvm plugin 5.1.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Yes, unfortunately this did not solve the problem at the end. Just has shifted it to another point, it seems.


    I give up at this point and will do a complete new installation.


    Sorry guys, I could not provide a solution for this issue.


    And I can not recommend cheating OMV in that way.


    Thanks to subzero79 and ryecoaaron for giving me a helping hand.
    Cheers
    marimuc

Participate now!

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