You are not logged in.
Env:
plasma-desktop 6.2.2
Reproduce:
1. add an entry for samba in /etc/fstab
2. open dolphin, click the folder to mount the samba file system
3. close dolphin
4. shutdown samba service
5. open dolphin, dolphin blocks for a long time, when the window shows, it doesn't respond, and a message asks whether to terminate dolphin
6. open konsole, run "ls", it blocks for a few seconds, then shows "ls: cannot access 'samba_share': Host is down"
7. if "# sudo umount ~/samba_share", it shows "umount: /path/to/samba_share: target is busy."
After step 4, I've tried logout & login, it's very very blocky. Rebooting solves the problem.
Last edited by jronald (2024-10-25 04:51:15)
Offline
1. add an entry for samba in /etc/fstab
Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
Post your fstab.
2. open dolphin, click the folder to mount the samba file system
Does that automount or utilize a premounted CIFS share or access the share via the smb:// kio module?
4. shutdown samba service
Why?
Offline
1. add an entry for samba in /etc/fstab
Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
Post your fstab.
//192.168.0.123/Downloads /home/user/samba_share cifs uid=user,gid=user,noatime,credentials=/home/user/.config/samba_credentials,iocharset=utf8,noauto,user 0 0
2. open dolphin, click the folder to mount the samba file system
Does that automount or utilize a premounted CIFS share or access the share via the smb:// kio module?
no automount and no premount, it mounts when I click the folder "/home/user/samba_share"
4. shutdown samba service
Why?
I got two mini PCs, each with a samba server, one server is always on, the other is less used, to save power, I'd like to turn it off when idle.
Offline
You're not using x-systemd.automount, though?
What's the output of "mount" after successfully opening the mount in dolphin?
https://man.archlinux.org/man/extra/cif … .8.en#soft - but that's supposed to be default anyway.
I got two mini PCs, each with a samba server, one server is always on, the other is less used, to save power, I'd like to turn it off when idle.
So you're not stopping anything on the client, you're basically shutting down the server?
Try to add "_netdev,soft,x-systemd.automount,x-systemd.device-timeout=10,x-systemd.idle-timeout=300"
https://www.freedesktop.org/software/sy … .automount
Offline
You're not using x-systemd.automount, though?
What's the output of "mount" after successfully opening the mount in dolphin?https://man.archlinux.org/man/extra/cif … .8.en#soft - but that's supposed to be default anyway.
Just add entries in /etc/fstab as above on client, that all.
I even don't know what x-systemd is.
$ mount
...
//192.168.0.123/share on /home/username/samba_share type cifs (rw,nosuid,nodev,relatime,vers=3.1.1,cache=strict,username=username,uid=1000,forceuid,gid=1000,forcegid,addr=192.168.0.123,file_mode=0755,dir_mode=0755,iocharset=utf8,soft,nounix,serverino,mapposix,reparse=nfs,rsize=4194304,wsize=4194304,bsize=1048576,retrans=1,echo_interval=60,actimeo=1,closetimeo=1,user=username)
...
I got two mini PCs, each with a samba server, one server is always on, the other is less used, to save power, I'd like to turn it off when idle.
So you're not stopping anything on the client, you're basically shutting down the server?
Yes, everything is basic.
Try to add "_netdev,soft,x-systemd.automount,x-systemd.device-timeout=10,x-systemd.idle-timeout=300"
https://www.freedesktop.org/software/sy … .automount
The problem is not critical, I'd like to keep it simple.
Thanks all the same.
Last edited by jronald (2024-10-24 16:02:23)
Offline
x-systemd.automount will mount the share on access (ie. even "ls /home/username/nuc_share" will mount it), the other options provide a 10s timeout in case that fails and automatically unmount the share ater a 5 minute cooldown
I'm not sure what actually mounts it (thoug I guess you're getting an entry in the location bar and click that and then dolphin just mounts the share) but for transient remote FS you're better off w/ a transient protocol implementation like kio smb:// or a self-destructing mount via x-systemd.idle-timeout=300
Although it's kinda odd that dolphin hangs.
How long does it currently take for "ls /home/username/nuc_share" to timeout on a lost share?
Offline
x-systemd.automount will mount the share on access (ie. even "ls /home/username/nuc_share" will mount it), the other options provide a 10s timeout in case that fails and automatically unmount the share ater a 5 minute cooldown
I'm not sure what actually mounts it (thoug I guess you're getting an entry in the location bar and click that and then dolphin just mounts the share) but for transient remote FS you're better off w/ a transient protocol implementation like kio smb:// or a self-destructing mount via x-systemd.idle-timeout=300
In dolphin, there is a side pane on the left as a convention.
After adding entries for samba in /etc/fstab, the mount points will show there automatically, and it'll try to be mounted by clicking.
BTW a solution based on timer is not ideal, an async mechanism is ideal.
Although it's kinda odd that dolphin hangs.
How long does it currently take for "ls /home/username/nuc_share" to timeout on a lost share?
About 20 seconds.
Last edited by jronald (2024-10-24 16:11:57)
Offline
BTW a solution based on timer is not ideal, an async mechanism is ideal.
Use smb://, not a cifs mount
You can "umount -l" or "umount -f" the share
There's no way to automgically know "ok, this server will definitevly not respond" - idk why dolphin tries to access the share (last open directory) and it probably would benefit from a threaded filesystem model, but you'll always get some stall before an error because the filesystem didn't respond.
Offline
BTW a solution based on timer is not ideal, an async mechanism is ideal.
Use smb://, not a cifs mount
It works.
You can "umount -l" or "umount -f" the share
"umount -l" works, maybe the best workaround
"umount -f" doesn't work
$ sudo umount -f ./samba_share
umount: /home/username/samba_share: target is busy.
BTW "umount" without "-l" or "-f" before any block action works.
There's no way to automgically know "ok, this server will definitevly not respond" - idk why dolphin tries to access the share (last open directory) and it probably would benefit from a threaded filesystem model, but you'll always get some stall before an error because the filesystem didn't respond.
It could show a blank folder for latency before contents or errors show, without any blocking.
Last edited by jronald (2024-10-25 05:49:58)
Offline
It could show a blank folder for latency before contents or errors show, without any blocking.
it probably would benefit from a threaded filesystem model
Offline
Offline