Unassigned Devices - Managing Disk Drives and Remote Shares Outside of The Unraid Array


Recommended Posts

That's not a very good way to show the log.  It would be better to attach the syslog and not include it in the body of the post.

 

UD is not seeing the disk as encrypted and is not opening it with luksopen.  Post a screen shot of UD where the drive file system is shown.  Right now UD recognizes encrypted disks with the file type 'crypto_LUKS'.  Your disk was attempted to be mounted as an xfs disk.  UD uses the unRAID keyfile.  You cannot enter the passphrase manually.

Link to comment

I have the disk attached as an array disk.  It was showing in unRaid as an XFS in UD, not sure why as it is presently formatted as an unRaid array device as XFS Encrypted (and confirmed in the disk settings) and I am copying files to it at present.   The drive shows the green padlock for encrypted and unlocked status.

 

Is there some commands I can run on the disk to see why it isn't showing in UD correctly?  Or I can start over with another smaller disk and see what happens?

Link to comment
22 minutes ago, tr0910 said:

Yep, seems to fix it....

If you want to keep the preclear plugin installed, go to the Settings>Unassigned Devices and set the "Enable Preclear rc.diskinfo daemon?" to "No" so it is not used to update the UD status.  The rc.diskinfo has not been updated to support the UD mounting of encrypted disks.  @gfjardim will need to update the preclear plugin.

Link to comment

Hi Dlandon

Been looking at Unassigned Devices and found an anomaly, undocumented feature, bug, incompatibility issue :)

 

I'm trying to map to an SMB share running on a Windows 2016 Server and every time I try to connect from Unassigned Devices, I get error(13): -

Dec 31 19:00:58 Tower unassigned.devices: Mount SMB/NFS command: mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,vers=3.0,username=*******,password=******* 'mount point' '/mnt/disks/mount_point'

Dec 31 19:00:58 Tower unassigned.devices: Mount of 'mount point' failed. Error message: mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) 

 

I know that my SMB shares work as I have other LINUX servers that are able to connect to without any issues.

 

I looked at your code in /usr/local/emhttp/plugins/unassigned.devices/include/lib.php and modified line 569 to include security settings: -

 

569:                         return "rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,sec=ntlm,vers=%s,username=%s,password=%s";

 

This minor change worked for me - not sure whether it's something to include going forward.
 

Link to comment
30 minutes ago, jakethecatuk said:

Hi Dlandon

Been looking at Unassigned Devices and found an anomaly, undocumented feature, bug, incompatibility issue :)

 

I'm trying to map to an SMB share running on a Windows 2016 Server and every time I try to connect from Unassigned Devices, I get error(13): -

Dec 31 19:00:58 Tower unassigned.devices: Mount SMB/NFS command: mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,vers=3.0,username=*******,password=******* 'mount point' '/mnt/disks/mount_point'

Dec 31 19:00:58 Tower unassigned.devices: Mount of 'mount point' failed. Error message: mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) 

 

I know that my SMB shares work as I have other LINUX servers that are able to connect to without any issues.

 

I looked at your code in /usr/local/emhttp/plugins/unassigned.devices/include/lib.php and modified line 569 to include security settings: -

 

569:                         return "rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,sec=ntlm,vers=%s,username=%s,password=%s";

 

This minor change worked for me - not sure whether it's something to include going forward.
 

Please post your diagnostics.

Link to comment
13 minutes ago, jakethecatuk said:

 

Hi

 

I could - but not sure what value it would have.  As I have rebooted my server after making the change I highlighted above, the log files do not include any error information as the mount now works as expected.

 

Will change it back tomorrow and reboot to capture the diagnostics you need and post them.

Link to comment
13 hours ago, jakethecatuk said:

 

Hi

 

I could - but not sure what value it would have.  As I have rebooted my server after making the change I highlighted above, the log files do not include any error information as the mount now works as expected.

The Diagnostics helps me understand the circumstances that cause you to have to set the security level.  What you have done does not necessarily apply to all users.  Just because this works for you, does not mean it will work for everyone.  I need to understand when to use it.

Link to comment
4 hours ago, jakethecatuk said:

 

Hi 

Sent you a PM with the diagnostic files as requested.

 

Let me know if you need any more info

Please post your diagnostics in this thread.  Other people can also review the diagnostics and provide feedback.  Your diagnostics are anonimized to remove personal information.

Link to comment
14 hours ago, jakethecatuk said:

Hi Dlandon

Been looking at Unassigned Devices and found an anomaly, undocumented feature, bug, incompatibility issue :)

 

I'm trying to map to an SMB share running on a Windows 2016 Server and every time I try to connect from Unassigned Devices, I get error(13): -

Dec 31 19:00:58 Tower unassigned.devices: Mount SMB/NFS command: mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,vers=3.0,username=*******,password=******* 'mount point' '/mnt/disks/mount_point'

Dec 31 19:00:58 Tower unassigned.devices: Mount of 'mount point' failed. Error message: mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) 

 

I know that my SMB shares work as I have other LINUX servers that are able to connect to without any issues.

 

I looked at your code in /usr/local/emhttp/plugins/unassigned.devices/include/lib.php and modified line 569 to include security settings: -

 

569:                         return "rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,sec=ntlm,vers=%s,username=%s,password=%s";

 

This minor change worked for me - not sure whether it's something to include going forward.
 

Please try sec=ntlmv2 and let me know if that works.

Link to comment
1 hour ago, dlandon said:

Please try sec=ntlmv2 and let me know if that works.

Hi

 

Here are the log file entries: -

Jan 1 15:21:50 Tower unassigned.devices: Mount SMB share 'mount point' using SMB1 protocol.
Jan 1 15:21:50 Tower kernel: Status code returned 0xc000000d NT_STATUS_INVALID_PARAMETER
Jan 1 15:21:50 Tower kernel: CIFS VFS: Send error in SessSetup = -22
Jan 1 15:21:50 Tower kernel: CIFS VFS: cifs_mount failed w/return code = -22
Jan 1 15:21:50 Tower unassigned.devices: Mount SMB/NFS command: mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,sec=ntlmv2,vers=1.0,username=*******,password=******* 'mount point' '/mnt/disks/mount_point'
Jan 1 15:21:50 Tower unassigned.devices: Mount of 'mount point' failed. Error message: mount error(22): Invalid argument Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) 

 

Looks like sec=ntlmv2 isn't supported by the version of CIFS that is installed in unraid.

 

Link to comment
3 hours ago, jakethecatuk said:

Hi

 

Here are the log file entries: -

Jan 1 15:21:50 Tower unassigned.devices: Mount SMB share 'mount point' using SMB1 protocol.
Jan 1 15:21:50 Tower kernel: Status code returned 0xc000000d NT_STATUS_INVALID_PARAMETER
Jan 1 15:21:50 Tower kernel: CIFS VFS: Send error in SessSetup = -22
Jan 1 15:21:50 Tower kernel: CIFS VFS: cifs_mount failed w/return code = -22
Jan 1 15:21:50 Tower unassigned.devices: Mount SMB/NFS command: mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,sec=ntlmv2,vers=1.0,username=*******,password=******* 'mount point' '/mnt/disks/mount_point'
Jan 1 15:21:50 Tower unassigned.devices: Mount of 'mount point' failed. Error message: mount error(22): Invalid argument Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) 

 

Looks like sec=ntlmv2 isn't supported by the version of CIFS that is installed in unraid.

 

It appears that samba is now defaulted to ntlmv2 security and not ntlm as it has in the past.  The samba developers are trying to increase the security of samba and have defaulted to SMB3 and ntlmv2 because they are more secure.  Since the 'sec=' parameter is not set in the mount command in UD, it defaults to the samba default setting.  The CIFS mount on your remote server may have worked in the past when ntlm was the default security, but with the default to ntlmv2, it won't mount.

 

ntlmv2 is supported on unRAID.  It's your remote server that does not accept ntlmv2.  Setting the security to ntlm has made the mount compatible with your Windows 2016 server.  You may be able to set the Windows 2016 server SMB security and overcome this limitation.  If you can I would do that for increased security.

 

I am adding a setting in the Settings->Unassigned Devices so the security can be specifically set and not depend on the samba default.  UD will default to the ntlmv2 protocol and you can select ntlm if your remote server does not accept ntlmv2.  This will apply to all SMB mounts.  In my testing with ntlm as the security setting, I found some mounts would only mount with SMB1, so ntlm is actually more of a security issue than just the ntlm setting.  SMB1 is an old SMB protocol, is not very secure, and is going to probably be phased out of samba.

 

I would recommend always using ntlmv2 and try to get the remote server to accept it through a configuration setting or a software/firmware update if possible.

 

EDIT: I've decided a better way to handle the security situation is to force ntlm with the "Force all SMB remote shares to SMB 1v?" when it is set to "Yes".  It looks like this is what is happening anyway.

Edited by dlandon
Link to comment
5 hours ago, jakethecatuk said:

Hi

 

Here are the log file entries: -

Jan 1 15:21:50 Tower unassigned.devices: Mount SMB share 'mount point' using SMB1 protocol.
Jan 1 15:21:50 Tower kernel: Status code returned 0xc000000d NT_STATUS_INVALID_PARAMETER
Jan 1 15:21:50 Tower kernel: CIFS VFS: Send error in SessSetup = -22
Jan 1 15:21:50 Tower kernel: CIFS VFS: cifs_mount failed w/return code = -22
Jan 1 15:21:50 Tower unassigned.devices: Mount SMB/NFS command: mount -t cifs -o rw,nounix,iocharset=utf8,_netdev,file_mode=0777,dir_mode=0777,sec=ntlmv2,vers=1.0,username=*******,password=******* 'mount point' '/mnt/disks/mount_point'
Jan 1 15:21:50 Tower unassigned.devices: Mount of 'mount point' failed. Error message: mount error(22): Invalid argument Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) 

 

Looks like sec=ntlmv2 isn't supported by the version of CIFS that is installed in unraid.

 

Update UD and set the Settings->Unassigned Devices "Force all SMB remote shares to SMB 1v?" to "Yes" and your remote SMB share should mount.  Post diagnostics if you have any trouble.

Link to comment

Hey, Updated to the latest 6.4.0 rc19b build and I'm getting:  

 

Jan 3 22:47:59 Mk4Alpha root: error: /plugins/unassigned.devices/UnassignedDevices.php: wrong csrf_token

 

Looked at the unassigned devices and everything seems to mount fine , no problems or anything. I can access the unassigned devices as well. Any reason this error is "bad" and I should uninstall the plugin until fixed?

Link to comment

I have tried repeatedly to delete this partition with no luck-

 

2qc2qsl.jpg

 

The log shows this-

Jan 4 11:06:38 Brunnhilde kernel: mdcmd (67): spindown 1
Jan 4 11:15:12 Brunnhilde afpd[23178]: child[28427]: asev_del_fd: 5
Jan 4 11:20:55 Brunnhilde unassigned.devices: Removing partition '1' from disk '/dev/sdd'.
Jan 4 11:21:11 Brunnhilde rc.diskinfo[12053]: PHP Warning: Missing argument 2 for force_reload() in /etc/rc.d/rc.diskinfo on line 691
Jan 4 11:21:11 Brunnhilde rc.diskinfo[12053]: SIGHUP received, forcing refresh of disks info.
Jan 4 11:21:21 Brunnhilde rc.diskinfo[12053]: PHP Warning: Missing argument 2 for force_reload() in /etc/rc.d/rc.diskinfo on line 691
Jan 4 11:21:21 Brunnhilde rc.diskinfo[12053]: SIGHUP received, forcing refresh of disks info.

 

Link to comment
1 hour ago, wgstarks said:

I have tried repeatedly to delete this partition with no luck-

 

2qc2qsl.jpg

 

The log shows this-


Jan 4 11:06:38 Brunnhilde kernel: mdcmd (67): spindown 1
Jan 4 11:15:12 Brunnhilde afpd[23178]: child[28427]: asev_del_fd: 5
Jan 4 11:20:55 Brunnhilde unassigned.devices: Removing partition '1' from disk '/dev/sdd'.
Jan 4 11:21:11 Brunnhilde rc.diskinfo[12053]: PHP Warning: Missing argument 2 for force_reload() in /etc/rc.d/rc.diskinfo on line 691
Jan 4 11:21:11 Brunnhilde rc.diskinfo[12053]: SIGHUP received, forcing refresh of disks info.
Jan 4 11:21:21 Brunnhilde rc.diskinfo[12053]: PHP Warning: Missing argument 2 for force_reload() in /etc/rc.d/rc.diskinfo on line 691
Jan 4 11:21:21 Brunnhilde rc.diskinfo[12053]: SIGHUP received, forcing refresh of disks info.

 

Set Settings->Unassigned Devices "Enable preclear rc.diskinfo daemon?" to "No".

Link to comment
  • trurl pinned this topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.