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


dlandon

6076 posts in this topic Last Reply

Recommended Posts

9 hours ago, dlandon said:

This is fixed in the latest release of UD.

Thank you for the hard work on this.  I just wanted to confirm what you have been saying.  In the latest release of UD, we should be able to leave cache enabled  or hard links enable on the remote share as long as the mount is SMB.  However, NFS shares cannot have cache enabled.

 

Can cache be left enabled under NFS if hard links are disabled? I believe that I tried this scenario and still had problems.

Link to post
  • Replies 6.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

New release of UD.  Changes: When changing the mount point (which is also the share name), the mount point is checked for a duplicate of a user share or another UD device.  Samba cannot handle

Major new release of UD: "Where are the switches?"  The "Pass Through", "Read Only", "Automount", and "Share" switches have been moved to a new Edit Settings dialog.  This is also where the sc

While I appreciate your interest in esthetics, there is more to consider than just 'aligning' disk drive mounts: This disk is mounted without a UD script, it is probably better to put it in th

Posted Images

8 hours ago, hawihoney said:

May I vote for additional options, or a slightly changed handling, in UD where a.) partitions for disks that are marked as passed through never become shown at all and b.) the text "Format" is never shown for disks that are marked as passed through.

I'll have a look and see what makes sense.

Link to post
3 hours ago, mikesp18 said:

Thank you for the hard work on this.  I just wanted to confirm what you have been saying.  In the latest release of UD, we should be able to leave cache enabled  or hard links enable on the remote share as long as the mount is SMB.  However, NFS shares cannot have cache enabled.

Yes.

 

3 hours ago, mikesp18 said:

Can cache be left enabled under NFS if hard links are disabled? I believe that I tried this scenario and still had problems.

I think disabling hard links is hit and miss and depends on your particular use case.  Disabling cache on share is apparently a better solution.

 

I know some of you are frustrated with the NFS situation, but understand that it is beyond Limetech's control.  NFS is a pretty poor implementation of remote share mounting.  It cannot handle a file being moved on the server because the file handle is changed and the NFS client is not aware of the new file handle.  That's where the stale file handle comes from.  You'll see log entries that the file handle is not what was expected.  This is exactly what the mover does, hence the problem on Unraid servers.

 

There is a remote possibility that NFSv4 may offer some relief - there is a feature called volatile file handles, but I do not understand how it works because documentation is weak.

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

I'll have a look and see what makes sense.

 

Thanks a lot.

 

IMHO the question is, what activitiy is a host responsible for on passed through disks:

 

 

#1 check SMART: yes (VM can't check SMART for passed through disks, don't know how or if this works currently)

 

#2 spinup/spindown: yes (VM can't spinup/spindown passed through disks, currently it works perfect, no change required)

 

#3 show "Format" text: no (host does not catch the finish until host reboot - host reboot is not done if VM formats/rebuilds a passed through disk)

 

#4 show Partitions: no (host does not catch new partitions until host reboot - host reboot is not done if VM creates/deletes partitions on a passed through disk)

 

 

So in my opinion the checkbox "passed through" within UD disk settings becomes the driver for #1 to #4 mentioned above on passed through disks.

 

Perhaps you need to talk to Limetech about their vision.

 

Thanks again.

 

Edited by hawihoney
Link to post

The original idea behind the 'Passed Through' setting was to prevent UD from mounting the disk (if automount was set), and to prevent a user from accidently mounting a disk already mounted in a VM.   It wasn't necessarily intended to provide passed through functionality.

 

When a VM formats a disk, UD isn't aware of that because udev hasn't detected the change.  Udev is triggered when a disk is installed, or a refresh initiated.

Link to post
Posted (edited)

Hi all,

 

I hope someone can help me with my problem. I just replaced my 1TB external HDD with an 4TB one for my backups. 

 

First I have formatted it with XFS and mounting was no problem, but I wanted to have this disk being encrypted so I formatted the disk again, now with XFS_encrypted aka LUKS. I chose a password and also put it in the UAD settings. But for some reason mounting this encrypted partition is not possible.

 

May 7 09:55:36 Unraid unassigned.devices: Format disk '/dev/sda' with 'xfs-encrypted' filesystem: meta-data=/dev/mapper/format_sda isize=512 agcount=4, agsize=244187635 blks = sectsz=4096 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 data = bsize=4096 blocks=976750537, imaxpct=5 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=476928, version=2 = sectsz=4096 sunit=1 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0
May 7 09:55:39 Unraid unassigned.devices: Reloading disk '/dev/sda' partition table.
May 7 09:55:39 Unraid kernel: sda: sda1
May 7 09:55:39 Unraid unassigned.devices: Reload partition table result: /dev/sda: re-reading partition table
May 7 09:55:39 Unraid unassigned.devices: Adding disk '/dev/mapper/Intenso_External_USB_3.0'...
May 7 09:55:41 Unraid unassigned.devices: Mount drive command: /sbin/mount -o rw,noatime,nodiratime '/dev/mapper/Intenso_External_USB_3.0' '/mnt/disks/Intenso_External_USB_3.0'
May 7 09:55:41 Unraid kernel: /dev/mapper/Intenso_External_USB_3.0: Can't open blockdev
May 7 09:55:41 Unraid unassigned.devices: Mount of '/dev/mapper/Intenso_External_USB_3.0' failed: 'mount: /mnt/disks/Intenso_External_USB_3.0: special device /dev/mapper/Intenso_External_USB_3.0 does not exist. '
May 7 09:55:41 Unraid unassigned.devices: Partition 'Intenso External_USB_3.0' cannot be mounted.
May 7 09:55:41 Unraid unassigned.devices: Running device script: 'Intenso_External_USB_3.0.sh' with action 'ERROR_MOUNT'.

 

May 7 10:14:12 Unraid unassigned.devices: Adding disk '/dev/mapper/Intenso_External_USB_3.0'...
May 7 10:14:14 Unraid unassigned.devices: Mount drive command: /sbin/mount -o rw,noatime,nodiratime '/dev/mapper/Intenso_External_USB_3.0' '/mnt/disks/Intenso_External_USB_3.0'
May 7 10:14:14 Unraid kernel: /dev/mapper/Intenso_External_USB_3.0: Can't open blockdev
May 7 10:14:14 Unraid unassigned.devices: Mount of '/dev/mapper/Intenso_External_USB_3.0' failed: 'mount: /mnt/disks/Intenso_External_USB_3.0: special device /dev/mapper/Intenso_External_USB_3.0 does not exist. '
May 7 10:14:14 Unraid unassigned.devices: Partition 'Intenso External_USB_3.0' cannot be mounted.
May 7 10:14:14 Unraid unassigned.devices: Running device script: 'Intenso_External_USB_3.0.sh' with action 'ERROR_MOUNT'.

 

Formatting it back to simple XFS mounting is just working fine again.

 

Any idea what is causing this issue? Any help would be much appreciated. Thanks in advance.

Edited by monarc
Link to post
On 5/4/2021 at 10:18 AM, Bob@unraid said:

Hello everyone,

 

is it possible to add a remote Synology NAS with Unassigned Devices via the internet?

The NAS is reachable through the Synology dynDNS service with the address "mom.myds.me" (not the real name). Uploads with filezilla and this adress are also possilbe.

My main questions 1) is it possible? and 2) if so what is the right "mounting term" to connect it with Unassigned Devices

 

I am running Version: 6.9.2 and Unassigned Devices 2021.04.19

 

Thanks!

Not directly.  I connect two Unraid servers in different locations using Wireguard to set up a VPN tunnel.  Wireguard gives you a local IP address to access the remote server.  You then use that local IP address to access the remote server with UD.  Does the Synolog support Wireguard?

Link to post
Posted (edited)

I'm hoping someone can help me with an issue I'm having  mounting an NFS share on another NAS.  There are two NFS shares on my synology that have the exact same configuration (photo and upload).   I've mounted photo just fine and can use Krusader to navigate and sync folders with my Unraid shares.  Today I did the same with the upload share and am experiencing a strange permissions issue.  As you can see from the first check the permissions look just fine.  When I try and access the upload folder in Krusader I get a premission denied and suddenly the directory permissions are changed.  If I wait a bit, the permissions seem to reset, but as soon as I try and access it changes again.  Here is the output from the terminal window in Krusader.  I can see the same thing happening watching in the Unraid terminal as well.  Any ideas would be much appreciated!

 

image.thumb.png.00b882963c67a0c8084e28e4945abaaa.png

 

Edited by Cpmiller22
Link to post
5 hours ago, clusterbox said:

Unassigned Devices UI can no longer load.  See the screenshot to observe the php include error I'm seeing?  And ideas how to resolve?

 

image.thumb.png.8585eefecee49475685efc1dc94ab678.png

Uninstall and reinstall UD or reboot.

Link to post
52 minutes ago, sonic6 said:

Hey,

 

is there a way for mounting an connected Drive on a specific time, or trigger an automount with cron?

Click on the Help icon while on the UD page and read about using the rc.unassigned command to mount a disk.  You mount the disk with the /dev/sdX designation.  The issue is that the sdX can change for a disk on each reboot, so you have to be sure it is the one you want.

 

Use the User Scripts plugin and setup a script to run at a specific time to mount the disk.

Link to post
Posted (edited)
1 hour ago, dlandon said:

The issue is that the sdX can change for a disk on each reboot

hm.. is there a workaround for that? maybe i can use UUID, or will the UUID also change each reboot?

 

Looks like i can do it with this command:

/usr/local/sbin/rc.unassigned umount /dev/disk/by-id/ata-WDC_WD20EFRX-blablabla

with 

ls /dev/disk/by-id/

i found out, that i have to use "ata-" infront of the device name

Edited by sonic6
Link to post
On 5/7/2021 at 12:09 PM, dlandon said:

Not directly.  I connect two Unraid servers in different locations using Wireguard to set up a VPN tunnel.  Wireguard gives you a local IP address to access the remote server.  You then use that local IP address to access the remote server with UD.  Does the Synolog support Wireguard?

thanks for the replay. 

It is a quite old synology but maybe wireguard is option. at the moment at my mom's house a wireguard server my remote support is running anyway

Link to post
10 hours ago, dlandon said:

Uninstall and reinstall UD or reboot.

 

Tried that already. No dice.  I've kinda tried all the obvious things.  I can confirm the `Legacy.php` file the template is looking for is straight up missing.  Not sure how this happened and not sure how to get it back.  

 

- Attempted rebooting Unraid multiple times

- Attempted reinstalling Unassigned Devices

 

I'll be attempting to boot into safe mode later today to see what happens.  Would appreciate anyone's guidance on where to look.

 

Link to post
2 hours ago, clusterbox said:

 

Tried that already. No dice.  I've kinda tried all the obvious things.  I can confirm the `Legacy.php` file the template is looking for is straight up missing.  Not sure how this happened and not sure how to get it back.  

 

- Attempted rebooting Unraid multiple times

- Attempted reinstalling Unassigned Devices

 

I'll be attempting to boot into safe mode later today to see what happens.  Would appreciate anyone's guidance on where to look.

 

Post your diagnostics.

Link to post
12 hours ago, sonic6 said:

hm.. is there a workaround for that? maybe i can use UUID, or will the UUID also change each reboot?

 

Looks like i can do it with this command:


/usr/local/sbin/rc.unassigned umount /dev/disk/by-id/ata-WDC_WD20EFRX-blablabla

with 


ls /dev/disk/by-id/

i found out, that i have to use "ata-" infront of the device name

I'm adding the ability to mount and unmount a device by the Dev X name used by Unraid 6.9.  The device will always have the same Dev X designation, even if the sdX device name changes.  This allows a consistent name for use by scripts.  The Dev X would be passed to rc.unassigned as devX.

Link to post
9 hours ago, Bob@unraid said:

thanks for the replay. 

It is a quite old synology but maybe wireguard is option. at the moment at my mom's house a wireguard server my remote support is running anyway

I think there are other VPN options that would accomplish the same thing.  I'm not familiar with any but Wireguard.

Link to post
1 hour ago, dlandon said:

Do this:

  • Remove the UD plugin.
  • Delete the /flash/config/plugin/unassigned.devices/*.tgz files.
  • Re-install UD.

 

Success!  That worked!  You sir, are a genius.

 

FYI my folder path was a bit different.  I ran the below command and then installed UD again.

 

rm /boot/config/plugins/unassigned.devices/*.tgz

 

Link to post
59 minutes ago, clusterbox said:

FYI my folder path was a bit different.

The SMB share is /flash.  In a console in Unraid it is /boot.

Link to post

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.