SMB Shares Inaccessible from Legacy Clients after 12.0-U1 update
Description
Problem/Justification
Impact
relates to
SmartDraw Connector
Katalon Manual Tests (BETA)
Activity

Andrew Walker December 18, 2020 at 3:02 PM
The attached git commit alters behavior of zhandle_get_dataset() so that if it encounters a legacy mountpoint (e.g. <pool>/.system), then we attempt to resolve its path through getmntinfo(3). If this fails then the dataset isn't mounted and we don't need to bother with it any further (no further operations to retrieve metadata about dataset).

Matt Lathrop December 18, 2020 at 2:19 AM(edited)
The code gave me did allow legacy clients to connect again my my logs are still flooded with messages similar to
Dec 17 18:18:51 beta 1 2020-12-17T18:18:51.078996-08:00 xxx.xxx.xxx smbd 3967 - - [2020/12/17 18:18:51.078829, 0] ../../source3/modules/smb_libzfs.c:938(zhandle_get_dataset)
Dec 17 18:18:51 beta 1 2020-12-17T18:18:51.079212-08:00 xxx.xxx.xxx smbd 3967 - - zhandle_get_dataset: Failed to stat dataset mounpoint [legacy] for dataset [mainpool/.system]: No such file or directory
It appears to print the above every 1-5 seconds in the logs.

Andrew Walker December 17, 2020 at 8:22 PM
Hi Matt, I believe this is a duplicate of the issue fixed here: https://github.com/freenas/ports/commit/5859fd3c92a3b906e0002001a99cb200b22ef7b2#diff-1e28aa2ba2880ce48a87933ca4698bf68c31ee724fa1be717b8a7ec2844ea28d
Please feel free to email me at awalker@ixsystems.com if you want to install a development snapshot with the fix prepared for U1.1 in a VM for testing.

Matt Lathrop December 17, 2020 at 2:03 PM
added to private attachments.
After updateing to 12.0-U1 I saw a large ammount of print outs in the system logs that looked similar to the following:
Dec 16 20:52:55 beta 1 2020-12-16T20:52:55.308426-08:00 xxx.xxx.xxx smbd 4909 - - zhandle_get_dataset: Failed to stat dataset mounpoint [legacy] for dataset [mainpool/.system]: No such file or directory
Upon checking my smb clients to make sure they were working I found that Windows 10 and modern MacOS clients had no problem connecting. However a legacy media player I have that I believe uses SMBv1 can't connect to shares anymore. It does see the shares broadcast via NetBIOS-NS but it can't connect to any of them. It actually causes the client to lock up. The client is an oppo blu ray player if that is helpful. I am happy to provide more complete logs if there is a way to share them in provate without exposing any private data (URLs etc.). To be clear this was all working fine before the update and to my knowlege was not printing the above error. Turning off SMB or disabling/deleting all shares makes the errors stop printing but even creating a brand new share causes the error to start printing again.