Jump to content

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


Recommended Posts

30 minutes ago, dlandon said:

UD no longer pings remote servers.  Instead it checks that the NFS port is open on the remote server.  Because of security, some servers don't respond to a ping.

 

Run this command and post the result:

/usr/bin/nice /usr/bin/timeout 1 bash -c '(echo >/dev/tcp/100.67.144.43/2049) &>/dev/null'; echo $?

 

 

The result was "1".

 

root@Tower:~# /usr/bin/nice /usr/bin/timeout 1 bash -c '(echo >/dev/tcp/100.67.144.43/2049) &>/dev/null'; echo $?
1
root@Tower:~# 

 

Link to comment
3 minutes ago, Allram said:

 

The result was "1".

 

root@Tower:~# /usr/bin/nice /usr/bin/timeout 1 bash -c '(echo >/dev/tcp/100.67.144.43/2049) &>/dev/null'; echo $?
1
root@Tower:~# 

 

Try this command:

/usr/bin/nice /usr/bin/timeout 2 bash -c '(echo >/dev/tcp/100.67.144.43/2049) &>/dev/null'; echo $?

I've adjusted the timeout.  I think the command is timing out and returning a value that indicates the server is not available.

Link to comment
8 minutes ago, dlandon said:

Try this command:

/usr/bin/nice /usr/bin/timeout 2 bash -c '(echo >/dev/tcp/100.67.144.43/2049) &>/dev/null'; echo $?

I've adjusted the timeout.  I think the command is timing out and returning a value that indicates the server is not available.

 

It still says "1".

Also tried to increase the timeout to 20 and still got "1".

 

root@Tower:~# /usr/bin/nice /usr/bin/timeout 2 bash -c '(echo >/dev/tcp/100.67.144.43/2049) &>/dev/null'; echo $?
1
root@Tower:~# /usr/bin/nice /usr/bin/timeout 2 bash -c '(echo >/dev/tcp/100.67.144.43/2049) &>/dev/null'; echo $?
1
root@Tower:~# /usr/bin/nice /usr/bin/timeout 20 bash -c '(echo >/dev/tcp/100.67.144.43/2049) &>/dev/null'; echo $?
1
root@Tower:~# /usr/bin/nice /usr/bin/timeout 2 bash -c '(echo >/dev/tcp/100.67.144.43/2049) &>/dev/null'; echo $?


 

Link to comment
1 hour ago, Hammerfest said:

refresh was done of course, no visual change noted

Go to a command line and run this command:

ud_diagnostics

Then post the /flash/logs/ud_diagnostics.zip file.  There are some things I need to confirm in your setup.

Link to comment

I have an external HDD attached to my wifi AP via its usb port. I've made it automounted to Unraid as a SMB shared remote disk. I use this HDD for backups of some applications data with User Script plugin.

Most of the time, the backup script works without problem; but sometimes it seems the HDD did not wake up in time, thus the backup script can't find the disk.

 

Below are log entries showing both the successful (on 22 April) and unsuccessful (on 23 Apr) backups:

Full logs for this script are available at /tmp/user.scripts/tmpScripts/joplin-server-backup/log.txt

Script Starting Apr 22, 2024 02:00.01

Full logs for this script are available at /tmp/user.scripts/tmpScripts/joplin-server-backup/log.txt

{"id":"KpnPiVgWIy7m","time":1713726237,"expires":1713769437,"event":"message","topic":"joplin_postgres","message":"Joplin Postgres db was backed up to Archer C9 external drive"}
Script Finished Apr 22, 2024 02:03.58

Full logs for this script are available at /tmp/user.scripts/tmpScripts/joplin-server-backup/log.txt

Script Starting Apr 23, 2024 02:00.02

Full logs for this script are available at /tmp/user.scripts/tmpScripts/joplin-server-backup/log.txt

/tmp/user.scripts/tmpScripts/joplin-server-backup/script: line 8: /mnt/remotes/BTHOVEN_DDWRT_NAS/joplin_backup/postgres/2024-04-23.bak: No such file or directory
{"id":"1wprdYCMYCX7","time":1713812402,"expires":1713855602,"event":"message","topic":"joplin_postgres","message":"Joplin Postgres db was backed up to Archer C9 external drive"}
find: '/mnt/remotes/BTHOVEN_DDWRT_NAS/joplin_backup/postgres': No such file or directory
Script Finished Apr 23, 2024 02:00.02


Is there any simple script command to wake my remote disk up before running backup script command?

Thanks

Link to comment
15 hours ago, bthoven said:

Is there any simple script command to wake my remote disk up before running backup script command?

 

Hi bthoven

 

Try this, i hope it works:

#!/bin/bash

# Variables
SLEEP_TIME=10
ATTEMPTS=5

# Function to wake up HDD
wake_hdd() {
    local wake_dir=$1
    local attempt=1
    while [ $attempt -le $ATTEMPTS ]; do
        echo "Attempt $attempt to wake up external HDD.."
        ls "$wake_dir" > /dev/null 2>&1
        if [ $? -eq 0 ]; then
            echo "HDD is awake."
            break
        else
            echo "Failed to access HDD, sleeping for $SLEEP_TIME seconds.."
            sleep $SLEEP_TIME
        fi
        ((attempt++))
    done
}

# Run wake up HDD
wake_hdd "/mnt/remotes/BTHOVEN_DDWRT_NAS"
#wake_hdd "/mnt/remotes/another_path_to_wake_up"

# Your script here:

 

Greetings

 

Edited by Amane
  • Like 1
Link to comment

Thank you for the professional script. I've identified the cause of the error. Normally, when I navigate to Main-->SMB share and select the mounted disk (which shows as mounted with disk capacity and free space), I expect to see all the folders/files within the remote disk. However, this time, I only saw the folders/files of the Unraid root directory, which explains why the script couldn't locate the backup folder.

I resolved the issue by unmounting and then remounting the disk, after which everything functioned normally. I ran the script manually, and it operated correctly.

The reason for the disk's sudden change in behavior is unclear to me.

Edited by bthoven
for more info.
  • Like 1
Link to comment
On 4/23/2024 at 5:08 AM, dlandon said:

Go to a command line and run this command:

ud_diagnostics

Then post the /flash/logs/ud_diagnostics.zip file.  There are some things I need to confirm in your setup.

sorry for the late reply, had to take a trip out of town and did not see this at all

 

i have made some config changes, so hopefully it doesnt sully what you where looking for, please find the requested diag in our convo

Link to comment
2 minutes ago, mattm1121 said:

Is there any way to sort the external drives that are connected to the server? Say by Device # or partition name?

They are sorted by device.  Click on the Device Settings icon (three gears) and set a name for the disk and they will be sorted by the name you enter.

Link to comment

Thanks for the quick response. By device do you mean like /dev/sda?. I see screenshots where peoples drive are set by "Dev 1, Dev 2 Dev3, etc..." but not mine. Which was way I was thinking that there's a way to sort by that. I'll look at the Device Settings of course. Thanks again for the quick response. 

image.thumb.png.cf3223f5ed6e2ea8163b01ddd5da0c79.png

Link to comment
44 minutes ago, mattm1121 said:

Thanks for the quick response. By device do you mean like /dev/sda?. I see screenshots where peoples drive are set by "Dev 1, Dev 2 Dev3, etc..." but not mine. Which was way I was thinking that there's a way to sort by that. I'll look at the Device Settings of course. Thanks again for the quick response. 

It's supposed to sort by the 'Dev X', but I just discovered it's not doing that but is instead of sorting by 'sdX'.  If you've seen that in other systems, it's just happenstance.  Once an alias name is assigned though, that will be used to sort the disks.

Link to comment
Posted (edited)

Unraid 6.12.10

Diagnostics attached

After a reboot, the mount buttons are always greyed out. If I start stepping through the wizard and select the windows icon and then the scan button, both mount buttons will become available after the scan is done.

I have the smb version turned off and extended the timeout to 120 seconds (which I somehow think that the timeout isn't being used?)

 

I also need to add that for some reason one of my ssds that are part of a zfs zraid6 pool is showing as unmountable even though zpool status shows it as working perfectly, no errors from a scrub either. Attached a screenshot

pinkfloyd.local-diagnostics-20240502-1834.zip

by default 2024-05-02 at 11.48.07 PM.png

Edited by ghstridr
Forgot other issue
Link to comment
4 hours ago, ghstridr said:

Unraid 6.12.10

Diagnostics attached

After a reboot, the mount buttons are always greyed out. If I start stepping through the wizard and select the windows icon and then the scan button, both mount buttons will become available after the scan is done.

I have the smb version turned off and extended the timeout to 120 seconds (which I somehow think that the timeout isn't being used?)

 

I also need to add that for some reason one of my ssds that are part of a zfs zraid6 pool is showing as unmountable even though zpool status shows it as working perfectly, no errors from a scrub either. Attached a screenshot

pinkfloyd.local-diagnostics-20240502-1834.zip 200.03 kB · 0 downloads

by default 2024-05-02 at 11.48.07 PM.png

Reboot your server and wait a few minutes, then go to a command line and type 'ud_diagnostics', then post the ud_diagnostics.zip file in /flash/log/ here.

Link to comment

Hi there,
today i've tried to get scripts to work when plugging in a usb device. I have all my photos a 1TB NVMe in a USB-C case. I plug it into the macbook to work with an now i want to somtetimes plug it into the unraid sever for a packup to the array. But i have some wierd troubles. Unassigned Devices Plugin is not able to safe scripts. 

Im connecting the device -> open it in unassigned devices -> Create the Default Script via the button at the bottom -> copy my own script into the textarea -> click on save -> nothing happens. The textarea is empty an the path to the scipt too. Via console i can see, that no script was created in /boot/config/plugins/unassigned.devices and i can not select a script in the gui... what am i doing wrong?

Link to comment
On 5/4/2024 at 9:15 AM, Hamish1969 said:

Hi there,
today i've tried to get scripts to work when plugging in a usb device. I have all my photos a 1TB NVMe in a USB-C case. I plug it into the macbook to work with an now i want to somtetimes plug it into the unraid sever for a packup to the array. But i have some wierd troubles. Unassigned Devices Plugin is not able to safe scripts. 

Im connecting the device -> open it in unassigned devices -> Create the Default Script via the button at the bottom -> copy my own script into the textarea -> click on save -> nothing happens. The textarea is empty an the path to the scipt too. Via console i can see, that no script was created in /boot/config/plugins/unassigned.devices and i can not select a script in the gui... what am i doing wrong?

Using a Broswer in Private Mode can cause issues with the script editing and saving because of the Browser security settings.

Link to comment

New Release,

 

Changes have been made in the way remote share servers are checked for being online.  When you search for servers now, you will see results show the server name in some cases with the "Local TLD" as part of the server name.  If you use the default "Local TLD" of "local", you will see it attached to Unraid servers and VMs on your network.

 

For example:
"TOWER.LOCAL"
"TOWERVM.LOCAL"
"LAPTOP"
"ROUTER"

 

Choose the server for your desired remote share.  Then enter your credentials, and search for the shares on that server.  Add the share.

 

UD will display the remote share exactly as it does now on the UD page, but in the background it uses "SERVER.LOCAL" for checking the server for being online, and for mounting the share because the local server name is "SERVER.LOCAL".

 

When you update UD to this latest version, some of your remote shares will show as being offline.  Just add the share back using UD and make your appropriate selections and UD will correct the remote share configuration.  The remote share should then show as being online again.

 

The goal of this change is to be sure the server listing is accurate and doesn't show a server IP address instead of the name as it has in the past.  Issues with certain setups where users are having the shares show offline when the server is booted and remote shares won't auto mount should be fixed.
 

Link to comment
Posted (edited)
10 hours ago, dlandon said:

New Release,

 

Changes have been made in the way remote share servers are checked for being online.  When you search for servers now, you will see results show the server name in some cases with the "Local TLD" as part of the server name.  If you use the default "Local TLD" of "local", you will see it attached to Unraid servers and VMs on your network.

 

.......

 

The goal of this change is to be sure the server listing is accurate and doesn't show a server IP address instead of the name as it has in the past.  Issues with certain setups where users are having the shares show offline when the server is booted and remote shares won't auto mount should be fixed.
 

Something appears to have gone awry with this new release. I am no longer seeing any disks or remote shares under the UD section. I have 34 disks under UD with 26 of them mounted by UD to use with the mergerfs plugin. They are still mounted and mergerfs is working so it's just a display issue it seems. This is what I see:

 

UD-Failure-May6-2024.thumb.jpg.e3a15aa02d76a99dcef2fe904ce0bb54.jpg

 

My syslog shows no messages from UD since I updated the plugin yesterday. Alas messages get purged quickly as I have a hardware fault with the BMC firmware on my Supermicro H11SSL-i motherboard and syslog is being spammed with messages about it about 20 - 30 times a minute. Later today I hope to try and fix this issue by manually reprogramming the BMC flash chip.

 

When I stopped the unRAID array the UD drives all appear to unmount properly. They're set to automount in UD settings with the manual mount button disabled for each drive). I'm just rebooting now to see if the drives will show up. After the reboot it initially showed the same as the screenshot above, but now that I've started the array both the disks and my remote shares are showing up until I refresh the page. Then it reverts to the screenshot above.

 

If I get my BMC issue fixed I'll try another reboot and grab some diagnostics.

 

Edited by AgentXXL
Link to comment
2 hours ago, AgentXXL said:

Something appears to have gone awry with this new release. I am no longer seeing any disks or remote shares under the UD section. I have 34 disks under UD with 26 of them mounted by UD to use with the mergerfs plugin. They are still mounted and mergerfs is working so it's just a display issue it seems. This is what I see:

 

UD-Failure-May6-2024.thumb.jpg.e3a15aa02d76a99dcef2fe904ce0bb54.jpg

 

My syslog shows no messages from UD since I updated the plugin yesterday. Alas messages get purged quickly as I have a hardware fault with the BMC firmware on my Supermicro H11SSL-i motherboard and syslog is being spammed with messages about it about 20 - 30 times a minute. Later today I hope to try and fix this issue by manually reprogramming the BMC flash chip.

 

When I stopped the unRAID array the UD drives all appear to unmount properly. They're set to automount in UD settings with the manual mount button disabled for each drive). I'm just rebooting now to see if the drives will show up. After the reboot it initially showed the same as the screenshot above, but now that I've started the array both the disks and my remote shares are showing up until I refresh the page. Then it reverts to the screenshot above.

 

If I get my BMC issue fixed I'll try another reboot and grab some diagnostics.

 

Because of situations where disks are having hardware issues causing UD to hang, I added a 10 second timeout so the Unraid wave was not displayed forever.  The idea is that a user would see the timeout message and look into solving the issue and wouldn't just think it was a UD issue.

 

Once you post your diagnostics, I can look into the issue further.

Link to comment
28 minutes ago, biologicalrobot said:

Hello,

 

Not too sure what happened but after a reboot I am no longer able to have my remote shares connected on either of my servers.

I tried NFS and SMB. I also removed and re added the shares as well as uninstalled and reinstalled the plugin.

 

Could be something simple that I missed but I posted the diagnostics below for my main server.

ud_diagnostics-20240507-065223.zip 32.5 kB · 0 downloads

What is the Pluto computer/server?

Link to comment
Posted (edited)
6 hours ago, dlandon said:

Because of situations where disks are having hardware issues causing UD to hang, I added a 10 second timeout so the Unraid wave was not displayed forever.  The idea is that a user would see the timeout message and look into solving the issue and wouldn't just think it was a UD issue.

 

Once you post your diagnostics, I can look into the issue further.

Alas I was unsuccessful in attempting to flash the BMC firmware - the chip won't even read, which is what the Supermicro UEFI programming utility said. I'll be ordering a replacement chip later today. Once I get the replacement chip I'll program it and then do the surgery to replace the dead one on my motherboard.

 

In the meantime, is it as simple as replacing the plugin package on my USB key with the previous version and rebooting? NVM - I just restored the 2024.05.01 version of the plugin and it's working. I'll have to ignore updates until I get the motherboard issue fixed. Not having a useable syslog is very frustrating to say the least.

Edited by AgentXXL
Update to report successful plugin rollback
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.

×
×
  • Create New...