Repository navigation
Commit 8354cec
committed
fix: increase NFS timeout from 1s to 5s to allow valid mounts to succeed
**Problem:**
NFS mounts were failing with "Mount failed after 3 attempts" even for valid,
working shares like nfs://192.168.1.224/var/nfs/shared/data.
**Root Cause:**
The timeo=10 (1 second RPC timeout) option added in commit 5ade992 was too
aggressive. Valid NFS mounts on local networks can take >1 second due to:
- Server load and disk I/O
- NFS protocol handshake overhead
- Network conditions
**Solution:**
Increased timeo from 10 (1s) to 50 (5s):
- Allows valid mounts to succeed even with server load
- Still provides reasonably fast failure (~20-25s total for non-existent shares)
- Maintains fail-fast behavior with soft mount option
**Impact:**
- Valid shares: Now succeed within 5 seconds
- Invalid shares: Fail in ~20-25 seconds (vs previous 150+ seconds before commit 5ade992)
- Balanced approach between fast failure and mount success
Files modified:
- src/mount/drivers/nfs.rs: Changed timeo=10 to timeo=50
- tests/unit/mount_drivers_test.rs: Updated test assertion1 parent 5ade992 commit 8354cec
2 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
| 313 | + | |
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
706 | | - | |
707 | | - | |
| 706 | + | |
| 707 | + | |
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
| |||
0 commit comments