Bug 200784 - [vfs] Slow shutdown on r283297 amd64
Summary: [vfs] Slow shutdown on r283297 amd64
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-06-11 09:43 UTC by 214748mv
Modified: 2015-08-27 10:32 UTC (History)
1 user (show)

See Also:


Attachments
FreeBSD 11-CURRENT shutdown.patch (1.30 KB, patch)
2015-06-11 09:43 UTC, 214748mv
no flags Details | Diff
Patch for FreeBSD 11.0-CURRENT r287155 (506 bytes, patch)
2015-08-27 10:32 UTC, 214748mv
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description 214748mv 2015-06-11 09:43:58 UTC
Created attachment 157630 [details]
FreeBSD 11-CURRENT shutdown.patch

The slow shutdown is caused by some remote smbfs shares mounted via openvpn: the remote drives are unmounted after the openvpn daemon termination, this induces some long timeouts. The solution is to unmount the smbfs shares in a shutdown script before the openvpn daemon termination. I have discovered this issue with this ‘dirty’ patch that displays  the unmounted fs at shutdown.

For testing the the patch apply it in /sys/kern, rebuild and install the
kernel.

Set the new OID:

# sysctl kern.shutdown.show_umountfs=1

Halt the system:

# shutdown -h now

The full history at: https://lists.freebsd.org/pipermail/freebsd-current/2015-June/056174.html

Regards,
Maurizio
Comment 1 214748mv 2015-08-27 10:30:22 UTC
I have upgraded the patch for FreeBSD 11.0-CURRENT r287155: simplified the patch removing the OID sysctl kern.shutdown.show_umountfs.

For testing the the new patch apply it in /sys/kern, rebuild and install the kernel.
Comment 2 214748mv 2015-08-27 10:32:59 UTC
Created attachment 160403 [details]
Patch for FreeBSD 11.0-CURRENT r287155