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


dlandon

5995 posts in this topic Last Reply

Recommended Posts

hm... i dont know why, but i can't get the unmount work inside a backup script.

 

I try using mgutt backup scrpt: 

 

 

i added 

/usr/local/sbin/rc.unassigned mount /dev/disk/by-id/ata-WDC_WD20EFRX-blabla
sleep 30s

on the top and 

sleep 60s
/usr/local/sbin/rc.unassigned umount /dev/disk/by-id/ata-WDC_WD20EFRX-blabla

at the end of the script.

 

But i only got:

May  9 08:42:38 Unraid-1 unassigned.devices: Successfully mounted '/dev/sdg1' on '/mnt/disks/WDC_WD20EFRX-blabla'.
May  9 08:44:27 Unraid-1 unassigned.devices: Unmounting disk 'WDC_WD20EFRX-blabla'...
May  9 08:44:27 Unraid-1 unassigned.devices: Unmounting '/dev/sdg1'.
May  9 08:44:27 Unraid-1 unassigned.devices: Unmount cmd: /sbin/umount '/dev/sdg1' 2>&1
May  9 08:44:27 Unraid-1 unassigned.devices: Unmount of '/dev/sdg1' failed: 'umount: /mnt/disks/WDC_WD20EFRX-blabla: target is busy. '
May  9 08:44:27 Unraid-1 unassigned.devices: Disk 'WDC_WD20EFRX-blabla' cannot be unmounted.

 

If i am using a single script only for umount, the unmount works fine.

 

I tried this as an User Script and as an UD Script.

Link to post
  • Replies 6k
  • 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

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

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

Posted Images

19 minutes ago, sonic6 said:

If i am using a single script only for umount, the unmount works fine.

I think this is because my script writes the terminal output to the target and as long the script is running, this can't be stopped. This is sometimes what I will change in the next version.

 

Until then you could try to save it as a script and execute it by a different one:

#!/bin/bash
/mnt/user/sharename/backup.sh
umount blabla

 

Link to post
3 minutes ago, mgutt said:

Until then you could try to save it as a script and execute it by a different one:

You mean i run a scipt where i mount, call an own backup script from inside this script, and then umount?

Link to post
2 hours ago, sonic6 said:

hm... i dont know why, but i can't get the unmount work inside a backup script.

 

You need to sync before you unmount:

sync -f /mnt/disks/mountpoint

 

This will commit all writes to the disk.

Link to post

I have successfully mounted a drive using "Unassigned Devices", which I can see and read from, but when trying to copy files to that drive I now get errors from windows telling me the drive is "write protected". I have ensured "read only" is not checked and have tried both authenticated SMB mode as well as public settings, both of which still result in the same error. Any assistance is greatly appreciated!

Link to post
Posted (edited)
On 5/6/2021 at 6:53 PM, monarc said:

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.

 

Is anyone experiencing the same issue with encrypted UAD drives or maybe does someone has an idea what is causing this issue?

Edited by monarc
Link to post
5 hours ago, Wicked_Chicken said:

I have successfully mounted a drive using "Unassigned Devices", which I can see and read from, but when trying to copy files to that drive I now get errors from windows telling me the drive is "write protected". I have ensured "read only" is not checked and have tried both authenticated SMB mode as well as public settings, both of which still result in the same error. Any assistance is greatly appreciated!

Post diagnostics.

Link to post
11 minutes ago, monarc said:

 

Is anyone experiencing the same issue with encrypted UAD drives or maybe does someone has an idea what is causing this issue?

Working fine for me.  Post diagnostics.

Link to post
On 5/5/2021 at 3:22 AM, hawihoney said:

UD does not leave "Format" State for a passed through disk after the rebuilt of this disk finishes in the VM.

 

Let me explain:

 

Several disks are passed through to an Unraid VM. These disks are marked as passed through within UD. One of the passed through disks had to be replaced within the VM. During the rebuild within the VM, UD did show the "Format" button for this passed through disk. Everythings fine until here.

 

Now the disk is successfully rebuilt within the VM and the VM is working as usual.

 

UD still shows the "Format" button and no plus sign (for the partition).

 

Please have a look at the attached screenshot. The disk is formatted (rebuild), working and is written to. But UD still shows no + sign (for the partition) and still shows the Format text.

 

Thanks for listening.

 

 

 

Clipboard01.jpg

In the latest update to UD, disks that are passed through will show as "Passed".  If you format a disk in a VM, you can refresh the UD status by clicking on the double arrow icon in the upper right of the UD page and a udev update for all disks will be initiated.  This will bring UD up to date on all disks and UD will then show any changes made outside UD.

Link to post
23 minutes ago, monarc said:

This is the problem I think:

May  6 18:16:57 Unraid unassigned.devices: Adding disk '/dev/mapper/Intenso_External_USB_3.0'...
May  6 18:16:59 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  6 18:16:59 Unraid kernel: /dev/mapper/Intenso_External_USB_3.0: Can't open blockdev
May  6 18:16:59 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  6 18:16:59 Unraid unassigned.devices: Partition 'Intenso External_USB_3.0' cannot be mounted.

I'm not sure what is causing the issue with the blockdev.  Maybe @JorgeB can offer some assistance as this appears to be a disk issue.

Link to post
1 hour ago, dlandon said:

Maybe @JorgeB can offer some assistance as this appears to be a disk issue.

Doesn't look like a disk problem to me, it was mounting before with unencrypted xfs:

 

May  6 18:35:28 Unraid unassigned.devices: Adding disk '/dev/sda1'...
May  6 18:35:28 Unraid unassigned.devices: Mount drive command: /sbin/mount -t xfs -o rw,noatime,nodiratime '/dev/sda1' '/mnt/disks/Intenso_External_USB_3.0'
May  6 18:35:28 Unraid kernel: XFS (sda1): Mounting V5 Filesystem
May  6 18:35:29 Unraid kernel: XFS (sda1): Ending clean mount

 

Then it didn't mount with encrypted xfs, does it still work if you reformat without encryption?

 

 

Link to post
15 minutes ago, JorgeB said:

Then it didn't mount with encrypted xfs, does it still work if you reformat without encryption?

 

Mounting it without encryption works flawless. This is my workaround for now, but I really would like to have the disk encrypted.

Link to post
1 hour ago, monarc said:

Mounting it without encryption works flawless. This is my workaround for now, but I really would like to have the disk encrypted.

Then looks like some issue with UD and/or encryption, can't help with that.

Link to post
4 hours ago, monarc said:

 

Mounting it without encryption works flawless. This is my workaround for now, but I really would like to have the disk encrypted.

Try a reboot.

Link to post
2 minutes ago, dlandon said:

Try a reboot.

 

Had the same idea and already rebooted. Later I will try to format the external with encrypted XFS again. I'll keep you all posted.

Link to post

I have a DAS device Terra-master (D5-300) connected by a usb-c  to my unraid through unassigned devices

its an raid 5 with two btrfs-luks partitions and can be accessed just fine.

the problem is that when I start a file transfer to the DAS and after some times ( ~ 1 hour) all the DAS's HDs LED and FANS goes OFF ( as it goes to sleep mode) while the files transfer continues normally, which leads to temperature rise of the HDs due to FANS are off.

I already contacted manufacturer and after some emails back and forth they confirm that the device is absolutely fine !

so I start to think it may be some settings not right within  unassigned devices that trigger this issue.

I have also noticed an icon next to the first partition which I am not sure what it is (see screenshot)

any help is appreciated

das.thumb.jpg.a42028364099ca498f8762deae6d0cc7.jpg

Link to post
2 hours ago, monarc said:

 

Had the same idea and already rebooted. Later I will try to format the external with encrypted XFS again. I'll keep you all posted.

 

Same issue even after the reboot 😒

 

May 11 21:34:35 Unraid unassigned.devices: Adding disk '/dev/mapper/Test'...
May 11 21:34:37 Unraid unassigned.devices: Mount drive command: /sbin/mount -o rw,noatime,nodiratime '/dev/mapper/Test' '/mnt/disks/Test'
May 11 21:34:37 Unraid kernel: /dev/mapper/Test: Can't open blockdev
May 11 21:34:37 Unraid unassigned.devices: Mount of '/dev/mapper/Test' failed: 'mount: /mnt/disks/Test: special device /dev/mapper/Test does not exist. '
May 11 21:34:37 Unraid unassigned.devices: Partition 'Test' cannot be mounted.

 

image.thumb.png.9e939ded6b45965c057fb7a20652c21c.png

Link to post
4 hours ago, hamad said:

so I start to think it may be some settings not right within  unassigned devices that trigger this issue.

The disk ball indicates that UD thinks the drive is spinning (not sleeping).  It looks like your device is setting the sleep mode on its own.

 

5 hours ago, hamad said:

I have also noticed an icon next to the first partition which I am not sure what it is (see screenshot)

Hover you mouse over the icon and a tool tip will tell you what it does.

Link to post
3 hours ago, monarc said:

 

Same issue even after the reboot 😒

 


May 11 21:34:35 Unraid unassigned.devices: Adding disk '/dev/mapper/Test'...
May 11 21:34:37 Unraid unassigned.devices: Mount drive command: /sbin/mount -o rw,noatime,nodiratime '/dev/mapper/Test' '/mnt/disks/Test'
May 11 21:34:37 Unraid kernel: /dev/mapper/Test: Can't open blockdev
May 11 21:34:37 Unraid unassigned.devices: Mount of '/dev/mapper/Test' failed: 'mount: /mnt/disks/Test: special device /dev/mapper/Test does not exist. '
May 11 21:34:37 Unraid unassigned.devices: Partition 'Test' cannot be mounted.

 

image.thumb.png.9e939ded6b45965c057fb7a20652c21c.png

Post diagnostics again.

Link to post

N00b question here.  I've got a Plex Server Docker running smoothly, and I thought I'd share some music on my Windows desktop with Plex.  I've set up a local Windows account called "plex" that has read permissions.  Via the UD web UI, I can click through the Add Remote SMB share dialogs and pick and select the share.  When I click on the orange "mount" button, it blinks grey, then goes back to orange.  I never see the mount  name under /mnt/remotes/.  Ideas appreciated.  I'm sure I'm missing something basic.

image.png

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.