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


Recommended Posts

23 minutes ago, dlandon said:

Your script has a problem at line #123.

I've exhausted my skill set on this (lol...ran out of random copying and pasting from other scripts etc) 

 

I can make it work via original script and then applying and removing it as required..... this will work for me.

 

Thanks for your help and your time.

Link to comment
2 minutes ago, wacko37 said:

I've exhausted my skill set on this (lol...ran out of random copying and pasting from other scripts etc) 

 

I can make it work via original script and then applying and removing it as required..... this will work for me.

 

Thanks for your help and your time.

Remove the fi at line #123.

Link to comment

Yes tried that, and that lead to another issue and that lead to another..... a downward spiral. It would seem the script is suited more to an umounted drive rather than mounted.

 

Its ok, the script is doing what i need, although my OCD would rather it work the way that you are intending (lightning icon), I must let it go and move on as I have no idea how it needs to be scripted.

 

Link to comment
2 minutes ago, wacko37 said:

Yes tried that, and that lead to another issue and that lead to another..... a downward spiral. It would seem the script is suited more to an umounted drive rather than mounted.

 

Its ok, the script is doing what i need, although my OCD would rather it work the way that you are intending (lightning icon), I must let it go and move on as I have no idea how it needs to be scripted.

 

Take the issue back to the script author and have them work it out.  It needs to be fixed.

Link to comment

What would be the reason for 

 

emhttpd: device /dev/sdh problem getting id

 

Spoiler
Oct  7 13:38:13 Unraid kernel: usb 2-7: new SuperSpeed USB device number 12 using xhci_hcd
Oct  7 13:38:13 Unraid kernel: usb-storage 2-7:1.0: USB Mass Storage device detected
Oct  7 13:38:13 Unraid kernel: scsi host7: usb-storage 2-7:1.0
Oct  7 13:38:13 Unraid usb_manager: Info: rc.usb_manager usb_add Western_Digital_Elements_SE_25FF_57584131444137305043384C /dev/bus/usb/002/012 002 012
Oct  7 13:38:13 Unraid usb_manager: Info: rc.usb_manager Autoconnect No Mapping found Western_Digital_Elements_SE_25FF_57584131444137305043384C /dev/bus/usb/002/012 002 012 port 2-7
Oct  7 13:38:14 Unraid kernel: scsi 7:0:0:0: Direct-Access     WD       Elements SE 25FF 1013 PQ: 0 ANSI: 6
Oct  7 13:38:14 Unraid kernel: sd 7:0:0:0: Attached scsi generic sg7 type 0
Oct  7 13:38:14 Unraid kernel: sd 7:0:0:0: [sdh] Spinning up disk...
Oct  7 13:38:14 Unraid kernel: scsi 7:0:0:1: Enclosure         WD       SES Device       1013 PQ: 0 ANSI: 6
Oct  7 13:38:14 Unraid kernel: scsi 7:0:0:1: Attached scsi generic sg8 type 13
Oct  7 13:38:21 Unraid kernel: .......ready
Oct  7 13:38:21 Unraid kernel: sd 7:0:0:0: [sdh] Very big device. Trying to use READ CAPACITY(16).
Oct  7 13:38:21 Unraid kernel: sd 7:0:0:0: [sdh] 7813969920 512-byte logical blocks: (4.00 TB/3.64 TiB)
Oct  7 13:38:21 Unraid kernel: sd 7:0:0:0: [sdh] 4096-byte physical blocks
Oct  7 13:38:21 Unraid kernel: sd 7:0:0:0: [sdh] Write Protect is off
Oct  7 13:38:21 Unraid kernel: sd 7:0:0:0: [sdh] Mode Sense: 47 00 10 08
Oct  7 13:38:21 Unraid kernel: sd 7:0:0:0: [sdh] No Caching mode page found
Oct  7 13:38:21 Unraid kernel: sd 7:0:0:0: [sdh] Assuming drive cache: write through
Oct  7 13:38:21 Unraid kernel: sdh: sdh1
Oct  7 13:38:21 Unraid kernel: sd 7:0:0:0: [sdh] Attached SCSI disk
Oct  7 13:38:24 Unraid  emhttpd: device /dev/sdh problem getting id
Oct  7 13:40:41 Unraid kernel: usb 2-7: USB disconnect, device number 12
Oct  7 13:40:42 Unraid usb_manager: Info: rc.usb_manager usb_remove  Western_Digital_Elements_SE_25FF_57584131444137305043384C /dev/bus/usb/002/012 002 012 

 

 

I've had it previously when connecting 2 SD card readers that happened to identify using the same string (first would work, would get that error when connecting the 2nd), but this is my drive that I connect every couple of days for automated backups. I have a SATA drive as UD that's currently preclearing but its string looks nothing like it. The string is being read by usb_manager just fine, but seems UD can't grab it. I've tried reloading UD config. 

Edited by Kilrah
Link to comment
4 minutes ago, Kilrah said:

emhttpd: device /dev/sdh problem getting id

This is an Unraid message.  What shows in the UD web page?

 

5 minutes ago, Kilrah said:

I've had it previously when connecting 2 SD card readers that happened to identify using the same string, but this is my drive that I connect every couple of days for automated backups. The string is being read by usb_manager just fine, but seems UD can't grab it. I've tried reloading UD config. 

Post diagnostics file.

Link to comment

Hmm /dev/disk/by-id shows the ID for the partition but not the disk for some reason...

 

lrwxrwxrwx 1 root root  9 Sep 23 20:30 usb-Kingston_DT_microDuo_40167EA7CE65104099A7149B-0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 Sep 23 23:48 usb-Kingston_DT_microDuo_40167EA7CE65104099A7149B-0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct  7 14:27 usb-WD_Elements_SE_25FF_57584131444137305043384C-0:0-part1 -> ../../sdh1
lrwxrwxrwx 1 root root  9 Sep 23 20:30 wwn-0x5000c500c29572e3 -> ../../sdg

 

EDIT: Same for another, blank HDD and a card reader. A flash drive comes up fine though.

 

Going to assume it's udev doing something weird...

Edited by Kilrah
Link to comment
1 hour ago, Kilrah said:

emhttpd: device /dev/sdh problem getting id

This usually happens if a device has a duplicate identifier, since I'm not seeing another device with the same name it could be from a previous incomplete removal, how did you detach the device? I'm seeing this and it's not normal:

 

Sep 25 12:51:19 Unraid usb_manager: Info: rc.usb_manager usb_remove  Western_Digital_Elements_SE_25FF_57584131444137305043384C /dev/bus/usb/002/003 002 003
Sep 25 12:51:19 Unraid usb_manager: Info: rc.usb_manager Device Match 002/003 vm:   002 003
Sep 25 12:51:19 Unraid usb_manager: Info: rc.usb_manager Removed 002/003 vm:  nostate 002 003

 

If the removal was the problem rebooting would fix it.

Link to comment

I plug the device in, UD automounts, runs device script, then unmounts and I disconnect. Seems last time was on Oct 4th.

 

Spoiler
Oct  4 23:38:34 Unraid kernel: usb-storage 2-2:1.0: USB Mass Storage device detected
Oct  4 23:38:34 Unraid kernel: scsi host8: usb-storage 2-2:1.0
Oct  4 23:38:34 Unraid usb_manager: Info: rc.usb_manager usb_add Western_Digital_Elements_SE_25FF_57584131444137305043384C /dev/bus/usb/002/008 002 008
Oct  4 23:38:34 Unraid usb_manager: Info: rc.usb_manager Autoconnect No Mapping found Western_Digital_Elements_SE_25FF_57584131444137305043384C /dev/bus/usb/002/008 002 008 port 2-2
Oct  4 23:38:35 Unraid kernel: scsi 8:0:0:0: Direct-Access     WD       Elements SE 25FF 1013 PQ: 0 ANSI: 6
Oct  4 23:38:35 Unraid kernel: sd 8:0:0:0: Attached scsi generic sg7 type 0
Oct  4 23:38:35 Unraid kernel: scsi 8:0:0:1: Enclosure         WD       SES Device       1013 PQ: 0 ANSI: 6
Oct  4 23:38:35 Unraid kernel: scsi 8:0:0:1: Attached scsi generic sg8 type 13
Oct  4 23:38:35 Unraid kernel: sd 8:0:0:0: [sdi] Spinning up disk...
Oct  4 23:38:42 Unraid kernel: .......ready
Oct  4 23:38:42 Unraid kernel: sd 8:0:0:0: [sdi] Very big device. Trying to use READ CAPACITY(16).
Oct  4 23:38:42 Unraid kernel: sd 8:0:0:0: [sdi] 7813969920 512-byte logical blocks: (4.00 TB/3.64 TiB)
Oct  4 23:38:42 Unraid kernel: sd 8:0:0:0: [sdi] 4096-byte physical blocks
Oct  4 23:38:42 Unraid kernel: sd 8:0:0:0: [sdi] Write Protect is off
Oct  4 23:38:42 Unraid kernel: sd 8:0:0:0: [sdi] Mode Sense: 47 00 10 08
Oct  4 23:38:42 Unraid kernel: sd 8:0:0:0: [sdi] No Caching mode page found
Oct  4 23:38:42 Unraid kernel: sd 8:0:0:0: [sdi] Assuming drive cache: write through
Oct  4 23:38:42 Unraid kernel: sdi: sdi1
Oct  4 23:38:42 Unraid kernel: sd 8:0:0:0: [sdi] Attached SCSI disk
Oct  4 23:38:44 Unraid unassigned.devices: Adding partition 'UNRAID_BACKUP'...
Oct  4 23:38:44 Unraid unassigned.devices: Mounting partition 'UNRAID_BACKUP' at mountpoint '/mnt/disks/UNRAID_BACKUP'...
Oct  4 23:38:44 Unraid unassigned.devices: Using Unraid api to open the 'crypto_LUKS' device.
Oct  4 23:38:44 Unraid  emhttpd: shcmd (2872991): /usr/sbin/cryptsetup luksOpen /dev/sdi1 UNRAID_BACKUP
Oct  4 23:38:46 Unraid unassigned.devices: Mount drive command: /sbin/mount -o rw,noatime,nodiratime '/dev/mapper/UNRAID_BACKUP' '/mnt/disks/UNRAID_BACKUP'
Oct  4 23:38:46 Unraid kernel: XFS (dm-6): Mounting V5 Filesystem
Oct  4 23:38:48 Unraid kernel: XFS (dm-6): Ending clean mount
Oct  4 23:38:48 Unraid kernel: xfs filesystem being mounted at /mnt/disks/UNRAID_BACKUP supports timestamps until 2038 (0x7fffffff)
Oct  4 23:38:48 Unraid unassigned.devices: Successfully mounted 'UNRAID_BACKUP' on '/mnt/disks/UNRAID_BACKUP'.
Oct  4 23:38:48 Unraid unassigned.devices: Running device script: 'UNRAID_BACKUP.sh' with action 'ADD'.
Oct  4 23:38:48 Unraid  emhttpd: read SMART /dev/sdi
Oct  4 23:38:51 Unraid UNRAID_BACKUP: Started
Oct  4 23:56:17 Unraid UNRAID_BACKUP: Syncing
Oct  4 23:56:18 Unraid UNRAID_BACKUP: Unmounting Unraid Backup
Oct  4 23:56:19 Unraid unassigned.devices: Running device script: 'UNRAID_BACKUP.sh' with action 'UNMOUNT'.
Oct  4 23:56:19 Unraid unassigned.devices: Unmounting partition 'UNRAID_BACKUP' at mountpoint '/mnt/disks/UNRAID_BACKUP'...
Oct  4 23:56:19 Unraid unassigned.devices: Synching file system on '/mnt/disks/UNRAID_BACKUP'.
Oct  4 23:56:19 Unraid unassigned.devices: Unmount cmd: /sbin/umount '/dev/mapper/UNRAID_BACKUP' 2>&1
Oct  4 23:56:19 Unraid kernel: XFS (dm-6): Unmounting Filesystem
Oct  4 23:56:19 Unraid unassigned.devices: Successfully unmounted 'UNRAID_BACKUP'
Oct  4 23:56:19 Unraid unassigned.devices: Running device script: 'UNRAID_BACKUP.sh' with action 'REMOVE'.
Oct  4 23:56:21 Unraid UNRAID_BACKUP: Backup drive can be removed
Oct  4 23:56:29 Unraid kernel: usb 2-2: USB disconnect, device number 8
Oct  4 23:56:30 Unraid usb_manager: Info: rc.usb_manager usb_remove  Western_Digital_Elements_SE_25FF_57584131444137305043384C /dev/bus/usb/002/008 002 008 
Oct  4 23:56:30 Unraid usb_manager: Info: rc.usb_manager Device Match 002/008 vm:   002 008 
Oct  4 23:56:30 Unraid usb_manager: Info: rc.usb_manager Removed 002/008 vm:  nostate 002 008

 

 

Link to comment

I'm pulling my hair out trying to connect to an SMB share on a Debian machine.  I CAN connect to the share through windows, R/W to it etc.  When I try to add the share using Unassigned Devices, it shows always shows "Offline".  When I add the share:

 

I add the IP of the machine

username

password

no domain

When I list shares, it shows the shares, and I can select the share I want.

I click done

 

It always says it's offline and I can't mount it.  I tried tweaking my smb.conf file in so many different ways with no luck.  What am I missing?  Please help.

 

EDIT:  Solved my problem, my server was not pingable.  Once I made it so.  it IMMEDIATLY worked.  Ughh.

 

Edited by MP715
Link to comment

Hi all, I had a ubuntu media server with 1 10TB drive set up with an lvm.  I set up a new unraid server and I want to transfer the files from the 10TB drive to unraid.  I have UD and UD+ and have added my drive to the system.  It shows up in unassigned drives, but with only a format option.  After a lot of reading forum posts I figured I needed to mount the drive via command line.  This is where I am struggling.

 

Every time I run the mount command I get:
 

root@acidbox:~# sudo mount /dev/media/lvl /mnt/remotes/lvm_drive
mount: /mnt/remotes/lvm_drive: special device /dev/media/lvl does not exist.
       dmesg(1) may have more information after failed mount system call.

this is the output of lvdisplay
 

root@acidbox:~# lvdisplay
  --- Logical volume ---
  LV Path                /dev/media/lv1
  LV Name                lv1
  VG Name                media
  LV UUID                0BMwQp-hPdr-0I1M-Lh3l-SaOi-hcp5-Mf9XbA
  LV Write Access        read/write
  LV Creation host, time acidbox, 2022-01-15 22:59:04 -0500
  LV Status              available
  # open                 0
  LV Size                9.00 TiB
  Current LE             2359296
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0

this is the output of syslog
 

Oct  9 09:59:37 acidbox kernel: /dev/media/lvl: Can't open blockdev
Oct  9 09:59:57 acidbox  sudo:     root : TTY=pts/0 ; PWD=/root ; USER=root ; COMMAND=/sbin/mount media /mnt/remotes/lvm_drive
Oct  9 09:59:57 acidbox  sudo: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Oct  9 09:59:57 acidbox  sudo: pam_unix(sudo:session): session closed for user root
Oct  9 09:59:57 acidbox kernel: media: Can't open blockdev

Please let me know what I am doing wrong and what I can do to transfer my data
 

edit: after finding this askubuntu post from 6 years ago.. i mounted the lv with /dev/dm-0 instead of /dev/media/lvl and it worked!  Currently transferring 3TB of files! yay!

Edited by acid_0verride
Link to comment
On 10/7/2022 at 2:44 PM, dlandon said:

Remove the UD plugin and stop the array.  See if Unraid will recognize the disk and show it in the Unassigned Devices tab.

 

Still got the "error getting ID" with array stopped and UD uninstalled. Reboot (also upgraded to 6.11.1 at the same time) fixed it.

Link to comment
6 hours ago, acid_0verride said:

It shows up in unassigned drives, but with only a format option.

That's because Linux/Unraid doesn't understand the formatting of the disk.  How was it originally formatted?

 

6 hours ago, acid_0verride said:

After a lot of reading forum posts I figured I needed to mount the drive via command line.

If UD doesn't understand the format, you can't mount it manually.

 

Post your diagnostics.

Link to comment
  • 2 weeks later...

@dlandon

Hi,

i thought I could use my own custom script and pasted the path of the script into the field:

image.thumb.png.637f371fc9404aac52e30afea743ff2b.png

 

But after hitting the button "save" two things happen:

1.) The path field becomes blank

2.) The script content is deleted (!)

 

EDIT:

Ok, now I understood the concept. but it seems to be overcomplicated to me?! You have to choose the default script and leave it for example blank and then you are able to select a user script from the user scripts plugin.

 

3.) Is there a specific reason why it is need to execute two scripts?!

4.) Why doesn't it generate the logs inside the users scripts plugin? This would be extremely nice.

image.thumb.png.43866802a30071ab4fda821f48b934c7.png

Edited by geromme
Link to comment
25 minutes ago, geromme said:

i thought I could use my own custom script and pasted the path of the script into the field:

Any script you want to use has to be in the /flash/config/plugins/unassigned.devices/ folder.  Put your script there and then select the script from the drop down.  This is done for security.  You can't run a script from just anywhere.

 

28 minutes ago, geromme said:

Ok, now I understood the concept. but it seems to be overcomplicated to me?! You have to choose the default script and leave it for example blank and then you are able to select a user script from the user scripts plugin.

Click on the 'Help' to show the help text for the "User Script:" field.

 

30 minutes ago, geromme said:

3.) Is there a specific reason why it is need to execute two scripts?!

The "User Script:" is not an executed device script.  Again, look at the Help text.

 

31 minutes ago, geromme said:

4.) Why doesn't it generate the logs inside the users scripts plugin? This would be extremely nice.

What logs?

Link to comment

I have old time capsule and need to backup data from it to my Unraid.

Install UD+ plugin

Try to connect from   Main > SMB shares > add remote smb/nfs share > SMB > .

System find my time capsule but can't find shares (only blanc field). I add share's name and after press Done

I see unassigned device but can't mount - after pressing system try to mount but no result. 

 

I read this topic and understand that i need to add something about smb1 version of smb protocol. 

Link to comment
7 hours ago, R_t said:

I have old time capsule and need to backup data from it to my Unraid.

Install UD+ plugin

Try to connect from   Main > SMB shares > add remote smb/nfs share > SMB > .

System find my time capsule but can't find shares (only blanc field). I add share's name and after press Done

I see unassigned device but can't mount - after pressing system try to mount but no result. 

 

I read this topic and understand that i need to add something about smb1 version of smb protocol. 

Post diagnostics.

Link to comment

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.