Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

On 11/19/2021 at 10:07 AM, dlandon said:

UD depends on the id that udev picks up.  UD uses the /by-id/ to determine what is in the array and what is unassigned and that becomes the id UD uses.

 

Right, I'm following. When I look at the include/lib.php code, I don't see why it's not working on it's initial detection of unassigned disks. The serial numbers are unique that the controller is providing.

 

However the 3108 is returning two /by-id/ when invoking 'udevadm' , the other controllers do not do this.

 

It's passing through an additional /by-id/wwn- identifier for the drive in addition to the expected /by-id/scsi- .

 

Is it possible that lib.php is expecting only one /by-id/ to be returned when one of the functions for disk detection invokes the 'udevadm' command and it returns two? Because everything so far that I've seen be detected only has the one /by-id/scsi-*  value returned in 'udevadm'

 

Areca:

disk/by-id/scsi-ST12000NM002G_XV9J0000C0398824

 

3108:

disk/by-id/scsi-ST12000NM002G_ZLW0XV9J0000C0398824

disk/by-id/wwn-0x5000c500ca42d697

 

Raw output log files attached.

 

 

 

Edited by Lev

  • Replies 11.9k
  • Views 2.1m
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • It's that self healing feature I built into UD.  It just fixes itself.

  • New release of UD.  Changes: When changing the mount point (which is also the share name), the mount point is checked for a duplicate of a user share or another UD device.  Samba cannot handle

  • Major new release of UD: "Where are the switches?"  The "Pass Through", "Read Only", "Automount", and "Share" switches have been moved to a new Edit Settings dialog.  This is also where the sc

Posted Images

  • Author
7 minutes ago, Lev said:

Right, I'm following. When I look at the include/lib.php code, I don't see why it's not working on it's initial detection of unassigned disks. The serial numbers are unique that the controller is providing.

It's a little more involved that that.  UD collects all the disks by-id into an array.  wwn ids are ignored.  It then removes any from the array with a device number (hdX, sdX, and nvmeX) that is the same device number as a device in the array - it's assumed to be an array disk.  What's left are unassigned disks.

 

Any duplicates in the by-id are taken as unassigned because each one has a unique device number.

 

Any that are skipped are assumed in the array if the device number is the same as a disk in the array. 

1 hour ago, dlandon said:

You are using the environment variable $LABEL as if it is the $MOUNTPOINT variable at times.  The $LABEL variable is the physical label of the partition on the disk and may or may not be the $MOUNTPOINT UD is using.  Don't use it as the mountpoint /mnt/disk/$LABEL you will have issues because it is not necessarily the actual mountpoint.  UD will unmount /mnt/disk/$MOUNTPOINT.  The $MOUNTPOINT may not be the same as /mnt/disk/$LABEL.  The script that gets executed is defined in the UD settings for the device and may or may not be the $MOUNTPOINT or the $LABEL.

 

Don't do this:
 

	if [ ! -n ${MOUNTPOINT} ]; then
		MOUNTPOINT="/mnt/disks/${LABEL}"
	fi

when you mount it.  Let UD handle it.

 

EDIT: You can check to see if the disk is mounted with this:

if mountpoint -q $MOUNTPOINT; then

 

Thanks for this tip. I'll try.

 

Another question.
Shouldn't the device name be Disk 4 (attached)?

img.jpg

  • Author
2 hours ago, Braulio said:

Shouldn't the device name be Disk 4 (attached)?

It shouldn't be sdg, it should be 'Dev X'.  May or may not be 4.  Click on the double arrows icon in the upper right of the UD page and see if it clears up.

On 11/19/2021 at 8:14 PM, dlandon said:

It shouldn't be sdg, it should be 'Dev X'.  May or may not be 4.  Click on the double arrows icon in the upper right of the UD page and see if it clears up.

This way didn't work. To solve I turned off the array and turned it on again.  I'll look at it a few more days.  Thank you for your help

On 11/19/2021 at 11:15 AM, dlandon said:

It's a little more involved that that.  UD collects all the disks by-id into an array.  wwn ids are ignored.  It then removes any from the array with a device number (hdX, sdX, and nvmeX) that is the same device number as a device in the array - it's assumed to be an array disk.  What's left are unassigned disks.

 

Any duplicates in the by-id are taken as unassigned because each one has a unique device number.

 

Any that are skipped are assumed in the array if the device number is the same as a disk in the array. 

 

Thanks for the info, this will help as I look deeper at the functions.

 

I have new information to share, its not what I was expecting...

 

I was never sure how all this would work out with the 3108 IR mode controller that's embedded in my motherboard. So last week I ordered a 3008 IT mode controller, which is the most widely recommended HBA LSI chipset for SAS3 on UnRAID. It arrived yesterday and I installed it. Firmware has been updated to latest release.

 

I damn near fell out of my chair when UD exhibited the same behavior in regards to the SAS drives we've been talking about. :(

 

Up until now, I had been assuming, and perhaps you have too, that the behavior I'm seeing with UD not detecting the six SAS disks was due to using a unsupported 3108 controller in JBOD pass through mode that must be messing with the how the disks are being reported.

 

Now I can recreate the same behavior on a HBA. :(

 

This is not what I was expecting. My plan was to install the HBA, see UD behaves as expected, detects the SAS drives correctly and then I'd move on from the 3108 and use the 3008 HBA. All I really wanted to was to get confidence in that 3108 controller. I got that, and want to thank you for your help over the last few days. :)

 

Now I'd describe this differently...What do you think about this issue now being reproducible on a HBA controller? No RAID controllers involved. Worth your time to dive in and investigate?

 

If so I'm happy to help provide more logs and run tests for you. I have no data on these drives, and this server is not in operation yet.

 

 

 

Edited by Lev

Another test.

 

I removed the Areca and disabled the MegaRAID 3108 on the motherboard jumpers.

 

I installed a LSI 2008 HBA card and connected to a backplane.

 

The LSI 3008 HBA is still connected to its backplane.

 

UD cannot detect the Seagate ST12000NM002G drives on either controller. UnRAID can see them.

 

Definitely something about these hard drives metadata is different than UD is expecting.

 

Edited by Lev

  • Author
12 hours ago, Braulio said:

This way didn't work. To solve I turned off the array and turned it on again.  I'll look at it a few more days.  Thank you for your help

When you stop the array, Unraid will detect unassigned disks as soon as a change is made in the array assignments.  When the array is started, UD will detect a hot plug event and ask Unraid to update the unassigned disks.  If Unraid doesn't handle the hot plug event properly, then the device will show sdX instead of Dev X.  Unraid controls the assignment of the Dev X designation which will always be the same for each disk.

 

There is something going on with the hot plug detection.  Is this a USB disk?

56 minutes ago, dlandon said:

When you stop the array, Unraid will detect unassigned disks as soon as a change is made in the array assignments.  When the array is started, UD will detect a hot plug event and ask Unraid to update the unassigned disks.  If Unraid doesn't handle the hot plug event properly, then the device will show sdX instead of Dev X.  Unraid controls the assignment of the Dev X designation which will always be the same for each disk.

 

There is something going on with the hot plug detection.  Is this a USB disk?

Yes, it's a USB disk.

  • Author
2 minutes ago, Braulio said:

Yes, it's a USB disk.

Next time that happens, unmount the disk, unplug it, and then plug it back in to see if it changes to 'Dev X".

10 minutes ago, dlandon said:

Next time that happens, unmount the disk, unplug it, and then plug it back in to see if it changes to 'Dev X".

I'll try

Tks :)

@dlandon all has been resolved. I formatted and recreated the UnRAID USB drive, installed only UD plug-in. All SAS drives are detected as expected.

 

No clue what could of be conflicting in the previous install. I'll slowly add back the other plug-ins and check.

 

Thanks again for all your help.

 

 

 

 

  • Author
13 hours ago, Lev said:

@dlandon all has been resolved. I formatted and recreated the UnRAID USB drive, installed only UD plug-in. All SAS drives are detected as expected.

 

No clue what could of be conflicting in the previous install. I'll slowly add back the other plug-ins and check.

 

Thanks again for all your help.

The iscsi command output in your diagnostics shows many duplicate disk id's.  Not sure why some disks were missed by UD.  Because you re-formatted the disks, I suspect that the previous controllers formatted them in a way specific to the controller that confused Linux and hence UD.

 

Did you use UD to reformat the disks?

Guest Access for SMB Shares

 

I'm trying to access a smb shared with guest access, but it seems like this is not possible? If i try to leave empty the username and password field it still tries to use the credential file. This is the log:

 

Nov 22 13:43:58 HomeServer unassigned.devices: Mounting Remote SMB/NFS Share '//192.168.8.122/Public'...
Nov 22 13:43:58 HomeServer unassigned.devices: Mount SMB share '//192.168.8.122/Public' using SMB default protocol.
Nov 22 13:43:58 HomeServer unassigned.devices: Mount SMB command: /sbin/mount -t 'cifs' -o rw,noserverino,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=99,gid=100,credentials='/tmp/unassigned.devices/credentials_Public' '//192.168.8.122/Public' '/mnt/remotes/192.168.8.122_Public'
Nov 22 13:43:58 HomeServer kernel: CIFS: Attempting to mount //192.168.8.122/Public
Nov 22 13:43:58 HomeServer kernel: CIFS: VFS: \\192.168.8.122 failed to connect to IPC (rc=-13)
Nov 22 13:43:58 HomeServer kernel: CIFS: VFS: cifs_mount failed w/return code = -13



with cifs normally i use the _guest_ parameter, for example:

guest,rw,noserverino,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=99,gid=100

It's possible to add this feature? Or am i missing something?

  • Author
1 minute ago, Simone Luconi said:

It's possible to add this feature? Or am i missing something?

The way it works is you set the permissions in the UD Settings:

772312522_SMBSettings.png.9e933d7b5fbb1ffe4191daae4fd46a10.png

for the access you want to grant to users.  Set guest to r/w, r/o, or no access.  This will then apply to all UD devices.

 

You still have to set the credentials when setting up the remote share so it will mount.  Then UD puts the appropriate entries in the SMB share config file for the access you have designated.

 

The SMB config file looks like this:

[XXXXXXXX_Work]
        path = /mnt/remotes/XXXXXXXX_Work
        browseable = yes
        valid users = admin, home, guest
        write list = admin, guest
        read list = home
        case sensitive = auto
        preserve case = yes
        short preserve case = yes

You'll see that the valid users are specified and the read and write users specified.  I set guest to r/w before I captured this file.

  • Author

New release of UD.  There is a change that might cause some issues with external drive bays.  I've added code to remove duplicate disk serial numbers because UD cannot handle duplicate serial number disks cleanly.  UD thinks all the disks with the same serial number are the same disk (even though the device numbers are different) and things like mounting a disk would mount all of them.  Mounting multiple disks at the same mount point can cause corruption.  This is not a bug, it is the way UD was designed.  UD has to have a unique serial number for each disk it manages.  The reason for this is to support hot plug events, and changes in device designations on reboot and hot plug.

 

If you have an external drive bay and now the disks aren't all showing up, you probably have duplicate serial numbers being presented by your external drive bay.

27 minutes ago, dlandon said:

The way it works is you set the permissions in the UD Settings:

772312522_SMBSettings.png.9e933d7b5fbb1ffe4191daae4fd46a10.png

for the access you want to grant to users.  Set guest to r/w, r/o, or no access.  This will then apply to all UD devices.

 

You still have to set the credentials when setting up the remote share so it will mount.  Then UD puts the appropriate entries in the SMB share config file for the access you have designated.

 

The SMB config file looks like this:

[XXXXXXXX_Work]
        path = /mnt/remotes/XXXXXXXX_Work
        browseable = yes
        valid users = admin, home, guest
        write list = admin, guest
        read list = home
        case sensitive = auto
        preserve case = yes
        short preserve case = yes

You'll see that the valid users are specified and the read and write users specified.  I set guest to r/w before I captured this file.

 

The problem that i have is that i cannot add the remote samba share to unraid because i cannot specify guest access during the setup of the share, so the login fail (see the log i posted). The solution you posted is if i couldn't access the network share on unraid with guest access, but that is not my problem. 

  • Author
Just now, Simone Luconi said:

 

The problem that i have is that i cannot add the remote samba share to unraid because i cannot specify guest access during the setup of the share, so the login fail (see the log i posted). The solution you posted is if i couldn't access the network share on unraid with guest access, but that is not my problem. 

The Unraid mount requires credentials for the remote share in order to mount it.  The share access is then controlled with the UD SMB Settings.  UD does not mount devices with guest access on the cifs mount.  The reason this is done is to use Unraids user system to control access.

14 minutes ago, dlandon said:

The Unraid mount requires credentials for the remote share in order to mount it.  The share access is then controlled with the UD SMB Settings.  UD does not mount devices with guest access on the cifs mount.  The reason this is done is to use Unraids user system to control access.

So i cannot mount the remote share through UD if it only accept guest access and no credential?

 

I think the problem is this line here: https://github.com/dlandon/unassigned.devices/blob/master/source/include/lib.php#L992, it should be added the "guest" parameter and remove che credential parameter if the user specify guest access.

  • Author
3 minutes ago, Simone Luconi said:

So i cannot mount the remote share through UD if it only accept guest access and no credential?

Correct, you have to specify the credentials to mount the remote share.

 

4 minutes ago, Simone Luconi said:

I think the problem is this line here: https://github.com/dlandon/unassigned.devices/blob/master/source/include/lib.php#L992, it should be added the "guest" parameter and remove che credential parameter if the user specify guest access.

It's not a problem or a bug.  UD was designed this way.  Access is controlled using the Unraid users.  It's not a change I will make.

13 hours ago, dlandon said:

The iscsi command output in your diagnostics shows many duplicate disk id's.  Not sure why some disks were missed by UD.  Because you re-formatted the disks, I suspect that the previous controllers formatted them in a way specific to the controller that confused Linux and hence UD.

 

Did you use UD to reformat the disks?

 

I used UnRAID to format the Seagate 12TB SAS disks. but I found what other plug-in is causing the issue of the SAS drives not being detected. So it had nothing to do with how the drive was formatted.

 

The plug-in that is causing the issue for the SAS drives with UD is 'Dynamix SCSI Devices'. I've run this plug-in along with UD for years and never had a issue with SATA drives. But this is my first time with SAS drives, and clearly it's causing some type of confusion. I remove the Dynamix SCSI device plug-in, reboot, and UD detects the SAS drives just fine. If I install the Dynamix SCSI Devices plug-in, the SAS drives in UD immediately disappear from UD.

 

I've reproduced this on two UnRAID servers now with the SAS drives.

 

Dynamix SCSI Devices and the reasons I first used it years ago, may no longer be needed with today's 6.10.x version of UnRAID. So I'm going to move forward and no longer use that plug-in and see what happens.

 

Edited by Lev

I'm having an issue where external HDD's sometimes refuses to appear under the Main tab on my Unraid server.

 

I have both the Unassigned Devices and Unassigned Devices Plus plugins installed. When I plug in any external HD, sometimes the drive will show up under the Main Tab, and sometimes nothing. I've tried 5 different external HFS+ drives and I experience the same behavior with each. When the drive doesn't appear, replugging either the drive's USB or power cable doesn't do anything. The only working solution I've found is a complete reboot of the Unraid system, which is inconvenient.

 

I'm on a freshly built system running Unraid version 6.9.2. Any ideas on what other things I can try (besides a system reboot) to have external drives show up under Unassigned Devices?

Edited by billhickok

  • Author
4 hours ago, billhickok said:

I'm having an issue where external HDD's sometimes refuses to appear under the Main tab on my Unraid server.

 

I have both the Unassigned Devices and Unassigned Devices Plus plugins installed. When I plug in any external HD, sometimes the drive will show up under the Main Tab, and sometimes nothing. I've tried 5 different external HFS+ drives and I experience the same behavior with each. When the drive doesn't appear, replugging either the drive's USB or power cable doesn't do anything. The only working solution I've found is a complete reboot of the Unraid system, which is inconvenient.

 

I'm on a freshly built system running Unraid version 6.9.2. Any ideas on what other things I can try (besides a system reboot) to have external drives show up under Unassigned Devices?

Post your diagnostics.

I have read several Reddit and forum posts about difficulty getting Remote SMB Shares to mount, but none of the solutions I've found have worked. 😞

 

I have shares from a Windows Server 2016 machine. I can set up the SMB with username, password, domain, etc. It shows on the MAIN tab, but when I click MOUNT, it tries and then just goes back to saying MOUNT again.

 

I've tried connecting to different shares, with several username/password sets, by hostname and IP. Nothing works.

 

Any help is appreciated!

  • Author
3 minutes ago, Mattaton said:

I have read several Reddit and forum posts about difficulty getting Remote SMB Shares to mount, but none of the solutions I've found have worked. 😞

 

I have shares from a Windows Server 2016 machine. I can set up the SMB with username, password, domain, etc. It shows on the MAIN tab, but when I click MOUNT, it tries and then just goes back to saying MOUNT again.

 

I've tried connecting to different shares, with several username/password sets, by hostname and IP. Nothing works.

 

Any help is appreciated!

Post your diagnostics zip file.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.