Announcement

Collapse
No announcement yet.

CIFS share availability at boot and after sleep

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    CIFS share availability at boot and after sleep

    I just converted my home office desktop to Kubuntu 21.10. The PC has 2 users who login, logout, and switch users throughout the day. When the PC is not active for 1 hour, it sleeps. There is something just not right yet with my mounting of my NAS that causes the NAS not to be mounted sometimes after the system resumes from sleep. My fstab is
    Code:
    //192.168.0.125/nas /mnt/nas cifs defaults,user=jim,password=123456,uid=jim,gid=users,dir_mode=0775,file_mode=0664 0 0
    Both users are in the 'users' group. The NAS is always available after boot. I think sleep is causing the problem.
    I have tried a different fstab entry which is below.
    Code:
    //192.168.0.125/nas /mnt/nas cifs defaults,user=jim,password=123456,uid=jim,gid=users,dir_mode=0775,file_mode=0664,noauto,x-systemd.automount 0 0
    I'm not sure which is the right one to use, but the second one is what I used previously when this system was on Linux Mint 20.3

    I need a way so the NAS is always attached. The second method used to only mount when referenced. But Backup (deja-du) is having issues at present.

    #2
    I don't know anything about NAS but since Claydoh isn't around I'm stepping in as your friendly google bot!
    https://www.techytalk.info/ubuntu-fi...me-from-sleep/
    "This procedure works for ethernet or wifi network devices, or any other hardware device that makes problems after resume from sleep."

    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Thanks, but I don't think this is my problem. My network is working fine after resume from sleep. What will happen is in the morning I get to my home office and find the PC power button blinking slowly indicating the system is sleeping. I press the "space bar" and the system comes alive and I login. Usually, Thunderbird mail is open and will start updating after a few seconds and so I know the network is working.

      What happened this morning was I got a failure notification from deja-dup because of a permissions problem. It could not create a file on the SMB/CIFS NAS. So I checked and there was nothing mounted to the mount point. So I manually mounted the mount point listed in fstab and it worked and the backup worked. Of course, when I logged out and into another account the manual mount went away and I then just rebooted to make it system wide.

      I think systemd translate the fstab into .mount "services" but I'm not sure if they are supposed to be persistent through a sleep/wake cycle. I had some problem with my Linux laptop and that's when someone suggested the noauto,x-systemd.automount option, but he was an Arch user and not sure if that works on Kubuntu.

      Right now I have deja-dup setup to do backup to a "local folder" and point it to where I mounted the NAS which is /mnt/nas. There is an option that works, that I've tested, that lets you setup the backup to a network server and you can specify smb://192.168.0.125/nas and then put in the folder. Once you put in you cifs credentials which it remembers, it works. I need to setup some experiments using both methods and sleep and see what works.

      Comment

      Working...
      X