Lost access to RPI's disks via a home network

  • Hello All,


    Need your help. I use OMV from v5 and thought that I had some experience. But I didn't find how can I solve this problem.

    A couple of days before, I suddenly lost access to my RPI's disks via the home network on W10 and Linux machines. I did nothing in the OMV setting for much time.


    My home machines are:

    RPI4 with OMV 7.4.17-2 (Sandworm); Linux 6.1.21-v8+ (two external USB disks WD 8TB each)

    W10 laptop

    Desktop Linux Mint 22.1

    DuneHD


    What I tried to do:

    I reset credentials on the W10 machine and tried to log in to my network disks once again - unsuccessfully. A folder is empty - I don't see network disks. I tried to switch on/off SMB service on OMV (web) - no results. I went to SMB shares on OMV and found out that there is empty. When I try to add a new share and specify one of my disks for it - I receive an error - something like - the same share already exists.

    What is the current stage:

    I lost access to my network disks from W10 and Linux machines (except SSH access on Linux). I still have access to OMV via the web and my DuneHD.

    Also, now, I can't update OMV (via web) - I have a "pending message" - when I try to apply the changes - I get an internal error 500.


    I hope for community help. Please advise how can I fix this problem.

  • Just additional info to my case.

    I receive these Samba's errors while trying to update OMV and using a reconfiguration network via 'omv-firstaid'.

    See attachment.


    Also when I go OMV > Services > SMB/CIFS > Shares I receive the error below:


    ***

    Failed to execute XPath query '//system/shares/sharedfolder[uuid='65820033-22fd-4320-9ca6-f6dd02fc8c3f']'.


    OMV\Config\DatabaseException: Failed to execute XPath query '//system/shares/sharedfolder[uuid='65820033-22fd-4320-9ca6-f6dd02fc8c3f']'. in /usr/share/php/openmediavault/config/database.inc:88

    Stack trace:

    #0 /usr/share/openmediavault/engined/rpc/smb.inc(137): OMV\Config\Database->get()

    #1 [internal function]: Engined\Rpc\Smb->getShareList()

    #2 /usr/share/php/openmediavault/rpc/serviceabstract.inc(122): call_user_func_array()

    #3 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod()

    #4 /usr/sbin/omv-engined(544): OMV\Rpc\Rpc::call()

    #5 {main}

    ***


    The list of the folders is empty.


    The response to the command 'systemctl status smb' is below:


    ***

    smbd.service - Samba SMB Daemon

    Loaded: loaded (/lib/systemd/system/smbd.service; enabled; preset: enabled)

    Active: active (running) since Sun 2025-01-05 17:18:33 EET; 14min ago

    Docs: man:smbd(8)

    man:samba(7)

    man:smb.conf(5)

    Process: 1200 ExecCondition=/usr/share/samba/is-configured smb (code=exited, status=0/SUCCESS)

    Process: 1409 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS)

    Main PID: 1710 (smbd)

    Status: "smbd: ready to serve connections..."

    Tasks: 4 (limit: 3933)

    CPU: 1min 5.557s

    CGroup: /system.slice/smbd.service

    ├─1710 /usr/sbin/smbd --foreground --no-process-group

    ├─1775 /usr/sbin/smbd --foreground --no-process-group

    ├─1777 /usr/sbin/smbd --foreground --no-process-group

    └─4366 /usr/sbin/smbd --foreground --no-process-group


    Jan 05 17:32:33 alpha smbd[4345]: [2025/01/05 17:32:33.526688, 0] ../../source3/param/loadparm.c:3461(process_usershare_file)

    Jan 05 17:32:33 alpha smbd[4345]: process_usershare_file: stat of /var/lib/samba/usershares/wd81 failed. Permission denied

    Jan 05 17:32:49 alpha smbd[4366]: [2025/01/05 17:32:49.848370, 0] ../../source3/param/loadparm.c:3461(process_usershare_file)

    Jan 05 17:32:49 alpha smbd[4366]: process_usershare_file: stat of /var/lib/samba/usershares/wd81 failed. Permission denied

    Jan 05 17:32:52 alpha smbd[4366]: [2025/01/05 17:32:52.254929, 0] ../../source3/param/loadparm.c:3461(process_usershare_file)

    Jan 05 17:32:52 alpha smbd[4366]: process_usershare_file: stat of /var/lib/samba/usershares/wd81 failed. Permission denied

    Jan 05 17:32:52 alpha smbd[4366]: [2025/01/05 17:32:52.306022, 0] ../../source3/param/loadparm.c:3461(process_usershare_file)

    Jan 05 17:32:52 alpha smbd[4366]: process_usershare_file: stat of /var/lib/samba/usershares/wd82 failed. Permission denied

    Jan 05 17:32:52 alpha smbd[4366]: [2025/01/05 17:32:52.354392, 0] ../../source3/param/loadparm.c:3461(process_usershare_file)

    Jan 05 17:32:52 alpha smbd[4366]: process_usershare_file: stat of /var/lib/samba/usershares/wd82 failed. Permission denied

    ***


    The response for 'systemctl status nmbd':


    ***

    ○ nmbd.service - Samba NMB Daemon

    Loaded: loaded (/lib/systemd/system/nmbd.service; disabled; preset: enabled)

    Active: inactive (dead)

    Docs: man:nmbd(8)

    man:samba(7)

    man:smb.conf(5)

    ***


    The ways below didn't help:

    'omv-salt deploy run samba'

    'omv-firstaid'


    I still have access to RPI via SSH and from my mediabox (NFS). Also syncthing works (in the background) fine on W10 and Linux machines. I don't see network folders via W10 and on Linux machines.

    • Official Post

    The problem is a corrupted database. Your SMB share is referencing a shared folders database object which does not exist anymore. OMV has some mechanism which prevents deleting of shared folders that are referenced, so the database must have been modified manually by you.

    Delete the SMB share that is referencing the shared folders database object with the uuid 65820033-22fd-4320-9ca6-f6dd02fc8c3f and the problem should be solved.

  • Hi votdev,


    Thanks a lot for your recommendation.


    Could you ask to provide with me some instructions on how to do that correctly? I know that the order of actions in this case is important.

    Can I do it via shell or a web interface of OMV? How it can touch my data on the shares?

    Why do I still not have an availability to make an update on OMV (not via shell, not via web)? How does it relate to my problem with SMB?



    I worry about saving my data on both of my external disks. Both of them are old (3-4 years). And I think this problem can be related to bad blocks on them, as a possible option. Also, I would like to avoid clearing and rebuilding whole my data files on my disks because this process can take at least 2-3 days due to huge disk sizes (8Tb+8Tb).


    I would appreciate your comments here.

    • Official Post

    First do the following:

    Delete the SMB share that is referencing the shared folders database object with the uuid 65820033-22fd-4320-9ca6-f6dd02fc8c3f and the problem should be solved.


    Obviously, you'd need to recreate the SMB share again, using the same shared folder as the base.
    ______________________________________


    Can I do it via shell or a web interface of OMV?

    Where ever possible, use the Web interface. (When you set up SMB shares or change SMB parameters on the command line; depending on what you do, changes may not be registered in config.xml OR they may be overwritten as of the next, on demand, configuration change.)

    _____________________________________

    I worry about saving my data on both of my external disks. Both of them are old (3-4 years). And I think this problem can be related to bad blocks on them, as a possible option.

    This is another issue entirely.

    If you have bad blocks on external drives, my advice would be to turn them off now, order replacements and do a drive-to-drive rsync copy when the replacements arrive. (And hope for minimal file corruption.) Continuing to use drives that are failing may push them farther toward complete failure.

    Before shutting them down, you might look at the drives' SMART stat's to evaluate their health. Guidance on that is -> here. (If you have bad sectors, don't schedule short tests. Look at the SMART attributes associated with failure -> here. (If these counts are incrementing, it's just a matter of time.)

    There's guidance on how to do rsync drive replication -> here. Once the replication is complete, there's guidance on how to switch to the backup drive.
    _____________________________________

    Also, I would like to avoid clearing and rebuilding whole my data files on my disks because this process can take at least 2-3 days due to huge disk sizes (8Tb+8Tb).

    It's a little on the late side to be worried about how long this might take, especially if you have data drives with bad blocks. The time to create backup is before it's needed. (Noah built the Ark, before it started to rain.)

  • Hello crashtest,


    Thanks a lot for your recommendations and comments!


    Maybe my question is stupid but I couldn't find the object with the uuid 65820033-22fd-4320-9ca6-f6dd02fc8c3f on the web interface of the OMV. There are my external disks shown in the menu Storage/Shared Disks:



    As I mentioned my menu Services/SMB/CIFS/Shares is empty. Of course, I can try to create new shares there but I worry that can add a mess.

    So, I found nothing that mentions 65820033-22fd-4320-9ca6-f6dd02fc8c3f in the OMV web interface. As I understood it was mentioned in log files only.


    This is my data for disks from the menu Storage/Disks:



    Similar data from the menu Storage/File Systems:



    Please advise on how can I find this uuid?


    Regarding saving my data - thanks for the links - I will meet with it. You are right, the time to make a deep HDDs check has come. I was doing details OMV configuration a long time ago (3-4 years ago). All of this time it worked nicely. Set up and forget. I thought it worked in such a way.. ( And I didn't interfere. Honestly speaking, I am too lazy to make a re-configuration (replace my disks) from the beginning because firstly I need to buy a new HDD (at least 1 disk for 10TB, it is expensive), replace correctly my old disks, and spend 2-3 days setting up OMV (wipe a new HDD, moving data, creating new shares, etc.) and then additionally spend a couple of weeks to checking of the setting up of my applications which running on OMV. I am using these apps right now for my work. Stopping them will cost me additional biz losses.

    I use 'syncthing' to synchronize data with another Linux machine in my network. So, my data is stored on two other PCs but in parts. By the way, it is still working w/o a problem in the background on RPI, W10, and Linux machines. So, the data can be saved, but, sh1t, the process of a re-configuration will take a lot of time.

    I will try to avoid this moment as long as possible.

  • Please advise on how can I find this uuid?

    sudo omv-showkey shares


    grep 65820033 /etc/openmediavault/config.xml

  • Hello Soma, crashtest, votdev,


    I found the section with 65820033-22fd-4320-9ca6-f6dd02fc8c3f in /etc/openmediavault/config.xml and removed it.

    After OMV rebooted, I saw my shares in menu Services/SMB/CIFS/Shares. They are such as were before. No changes.

    Then I managed to do the OMV update successfully. And finally, I saw my shares on other PCs. Everything works okay.

    Please put this thread in solved. We can close this case.


    I want to say genuinely thank you very much! May god bless you! :)


    I have switched on a small regular donation for your team to the paypal@openmediavault.org account.

    I regret only that I have not done it before.

  • macom

    Added the Label resolved

Participate now!

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