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


Recommended Posts

4 minutes ago, comet424 said:

ok so i did a new clean reboot..  ssd out

 

when booted up..  i placed the ssd in

it mounted  but it never unmounted  yet script log said it did

 

 

so i ran that list  you mentioned it shows the drive still mounted.. and here is the diaganostic... does it show its not mounted yet its mounted?

```root@mitchsserver:~# ls -la /mnt/disks/
total 4
drwxrwxrwt  3 nobody users   60 Feb 18 11:14 ./
drwxr-xr-x 12 root   root   240 Feb 18 11:15 ../
drwxrwxrwx  1 root   root  4096 Feb 17 19:32 transport\ data/
root@mitchsserver:~# ^C
root@mitchsserver:~#   /usr/local/emhttp/webGui/scripts/notify -e "Unraid Server Notice" -s "Unassigned Devices" -d "Device unmounted" -i "normal"
root@mitchsserver:~# ```

 

mitchsserver-diagnostics-20240218-1117.zip 132.57 kB · 0 downloads

'df' shows it's mounted:

Filesystem      Size  Used Avail Use% Mounted on
rootfs          2.9G  299M  2.6G  11% /
tmpfs            32M  4.0M   29M  13% /run
/dev/sda1        15G  993M   14G   7% /boot
overlay         2.9G  299M  2.6G  11% /lib
overlay         2.9G  299M  2.6G  11% /usr
devtmpfs        8.0M     0  8.0M   0% /dev
tmpfs           2.9G     0  2.9G   0% /dev/shm
tmpfs           128M  304K  128M   1% /var/log
tmpfs           1.0M     0  1.0M   0% /mnt/disks
tmpfs           1.0M     0  1.0M   0% /mnt/remotes
tmpfs           1.0M     0  1.0M   0% /mnt/addons
tmpfs           1.0M     0  1.0M   0% /mnt/rootshare
/dev/md1p1       11T  4.0T  7.0T  37% /mnt/disk1
/dev/sdb1       3.7T  992G  2.7T  27% /mnt/download_drive
/dev/nvme0n1p1  477G   21G  456G   5% /mnt/unraid_files
shfs             11T  4.0T  7.0T  37% /mnt/user0
shfs             11T  4.0T  7.0T  37% /mnt/user
/dev/loop2       20G  5.6G   14G  29% /var/lib/docker
/dev/sdd1       932G   94M  932G   1% /mnt/disks/transport data

 

The log shows it was mounted, but no unmount was ever initiated:

Feb 18 11:14:01 mitchsserver unassigned.devices: Successfully mounted '/dev/sdd1' on '/mnt/disks/transport data'.
Feb 18 11:14:01 mitchsserver unassigned.devices: Device '/dev/sdd1' is not set to be shared.
Feb 18 11:14:01 mitchsserver unassigned.devices: Running device script: 'transport_data.sh' with action 'ADD'.
Feb 18 11:14:21 mitchsserver emhttpd: WDC_WDS100T2B0A-00SM50_200802A003DE (sdd) 512 1953525168
Feb 18 11:14:21 mitchsserver emhttpd: read SMART /dev/sdd

These are the last lines in the log.

Link to comment

so for some reason it wont run the script right... is there a debugger  since its skipping the unmount

this is what i have for the unmount 

/usr/local/sbin/rc.unassigned umount $UD_DEVICE

and it will unmount if i run the script   not if i click the Mount Button  or  boot up with the drive in there or put the drive in to the computer...  only time it will work with this hard drive  is if i run the lightning bolt.... 

 

i guess i coul downgrade  back to .6 unraid to verfiy  it should be working back then.. then i can make sure that it least works back then

Link to comment
31 minutes ago, comet424 said:

so for some reason it wont run the script right... is there a debugger  since its skipping the unmount

this is what i have for the unmount 

/usr/local/sbin/rc.unassigned umount $UD_DEVICE

and it will unmount if i run the script   not if i click the Mount Button  or  boot up with the drive in there or put the drive in to the computer...  only time it will work with this hard drive  is if i run the lightning bolt.... 

 

i guess i coul downgrade  back to .6 unraid to verfiy  it should be working back then.. then i can make sure that it least works back then

Hold, I may have found something.

Link to comment
2 hours ago, comet424 said:

so for some reason it wont run the script right... is there a debugger  since its skipping the unmount

this is what i have for the unmount 

/usr/local/sbin/rc.unassigned umount $UD_DEVICE

and it will unmount if i run the script   not if i click the Mount Button  or  boot up with the drive in there or put the drive in to the computer...  only time it will work with this hard drive  is if i run the lightning bolt.... 

 

i guess i coul downgrade  back to .6 unraid to verfiy  it should be working back then.. then i can make sure that it least works back then

I thought I found something, but I was working with an encrypted disk that is differnet.

 

So, back to your issue.  I don't understand how you can have different results when the disk is hot plugged and the lightning icon is used.  The script is executed in exactly the same way.

Link to comment

ya and the notification shows that it doesnt unmount either    so the screen box top right never shows up  unless you manually hit the unmount button...     it doesnt actually unmount....  illl downgrade  to .6  and see if it does it there?  or ill try to take a video and upload it   but it will take a while... 

unless there is other tests you want me to do... as the hot plugging doesnt even  change word "mount" to "Running"  on the specific SSD   only on the other ssd    and a format of the SSD doesnt change anything... its like it doesnt like the SSD 

Link to comment
8 minutes ago, comet424 said:

here i made a video wasnt too bad the video capture  it didnt capture the script pop up from the windows game capture bar  but youll see it should have auto run the script  but really it doesnt   ill Inbox you  the video

 

 

You have 'stat' script errors - files not found.  Fix those and the script will probably work.  If you can't fix those comment them out and see if the unmount works.

Link to comment

well those are just move files and copy files... so  copy files if any to the ssd move files to a folder to ready to delete...  

 

but that has no issue .. so if i copy a file  to the one folder... it will copy  and move ... but it wont unmount the drive......  ill make a new video and send it to ya with a test file  in the folder  

 

 

 

Link to comment

so i inboxed you video...  where i slapped a test file in... and it copied it so no stat errors.. but it couldnt unmount it... but once i do the lightning bolt it runs in...

 

then i showed  in same video  i swapped out the SSD with the other ssd...  and shoved it in and it runs ths same script file as they use the exact same script file..   and it runs and it gets the stat erros as there are no files to copy or move...  but at the end  it unmounts and the UD  shows the 2 green boxes notifications for unmounting...  on the other ssd...  so its not liking the 1 SSD  it shouldnt matter...... so for some reason it doesnt excecute properly with the one SSD 

Link to comment

Looking at updating the dynamix auto fan plugin.

Is there a way to call drives from the unassigned plugin? or a way I can say ignore them?

Currently they are being included under data disk and this then affects fan speed & noise while I sleep. Think others would enjoy a fix too.

 

function data_disks($disk) {
  return $disk['type']=='Data' && strpos($disk['status']??'','_NP')===false;

 

Screenshot 2024-02-19 at 01.07.01.png

Edited by dopeytree
Link to comment
11 hours ago, dopeytree said:

 

Is there a way to call drives from the unassigned plugin? or a way I can say ignore them?

Currently they are being included under data disk and this then affects fan speed & noise while I sleep.

I think you might be asking in the wrong place.  Try the support for the auto fan plugin.

Link to comment

so i downgraded my sisters server...  and re tried the hot swap ssd...  doesnt work either  but i know it used to work  in previous versions of the UD plugin as it would unmount but i dont know in which update it stopped as my sister gave me her server like a month ago to repair it and i just been testing it now... after i 3d printed parts and found this issue that the ssd wont unmount in the script  so its not an OS  issue  but i know it used to work in the past   but u seen in video how its messed and doesnt unmount

 

but i gonna re upgrade her server back to 8   since i figured maybe that was a problem  but it wasnt

Link to comment
1 hour ago, dopeytree said:

 

Does the Unassigned Drives plugin set a flag named unassigned_drive to true for its drives?

 

No.  If you are looking for a way to find UD devices, there are several ways.  What is it you are looking for?

Link to comment
4 minutes ago, comet424 said:

@dlandondo you think maybe with my issue that its a saved glitched  that its only doing it to that specific ssd... that i having this issue..  is there anything you want me else to trouble shoot.  like the debug levels... or something 

I ran your script on one of my test disks and the script ran the unmount command even with errors.  Because it is related to one specific disk of yours, and I have no way of reproducing the issue, there isn't much I can do.

 

Does the disk do the same thing on a different server?

Link to comment

@dlandon so i managed to fix it..  something must was corrupt in file that you keep the records of the historical drives..

 

what i did was remove the drive... i removed the drive from the historical drive...  i check  the flash drive plugins folder.. i found an old drive that was in there must been from your old plugins  as it was only one... deleted it...  

 

i did a reboot... .  i re plugged the drive in...  and when in first mounts it always says format for this drive... but i wait  i then edit the settings and added the script link.... and save  and i re tried  the hot swap... and that fixed it... it now works  hot swapping...  i dunno  if you can see from the diganostics  if there was a glitch in your configuration file...  here is a new diagnostic  of it working

maybe you can compare the 2 if your able to .  to see if there was a glitch  in the UD configurations

for that drive why it was malfunctioning on that server

 

mitchsserver-diagnostics-20240220-1230.zip

Link to comment

This week I replaced the parity drive in my server with a larger one. I had a preclear running as a stress test for a while, which I interrupted mid-cycle when adding the device to the array. The following line appears in the logs when starting the array, which seems like it shouldn't be there.

Feb 21 19:51:13 Global-Dynamics preclear.disk: Resuming preclear of disk 'sdr'

 

Also, it is listed in the historical devices section as "standby" and the option to delete it is disabled. I don't know if these two things are connected.

image.png.4979fddb7c10d301fc44c95714cb387d.png

 

Should I be concerned? How can I remove it from historical devices?

Link to comment
13 minutes ago, Renegade605 said:

This week I replaced the parity drive in my server with a larger one. I had a preclear running as a stress test for a while, which I interrupted mid-cycle when adding the device to the array. The following line appears in the logs when starting the array, which seems like it shouldn't be there.

Feb 21 19:51:13 Global-Dynamics preclear.disk: Resuming preclear of disk 'sdr'

 

Also, it is listed in the historical devices section as "standby" and the option to delete it is disabled. I don't know if these two things are connected.

image.png.4979fddb7c10d301fc44c95714cb387d.png

 

Should I be concerned? How can I remove it from historical devices?

Do the following:

  • Stop the array.
  • Unassign the parity drive.
  • Click the double arrows on the preclear UI.  This will remove the resume file so a preclear will not restart.
  • Re-assign the disk back to the array.
  • You should be able to delete the historical entry.
  • Start array.

The preclear is resuming itself on array start and it should not if it's assigned to the array.  I'll have to look into how this can be prevented.

Link to comment
44 minutes ago, Renegade605 said:

This week I replaced the parity drive in my server with a larger one. I had a preclear running as a stress test for a while, which I interrupted mid-cycle when adding the device to the array. The following line appears in the logs when starting the array, which seems like it shouldn't be there.

Feb 21 19:51:13 Global-Dynamics preclear.disk: Resuming preclear of disk 'sdr'

 

Also, it is listed in the historical devices section as "standby" and the option to delete it is disabled. I don't know if these two things are connected.

image.png.4979fddb7c10d301fc44c95714cb387d.png

 

Should I be concerned? How can I remove it from historical devices?

There's an issue with the preclear clearing operations.  For the moment just click the double arrows on the preclear page to be sure any preclears are stopped.  I'll follow up with what to do next.

Link to comment
7 hours ago, Renegade605 said:

This week I replaced the parity drive in my server with a larger one. I had a preclear running as a stress test for a while, which I interrupted mid-cycle when adding the device to the array. The following line appears in the logs when starting the array, which seems like it shouldn't be there.

Feb 21 19:51:13 Global-Dynamics preclear.disk: Resuming preclear of disk 'sdr'

 

Also, it is listed in the historical devices section as "standby" and the option to delete it is disabled. I don't know if these two things are connected.

image.png.4979fddb7c10d301fc44c95714cb387d.png

 

Should I be concerned? How can I remove it from historical devices?

What happened was you started a preclear, then paused it either manually or by stopping the array.  When the array started again, the preclear operation was resumed incorrectly even though the disk was moved to the array.  I've reworked the logic for pausing and resuming preclears so a preclear won't resume on a disk that is not a unassigned - i.e not in the array or a pool, and the pause status more accurately reflects the actual paused status of the disk.

 

As for the Historical devices, wait until the remove 'X' turns red so it can be removed.  That may not happen until the next reboot.  It's harmless as it only indicates that the disk was at some point seen by UD.

 

I will be updating UD preclear and you'll want to upgrade so a preclear cannot resume again.

  • Thanks 1
Link to comment

Can Someone explain howto reformat external usb disb drive with UD ?

Already installed UD+, precleared disk and signature is valid and destuctive mode is enabled...

cant find anything with reformat the disc or creating fs (even with stopped array) :D

 

Can someone explain me also why a seperate plugin (UD+) is needed for formatting disks and I have to enable destructive mode ?

 

Do I need UD for mounting external disks to unraid ? I am sure formatting / mounting the disk with terminal tools will be faster than looking howto reformat disks with UD :D

Link to comment
5 hours ago, MisterT said:

precleared disk and signature is valid and destuctive mode is enabled...

Preclear is meant for adding to array, and if you want to add to array you MUST NOT format before doing it so that is disabled, have to clear the preclear status first to reenable other operations.

 

5 hours ago, MisterT said:

Can someone explain me also why a seperate plugin (UD+) is needed for formatting disks and I have to enable destructive mode ?

To reduce the probability of people doing wrong manipulations.

 

5 hours ago, MisterT said:

Do I need UD for mounting external disks to unraid ?

No but it's way easier to click a button than do a mount command manually.

Edited by Kilrah
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.