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


Recommended Posts

9 hours ago, dlandon said:

This is the issue with your php error:

Dec  3 17:21:03 Serverbrain3 unassigned.devices: Disk with serial 'KINGSTON_SA2000M8500G_50026B728269650F', mountpoint 'KINGSTON_SA2000M8500G_50026B728269650F-part1' is not set to auto mount.
Dec  3 17:21:03 Serverbrain3 emhttpd: Warning: syntax error, unexpected end of file, expecting TC_DOLLAR_CURLY or TC_QUOTED_STRING or '"' in Unknown on line 31
Dec  3 17:21:03 Serverbrain3 emhttpd:  in /usr/local/emhttp/plugins/unassigned.devices/include/lib.php on line 1942
Dec  3 17:21:03 Serverbrain3 unassigned.devices: Disk '/dev/nvme0n1' does not have a serial number and cannot be mounted.

The nvme disk has two partitions.  Partition 1 is a vfat file system.  There is no partition 2.  Partition 3 has no file system.  UD is apparently having an issue with no partition 2.

 

I have added some debug.  Copy the attached file to /usr/local/emhttp/plugins/unassigned.devices/scripts/rc.unassigned.  Then unmount and remount the nvme disk.  Post the log.

rc.unassigned.zip 3.54 kB · 2 downloads

Just some more info regarding the disk u see in my diagnostics. The KINGSTON_SA2000M8500G..." disk I pass through to a WIN10 VM as its primary disk. I also pass through the SD-card reader to that VM. As the VM is running these two items are not available to unraid. But when the VM is not running these items are available to unraid. This is very convenient as I do not need e.g. two SD-card readers; one for the WIN10 VM and one for unraid. They can chare the same reader just not at the samt time though. the Same goes for the disk. Attached is a screendump from the WIN10 VM disk management view. The partition 2 is a EFI (Extensible Firmware Interface) system partition and the partition 1 is the main operation system partition for the win10 machine. The partition 3 is just empty as u describe. Dono if this helps at all.image.png.d0d7db75ca32fecccfd6bf8d34180950.png

Link to comment
20 minutes ago, dlandon said:

Way too many changes for that to be practical.

 

I've been working on some changes that I'd like you to try.  I cannot reproduce your issue.  I've been trying to create a disk layout that would cause the problem, but I can't make it happen.

 

Copy the attached file to /usr/local/emhttp/plugins/unassigned.devices/scripts/rc.unassigned and see if the error still shows up.  Give me some diagnostics after that.

rc.unassigned.zip 3.67 kB · 1 download

Attached are new diagnostics. Unfortunately I still get the warning. 😞 

serverbrain3-diagnostics-20211206-0017.zip

Edited by mr2web
Link to comment
27 minutes ago, dlandon said:

Can you give me a link to that tutorial?

@dlandon Sure. Have a look around 6min into the clip. U'll see the behaviour I have talked about starting at 8 minutes into the clip. This has been working really nice for me for several years. I use this VM to edit 4k video. There of I need maximum performance out of my setup. (I hope I haven't cursed in the church by mentioning this tutorial, but I'm very pleased with Spaceinvador One's tutorials. He have helped me a lot over the years. 😄 )

 

Link to comment
30 minutes ago, dlandon said:

I'm not sure you copied the file.  You have to unzip the file before copying.

@dlandon I'm sure I did as I downloaded it into a blank folder and unziped it there before removing the old file then copied the newly unzipped file to the specified location. I did not reboot though as I though the plugin refreshed itself loading the main page. was that a wrong assumption? I did reload the main page as well navigated away from it then back to it again. All before taking the diagnostics.

 

I need to hit the sack as I need to get up and go to work in the morning (in 5 hours)... talk to u tomorrow... 

rc.unassigned_1.JPG

Edited by mr2web
Link to comment
Just now, mikedpitt420 said:

My option to enable destructive mode is grayed out and set to disable. It will not let me change it to enabled. It says to make sure unassigned devices is installed, which it is. Any idea why I can't change it?

Are you sure it doesn’t say to make sure unassigned devices plus is installed? You need that plugin also for destructive mode.

Link to comment

Gentlemen, I thought when restarting Unraid, device letters on unassigned devices wouldn't change. But I took a test and they changed. It was "sde and "sdg" and now it's "sdd" and "sdf".

 

I have a script in "CA users Scripts" who assembles these devices to backup. It's programmed to run automatically. In this case, it doesn't work. Does anyone have a solution?

 

This is my script in "CA users Scripts"

 

Fixed_Device=(
    "sde"
    "sdg"
)

 

i=0
while [ $i -lt ${#Fixed_Device[@]} ]
do
      /usr/local/emhttp/plugins/unassigned.devices/scripts/rc.unassigned mount "/dev/${Fixed_Device[$i]}1"
      let i++
done

Edited by Braulio
Link to comment
1 minute ago, Braulio said:

Gentlemen, I thought when restarting Unraid, device letters on unassigned devices wouldn't change. But I took a test and they changed. It was "sde and "sdg" and now it's "sdd" and "sdf".

 

I have a script in "CA users Scripts" who assembles these devices to backup. In this case, it doesn't work. Does anyone have a solution?

 

This is my script in "CA users Scripts"

 

Fixed_Device=(
    "sde"
    "sdg"
)

 

i=0
while [ $i -lt ${#Fixed_Device[@]} ]
do
      /usr/local/emhttp/plugins/unassigned.devices/scripts/rc.unassigned mount "/dev/${Fixed_Device[$i]}1"
      let i++
done

Use the 'devX' designation.  It does not change when rebooting.  i.e. a device showing in UD as 'Dev 1' would be 'dev1' in your script.  As you found out the sdX designations can change on reboot.

Link to comment
7 hours ago, dlandon said:

Use the 'devX' designation.  It does not change when rebooting.  i.e. a device showing in UD as 'Dev 1' would be 'dev1' in your script.  As you found out the sdX designations can change on reboot.

But I don't know how to use this!
Is it right?


/usr/local/emhttp/plugins/unassigned.devices/scripts/rc.unassigned mount "/dev/dev1"

Link to comment
1 hour ago, dlandon said:

Yes.  Go to the UD page and click on help.  Scroll down and you'll see the rc.unassigned commands.

The UD page is this?


I found this on another website.

 

/usr/local/sbin/rc.unassigned mount autodevices

all devices set to auto mount will be mounted.

/usr/local/sbin/rc.unassigned mount autoshares

all SMB/NFS mounts set to auto mount will be mounted.

/usr/local/sbin/rc.unassigned umount auto

all devices and SMB/NFS mounts set to auto mount will be unmounted.

/usr/local/sbin/rc.unassigned umount all

all devices and SMB/NFS mounts are unmounted in preparation for shutting down the array.

/usr/local/sbin/rc.unassigned mount /dev/sdX or devX

mount device sdX where 'X' is the device designator.  The devX is the device name in the UD page.  If the device name is 'Dev 1', then use dev1 as the device to mount.

/usr/local/sbin/rc.unassigned umount /dev/sdX or devX

unmount device sdX

/usr/local/sbin/rc.unassigned spindown devX

spin down a disk. SSDs will not spin down.

/usr/local/sbin/rc.unassigned mount SOURCE

where SOURCE is the SMB/NFS source.

/usr/local/sbin/rc.unassigned umount SOURCE

where SOURCE is the SMB/NFS source.

 


So I tried like that but didn't work


/usr/local/emhttp/plugins/unassigned.devices/scripts/rc.unassigned mount /dev/dev1
or
/usr/local/sbin/rc.unassigned mount /dev/dev1

Link to comment
27 minutes ago, Braulio said:

/usr/local/emhttp/plugins/unassigned.devices/scripts/rc.unassigned mount /dev/dev1

No.  Just 'dev1'.  The Unraid page is where you work with UD devices.  Click on the help icon (question mark in the circle) in the upper right of the page.  Do you know how to enable the help in Unraid?883178265_UDHelp.thumb.png.aba472dbeab1679a52c8ae467d815f69.png

Link to comment
10 minutes ago, dlandon said:

No.  Just 'dev1'.  The Unraid page is where you work with UD devices.  Click on the help icon (question mark in the circle) in the upper right of the page.  Do you know how to enable the help in Unraid?883178265_UDHelp.thumb.png.aba472dbeab1679a52c8ae467d815f69.png

You have to set page view to "Tabbed" in display settings for this view.

Link to comment
17 minutes ago, dlandon said:

Remove the preclear plugin and see if it goes away.

@dlandon I'm pre-clearing two disks at the moment. I like to let that process finish before going a head with removing the pre-clear plugin. Sry 4 that. Will let u know a.s.a.p. when I have tried your suggested action, but it will be in one or two days. 

Link to comment
1 hour ago, mr2web said:

@dlandon I'm pre-clearing two disks at the moment. I like to let that process finish before going a head with removing the pre-clear plugin. Sry 4 that. Will let u know a.s.a.p. when I have tried your suggested action, but it will be in one or two days. 

Give me the output of this command:

cat /var/state/unassigned.devices/unassigned.devices.ini

 

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.