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


Recommended Posts

On 6/23/2023 at 6:27 PM, dlandon said:

UD does not make any attempts to mount remote shares after the first try to auto mount.  About the only thing you can do is set up a script to run on User Scripts to auto mount remote shares.  You can run the script on a timed basis.  The command to auto mount remote shares is:

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

 

What you might do is set up a User Script to run every 30 minutes and run the remote shares mount command.  If the shares are already mounted, the script will just log that the devices are already mounted.

Hi

 

Thank you for your response and the proposed solution! It's difficult for me to describe my feelings, but I experience a peculiar sensation akin to a mental itch whenever I need to execute this code 😅.

Perhaps there is a possibility to incorporate a code-based verification to determine whether the device is currently mounted. If it isn't, we could then verify its availability before proceeding with the execution of the mount autoshares command.

Or is it a task, which can't be easily accomplished?

 

Thanks!

Link to comment
On 6/24/2023 at 7:04 PM, dlandon said:

Does the name work?  Try this in a terminal and see if it returns the IP address:

arp -a NASCEB6D5

 

Also this one:

arp -an NASCEB6D5.LOCAL

The First gives the IP of the other NIC from the NAS. Not the IP from the Ping.

 

The second doesn't work. Unknown Host. With .Routername gives the IP from the first command.

 

But the Mount in UD doesn't work with Name or the two IPs from the NAS.

 

New Log on the Way.

Link to comment
5 hours ago, Doublemyst said:

Hi

 

Thank you for your response and the proposed solution! It's difficult for me to describe my feelings, but I experience a peculiar sensation akin to a mental itch whenever I need to execute this code 😅.

Perhaps there is a possibility to incorporate a code-based verification to determine whether the device is currently mounted. If it isn't, we could then verify its availability before proceeding with the execution of the mount autoshares command.

Or is it a task, which can't be easily accomplished?

 

Thanks!

It is not a feasability issue.  UD mounts devices whenever auto mount is set and if the server is not available, UD will not attempt another try to mount.  I don't think UD mounting remote shares when the server is online is a good idea.  What if the user doesn't want auto mount shares to be re-mounted like this?

 

You should develop a plan to handle this case.  Another suggestion would be to unmount remote shares at a certain time (like just before the server goes to sleep) and mount them at a different time when the server would be back online.  You can do this manually or programmatically using user scripts.

Link to comment
6 hours ago, thany said:

I wonder what is the purpose of Historical Devices?

 

From what I see, it lists devices that are no longer present in the system. So why would I need to keep their information around? What is the actual real-world use-case for this feature? Or alternatively I could ask, what problem does it solve?

UD is used by many users like myself to back up files.  I plug in a USB disk and a device script runs doing the work I want done for that device.  The Historical devices are devices that were in UD but have been removed as you noted.  When I plug in a USB disk, the disk mounts and runs the script as defined in the Historical devices.  This makes the backup a plug and play operation.  Without the Historical device settings, UD does not know what to do when a disk in plugged in.

Link to comment
12 hours ago, thany said:

What is the actual real-world use-case for this feature? Or alternatively I could ask, what problem does it solve?

For the settings (automount, share,...) and the device scripts to work there has to be something keeping track of the devices when they're not connected... 

Link to comment
7 hours ago, dlandon said:

UD is used by many users like myself to back up files.  I plug in a USB disk and a device script runs doing the work I want done for that device.  The Historical devices are devices that were in UD but have been removed as you noted.  When I plug in a USB disk, the disk mounts and runs the script as defined in the Historical devices.  This makes the backup a plug and play operation.  Without the Historical device settings, UD does not know what to do when a disk in plugged in.

 

Ok, so the name "historical devices" is just a bit unfortunate. It should be something like "disconnected devices". Makes more sense to me anyway, not sure why the current name was chosen.

Link to comment
10 hours ago, mdrodge said:

The Remote shares refused to mount after OS  update, I removed it and now I cant re-add it.

The remote server can be detected but it shares can't be seen (by unraid)(but windows is unaffected so the shares are online)

Unraid 6.12 introduced the concept of listening interfaces.  Read the release notes here https://docs.unraid.net/unraid-os/release-notes/6.12.0/ and see if you need to add your interface so UD can mount remote shares.  For example, if you use a Zerotail or Tailscale VPN.

Link to comment

The mechanism for UD to check if a mount is active appears flawed.

 

This NFS export does not exist but I suspect the presence of files within the dir structure is what the status indicator is based off of. Ideally this should be based off a system level indicator such as showmount or df.

Screenshot 2023-07-03 093555.png

Screenshot 2023-07-03 094100.png

Link to comment
22 minutes ago, DiscoverIt said:

The mechanism for UD to check if a mount is active appears flawed.

 

This NFS export does not exist but I suspect the presence of files within the dir structure is what the status indicator is based off of. Ideally this should be based off a system level indicator such as showmount or df.

Screenshot 2023-07-03 093555.png

Screenshot 2023-07-03 094100.png

The orb ball is only based on being able to ping the remote share server.  The 'Mount' button and the size, used, and free indicators (from df) will show mount status.

Link to comment

I have Problems with a btrfs USB Disk under 6.12.2 he is Read Only but no Read Only is set in the Settings.

 

The Filesystem Check successful. And working for a while. Actually have the Issue and I/O Entry's in syslog.

 

Gives Debug Log from UD?

 

In the syslog i have the message smartctl are deprecated SCSI ioctl, please convert it to SG_IO.

Edited by Revan335
Link to comment

I added a USB drive and configured it to UD. After tinkering around with it, I unmounted and removed the drive from UD. Later on I added the drive back in, renamed it and all is good. The wierd thing I'm seeing is when looking at the network from a Windows or Mac machine, I still see the old drive name (which I get error messages that the drive is no longer in that location) and the new drive name which I can access. Is there a way to permanently remove the old drive name from UD?

Link to comment
34 minutes ago, Revan335 said:

I have Problems with a btrfs USB Disk under 6.12.2 he is Read Only but no Read Only is set in the Settings.

 

The Filesystem Check successful. And working for a while. Actually have the Issue and I/O Entry's in syslog.

 

Gives Debug Log from UD?

 

In the syslog i have the message smartctl are deprecated SCSI ioctl, please convert it to SG_IO.

Unrelated, but you have a disk with errors:

Jul  3 18:47:01 Lucy root: Fix Common Problems Version 2023.04.26
Jul  3 18:47:02 Lucy root: Fix Common Problems: Error: disk3 (WDC_WD60EFRX-68MYMN1_WD-WX21D84R1EK9) has read errors

 

It looks like the disk mounted r/w:

Jul  2 15:25:30 Lucy unassigned.devices: Mounting partition 'sda1' at mountpoint '/mnt/disks/WD_My_Passport_0827'...
Jul  2 15:25:30 Lucy unassigned.devices: Mount cmd: /sbin/mount -t 'btrfs' -o rw,noatime,nodiratime,space_cache=v2 '/dev/sda1' '/mnt/disks/WD_My_Passport_0827'
Jul  2 15:25:30 Lucy kernel: BTRFS info (device sda1): using crc32c (crc32c-intel) checksum algorithm
Jul  2 15:25:30 Lucy kernel: BTRFS info (device sda1): using free space tree
Jul  2 15:25:33 Lucy unassigned.devices: Successfully mounted 'sda1' on '/mnt/disks/WD_My_Passport_0827'.

 

Why do you think it's read only?

 

You have errors on that disk:

Jul  3 19:27:44 Lucy kernel: BTRFS error (device sda1: state EA): bdev /dev/sda1 errs: wr 515, rd 137, flush 0, corrupt 0, gen 0
Jul  3 19:27:44 Lucy kernel: I/O error, dev sda, sector 2248416 op 0x0:(READ) flags 0x1000 phys_seg 4 prio class 2
Jul  3 19:27:44 Lucy kernel: BTRFS error (device sda1: state EA): bdev /dev/sda1 errs: wr 515, rd 138, flush 0, corrupt 0, gen 0
Jul  3 19:27:51 Lucy kernel: I/O error, dev sda, sector 94112 op 0x0:(READ) flags 0x1000 phys_seg 4 prio class 2
Jul  3 19:27:51 Lucy kernel: BTRFS error (device sda1: state EA): bdev /dev/sda1 errs: wr 515, rd 139, flush 0, corrupt 0, gen 0
Jul  3 19:27:51 Lucy kernel: I/O error, dev sda, sector 2191264 op 0x0:(READ) flags 0x1000 phys_seg 4 prio class 2

 

@JorgeB can probably help with the disk issues.

Link to comment
2 minutes ago, azflyer19 said:

I added a USB drive and configured it to UD. After tinkering around with it, I unmounted and removed the drive from UD. Later on I added the drive back in, renamed it and all is good. The wierd thing I'm seeing is when looking at the network from a Windows or Mac machine, I still see the old drive name (which I get error messages that the drive is no longer in that location) and the new drive name which I can access. Is there a way to permanently remove the old drive name from UD?

It can take a few minutes for the SMB shares to be current after changes.  Give it some time, or if it doesn't go away, just click on the double arrows icon at the the upper right hand of the UD page to refresh UD.

Link to comment
19 hours ago, dlandon said:

Unraid 6.12 introduced the concept of listening interfaces.  Read the release notes here https://docs.unraid.net/unraid-os/release-notes/6.12.0/ and see if you need to add your interface so UD can mount remote shares.  For example, if you use a Zerotail or Tailscale VPN.

I'm not sure how any of that applies?

Both servers show br0 as the current (I'd assume that's correct and all I need?)

I don't use a vpn in unraid.

Everything should be about as basic and default as it comes so I don't see what conclusion to draw.

 

the 2 servers that are stock and less than 2 foot apart, it should all just work, if it doesn't default to a state where out of the box it works then it must be broken. (i tried to post this as it's own thread and was told its a UD issue)

Link to comment
17 minutes ago, mdrodge said:

I'm not sure how any of that applies?

Both servers show br0 as the current (I'd assume that's correct and all I need?)

I don't use a vpn in unraid.

Everything should be about as basic and default as it comes so I don't see what conclusion to draw.

 

the 2 servers that are stock and less than 2 foot apart, it should all just work, if it doesn't default to a state where out of the box it works then it must be broken. (i tried to post this as it's own thread and was told its a UD issue)

Understood.  Post diagnostics so we can look into it further.

  • Like 1
Link to comment
52 minutes ago, dlandon said:

Understood.  Post diagnostics so we can look into it further.

False alarm, it's working now, no idea why. All I did was wait a day.

Thanks for taking the time anyway.

 

update   (FFS lol)

gone again by the time I went to implement it

 

UPDATE 2

YEP IT'S FINE NOW??

Edited by mdrodge
Link to comment

After umount, i can't mount it again:

Jul  3 22:24:45 Lucy unassigned.devices: Unmounting partition 'sda1' at mountpoint '/mnt/disks/WD_My_Passport_0827'...
Jul  3 22:24:45 Lucy unassigned.devices: Synching file system on '/mnt/disks/WD_My_Passport_0827'.
Jul  3 22:24:45 Lucy unassigned.devices: Unmount cmd: /sbin/umount '/mnt/disks/WD_My_Passport_0827' 2>&1
Jul  3 22:24:45 Lucy unassigned.devices: Successfully unmounted 'sda1'
Jul  3 22:24:49 Lucy unassigned.devices: Mounting partition 'sda1' at mountpoint '/mnt/disks/WD_My_Passport_0827'...
Jul  3 22:24:49 Lucy unassigned.devices: Mount cmd: /sbin/mount -t 'btrfs' -o rw,noatime,nodiratime,space_cache=v2 '/dev/sda1' '/mnt/disks/WD_My_Passport_0827'
Jul  3 22:24:49 Lucy kernel: blk_print_req_error: 18 callbacks suppressed
Jul  3 22:24:49 Lucy kernel: I/O error, dev sda, sector 192 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Jul  3 22:24:49 Lucy kernel: Buffer I/O error on dev sda1, logical block 16, async page read
Jul  3 22:24:51 Lucy unassigned.devices: Mount of 'sda1' failed: 'mount: /mnt/disks/WD_My_Passport_0827: can't read superblock on /dev/sda1.        dmesg(1) may have more information after failed mount system call. '
Jul  3 22:24:51 Lucy unassigned.devices: Partition 'WD My_Passport_0827' cannot be mounted.

 

Link to comment
15 minutes ago, Revan335 said:

After umount, i can't mount it again:

Jul  3 22:24:45 Lucy unassigned.devices: Unmounting partition 'sda1' at mountpoint '/mnt/disks/WD_My_Passport_0827'...
Jul  3 22:24:45 Lucy unassigned.devices: Synching file system on '/mnt/disks/WD_My_Passport_0827'.
Jul  3 22:24:45 Lucy unassigned.devices: Unmount cmd: /sbin/umount '/mnt/disks/WD_My_Passport_0827' 2>&1
Jul  3 22:24:45 Lucy unassigned.devices: Successfully unmounted 'sda1'
Jul  3 22:24:49 Lucy unassigned.devices: Mounting partition 'sda1' at mountpoint '/mnt/disks/WD_My_Passport_0827'...
Jul  3 22:24:49 Lucy unassigned.devices: Mount cmd: /sbin/mount -t 'btrfs' -o rw,noatime,nodiratime,space_cache=v2 '/dev/sda1' '/mnt/disks/WD_My_Passport_0827'
Jul  3 22:24:49 Lucy kernel: blk_print_req_error: 18 callbacks suppressed
Jul  3 22:24:49 Lucy kernel: I/O error, dev sda, sector 192 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Jul  3 22:24:49 Lucy kernel: Buffer I/O error on dev sda1, logical block 16, async page read
Jul  3 22:24:51 Lucy unassigned.devices: Mount of 'sda1' failed: 'mount: /mnt/disks/WD_My_Passport_0827: can't read superblock on /dev/sda1.        dmesg(1) may have more information after failed mount system call. '
Jul  3 22:24:51 Lucy unassigned.devices: Partition 'WD My_Passport_0827' cannot be mounted.

 

Disk problem.

Link to comment
10 hours ago, dlandon said:

The orb ball is only based on being able to ping the remote share server.  The 'Mount' button and the size, used, and free indicators (from df) will show mount status.

 

The orb tooltip says "REMOTE SHARE IS ONLINE", and it might be better if it was reworded slightly to say "REMOTE HOST IS ONLINE". I would suggest adding a status indication of yellow indicating that ping is responsive but its not successfully mounted.

Link to comment

Strange!

I can mount bzw. the USB Disk is directly mount by connect to a Linux Client OS for example Manjaro.

 

The Gparted Verification Check says no error found.

 

Maybe have Unraid 6.12.2 or Unassigned Devices Problems with the USB btrfs Disk. 6.11.x and earlier have no Problems with it.

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.