You are not logged in.

#1 2024-01-11 20:56:12

OpusOne
Member
Registered: 2023-05-31
Posts: 84

NFS blocking kio

Hello, I recently ran into an issue that may sound obvious to some of you, but still thought it may be interesting to discuss. (Not sure if this is the best forum section for this, you can move it if not.)

Context:  KDE plasma 5.27.10.

How to reproduce:
1. Mount a NFS share.
2. The remote server with the NFS share goes to standby, while the NFS share is still mounted.
3. kio seems to block until you unmount the NFS share.
4. Consequence is that many file operations block as well, even on other filesystems. For instance, a subsequent 'df -h' would hang without displaying anything.
4. Unmounting the NFS share in this situation seems itself impossible and hangs until the remote server wakes up.

Maybe it's all perfectly normal, but I'm thinking there should be some detection of this or at least some timeout, which there doesn't seem to be (or if there is, it must be really long, as it blocked for several minutes until I woke up the server and unmounted the NFS share.)

Your thoughts?

Offline

#2 2024-01-11 21:15:35

d.ALT
Member
Registered: 2019-05-10
Posts: 920

Re: NFS blocking kio

By default hard is used. Try mounting with soft


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#3 2024-01-11 21:55:00

OpusOne
Member
Registered: 2023-05-31
Posts: 84

Re: NFS blocking kio

Thanks. Makes sense. Problem is that with the 'soft mounting' option, if there is written data in cache that hasn't been commited to the server yet and there's a timeout, this data will be lost "silently", if I got it right (meaning the corresponding file write operations may have not failed). So, not the best option either.
So I guess one "workaround" would be mounting with 'soft' and disabling write cache, which is not ideal either.

Offline

#4 2024-01-11 22:40:30

d.ALT
Member
Registered: 2019-05-10
Posts: 920

Re: NFS blocking kio

The "real" issue here is:

OpusOne wrote:

2. The remote server with the NFS share goes to standby, while the NFS share is still mounted.

I prioritize data integrity, so I left hard enabled.
On my server, disks are going in standby-mode (spins down), not the machine itself.
When performing operations onto the nfs shares, clients wake-up dormant disk(s).

Can you disable you whole computer / NAS going into standby?


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#5 2024-01-11 23:20:40

OpusOne
Member
Registered: 2023-05-31
Posts: 84

Re: NFS blocking kio

I actually don't let it go into standby by itself, I control it with a script via ssh, and wake it up using wake-on-lan. Which works quite well.

I hadn't thought about the potential blocking issue described here, but now that it's clear, I have modified said script to automatically unmount the NFS share before sending a command to the server to go into standby. So that will eliminate the risk altogether.
Likewise, it will get remounted after sending a WoL message.

Offline

Board footer

Powered by FluxBB