Results 1 to 3 of 3

Thread: Power cut - lost files in NFS folder

  1. #1
    Join Date
    May 2021
    Beans
    1

    Power cut - lost files in NFS folder

    We had the technician round to fix the dishwasher. For some reason, he took it upon himself to cut the power to the entire house... (needless to say I will be investing in a UPS shortly!)

    Upon rebooting all my computers, i realised the NFS server was down. It's hosted on a VM.

    Code:
    $ systemctl list-dependencies nfs-kernel-server
    nfs-kernel-server.service
     ├─-.mount
    ● ├─auth-rpcgss-module.service
    ● ├─nfs-config.service
    ● ├─nfs-idmapd.service
    ● ├─nfs-mountd.service
     ├─proc-fs-nfsd.mount
    ● ├─rpc-svcgssd.service
     ├─rpcbind.socket
     ├─srv-nfs4-temp\x2dplots.mount
     ├─system.slice
     └─network.target
    Code:
    $ systemctl status nfs-server.service 
    ● nfs-server.service - NFS server and services
         Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
        Drop-In: /run/systemd/generator/nfs-server.service.d
                 └─order-with-mounts.conf
         Active: inactive (dead)
    
    May 19 17:38:58 docker systemd[1]: Dependency failed for NFS server and services.
    May 19 17:38:58 docker systemd[1]: nfs-server.service: Job nfs-server.service/start failed with result 'dependency'.
    These are the two relevant errors I've managed to identify. But most importanly, when I go to my NFS folder on the server /srv/nfs4/temp - it's now empty. There are zero files. Is there any way to (1) restart the NFS service and (2) recover the files?

  2. #2
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Power cut - lost files in NFS folder

    Thread moved to Server Platforms.

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

    Re: Power cut - lost files in NFS folder

    Try:
    Code:
    sudo systemctl restart nfs-client.target
    sudo mount -a
    This assumes the NAS device is up, not corrupted, and the /etc/fstab was used to specify NFS mounts. If the NFS server hasn't mounted the storage, then you'll need to work on that system.

    If you use autofs for all temporary mounts, which is what I do, just restart the autofs service, then try to access the storage location using any tool.

    Oh ... and you'll need to shutdown any VMs the system is trying to run off the NFS storage. Any local programs shouldn't be trying to access any files/directories on the NFS when the restart happens.

    A reboot of the nfs client system would have done these things already, so if that didn't work, the problem is on the nfs-server side and will need to be addressed there.

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
  •