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


dlandon

Recommended Posts

11 minutes ago, tr0910 said:

Strange behavior for a 4tb disk converted to xfs-encrypted on a different machine and then plugged in and attempted to mount with UD.  No option to rename the device is given and format is the only option available.  It should present a mount option.  This drive was previously formatted xfs and attached via UD so there is some history that may be confusing things.  However after I have forgotten the historical record of it, still no luck mounting it.

 

I have done this exact same process with other drives and had no issue mounting xfs-encrypted.  What might be wrong with this one?  Relevant logs below?

 


May 5 11:14:08 drChina1 kernel: ata7: hard resetting link
May 5 11:14:09 drChina1 kernel: ata7: SATA link down (SStatus 0 SControl 300)
May 5 11:14:09 drChina1 kernel: ata7: limiting SATA link speed to 1.5 Gbps
May 5 11:14:14 drChina1 kernel: ata7: hard resetting link
May 5 11:14:14 drChina1 kernel: ata7: SATA link down (SStatus 0 SControl 310)
May 5 11:14:14 drChina1 kernel: ata7.00: disabled
May 5 11:14:14 drChina1 kernel: ata7: EH complete
May 5 11:14:14 drChina1 kernel: ata7.00: detaching (SCSI 7:0:0:0)
May 5 11:14:14 drChina1 kernel: sd 7:0:0:0: [sdh] Synchronizing SCSI cache
May 5 11:14:14 drChina1 kernel: sd 7:0:0:0: [sdh] Synchronize Cache(10) failed: Result: hostbyte=0x04 driverbyte=0x00
May 5 11:14:14 drChina1 kernel: sd 7:0:0:0: [sdh] Stopping disk
May 5 11:14:14 drChina1 kernel: sd 7:0:0:0: [sdh] Start/Stop Unit failed: Result: hostbyte=0x04 driverbyte=0x00
May 5 11:14:14 drChina1 rc.diskinfo[9417]: SIGHUP received, forcing refresh of disks info.
May 5 11:14:14 drChina1 rc.diskinfo[9417]: SIGHUP received, forcing refresh of disks info.
May 5 11:18:48 drChina1 kernel: ata7: exception Emask 0x10 SAct 0x0 SErr 0x4040000 action 0xe frozen
May 5 11:18:48 drChina1 kernel: ata7: irq_stat 0x00000040, connection status changed
May 5 11:18:48 drChina1 kernel: ata7: SError: { CommWake DevExch }
May 5 11:18:48 drChina1 kernel: ata7: hard resetting link
May 5 11:18:58 drChina1 kernel: ata7: softreset failed (1st FIS failed)
May 5 11:18:58 drChina1 kernel: ata7: hard resetting link
May 5 11:19:01 drChina1 kernel: ata7: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
May 5 11:19:01 drChina1 kernel: ata7.00: ATA-8: ST4000DM000-1F2168, S30030A6, CC52, max UDMA/133
May 5 11:19:01 drChina1 kernel: ata7.00: 7814037168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
May 5 11:19:01 drChina1 kernel: ata7.00: configured for UDMA/133
May 5 11:19:01 drChina1 kernel: ata7: EH complete
May 5 11:19:01 drChina1 kernel: scsi 7:0:0:0: Direct-Access ATA ST4000DM000-1F21 CC52 PQ: 0 ANSI: 5
May 5 11:19:01 drChina1 kernel: sd 7:0:0:0: Attached scsi generic sg7 type 0
May 5 11:19:01 drChina1 kernel: sd 7:0:0:0: [sdh] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
May 5 11:19:01 drChina1 kernel: sd 7:0:0:0: [sdh] 4096-byte physical blocks
May 5 11:19:01 drChina1 kernel: sd 7:0:0:0: [sdh] Write Protect is off
May 5 11:19:01 drChina1 kernel: sd 7:0:0:0: [sdh] Mode Sense: 00 3a 00 00
May 5 11:19:01 drChina1 kernel: sd 7:0:0:0: [sdh] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
May 5 11:19:01 drChina1 kernel: sd 7:0:0:0: [sdh] Attached SCSI disk
May 5 11:19:01 drChina1 rc.diskinfo[9417]: SIGHUP received, forcing refresh of disks info.
May 5 11:19:01 drChina1 rc.diskinfo[9417]: PHP Warning: Use of undefined constant ID_MODEL - assumed 'ID_MODEL' (this will throw an Error in a future version of PHP) in /etc/rc.d/rc.diskinfo on line 470
May 5 11:19:01 drChina1 rc.diskinfo[9417]: PHP Warning: Use of undefined constant SERIAL_SHORT - assumed 'SERIAL_SHORT' (this will throw an Error in a future version of PHP) in /etc/rc.d/rc.diskinfo on line 470

 

Looks like connection issue.

Link to comment
On 5/5/2018 at 6:49 PM, dlandon said:

These log entries indicate a hardware problem and have nothing to do with the format of the drive.  Post your diagnostics for further help.

Actually the hardware failures are me hot-plugging the drive in and out hoping for it to be properly recognized.  Since that never worked, I rebooted cleanly, and still the xfs-encrypted disk ST4000DM000-1F2168_S30030A6 is not showing up as mountable.  Notice that the SAMSUNG_HD203WI_S1UYJ1YZ601695 is also xfs-encrypted and has no problems mounting via UD.  Something is weird with the 4tb Seagate.  I hoped a reboot would clean up the problems, but it still is stuck with only a format option showing.

 

What should I try next?  (see diagnostics attached for both server conditions, before and after reboot)

drchina1-diagnostics-20180506-1442.zip

drchina1-diagnostics-20180506-2047.zip

Edited by tr0910
Link to comment

I am running a script to mount and unmount a drive in UAD via User Scripts before and after it copies files.

#!/bin/bash

/usr/local/sbin/rc.unassigned mount /dev/sdg

rclone copy -v  /mnt/user/backup /mnt/disks/My_Passport/BU

/usr/local/sbin/rc.unassigned umount /dev/sdg

When I first wrote the script the /dev/sdg was a USB HDD, but then I started having an Array Undefined issues after a while.  I then realized the device designator for the USB HDD is no longer /dev/sdg but changed to /dev/sda, and /dev/sdg is now one of the disks in my array.  Is there a way to query what the Device Designator is for the USB HDD prior to mounting so that it mount/unmounts the USB HDD? Or mount it by it's SERIAL # as shown in the sample scripts?

Edited by kimocal
SERIAL
Link to comment
4 hours ago, kimocal said:

I am running a script to mount and unmount a drive in UAD via User Scripts before and after it copies files.


#!/bin/bash

/usr/local/sbin/rc.unassigned mount /dev/sdg

rclone copy -v  /mnt/user/backup /mnt/disks/My_Passport/BU

/usr/local/sbin/rc.unassigned umount /dev/sdg

When I first wrote the script the /dev/sdg was a USB HDD, but then I started having an Array Undefined issues after a while.  I then realized the device designator for the USB HDD is no longer /dev/sdg but changed to /dev/sda, and /dev/sdg is now one of the disks in my array.  Is there a way to query what the Device Designator is for the USB HDD prior to mounting so that it mount/unmounts the USB HDD? Or mount it by it's SERIAL # as shown in the sample scripts?

Load the default script then look at the comments in the script.  There is an environment variable that will give you the information you need.

Link to comment
7 hours ago, dlandon said:

Load the default script then look at the comments in the script.  There is an environment variable that will give you the information you need.

 

I tried a couple things and have hacked something together with my limited knowledge.  I'm not a programmer and wasn't sure how to use the environment variables found in the default script in the User Scripts section.  I used info I found on the UnRaid wiki and googling leading to more googling.  This solution seems to be working... so far ?.  I'm learning as I go but maybe someone else may find this approach useful.

 

#!/bin/bash

# DRIVE_DEV lists all disks that have My_Passport in the name (although you can use the disk serial number too)
# ignores the results with part1 in it
# and then outputs the last 3 characters

DRIVE_DEV=$(ls  -l  /dev/disk/by-id/*My_Passport* | grep -v part1 | grep -o '...$')
echo "The HDD is located at " $DRIVE_DEV

# Mount the drive with the built-in UD script
echo "Mounting External HDD"
/usr/local/sbin/rc.unassigned mount /dev/$DRIVE_DEV
echo "External HDD Mounted"

# copy files via rclone to the mounted UD drive 
echo "Starting to copy files via rclone"
rclone copy -v --exclude "*.Squid*" /mnt/user/backup /mnt/disks/My_Passport/BU
echo "rclone process complete"

# UnMount the drive with the built-in UD script
echo "Unmounting External HDD"
/usr/local/sbin/rc.unassigned umount /dev/$DRIVE_DEV
echo "External HDD Unmounted"

 

Edited by kimocal
Link to comment
On 5/6/2018 at 8:58 PM, tr0910 said:

Actually the hardware failures are me hot-plugging the drive in and out hoping for it to be properly recognized.  Since that never worked, I rebooted cleanly, and still the xfs-encrypted disk ST4000DM000-1F2168_S30030A6 is not showing up as mountable.  Notice that the SAMSUNG_HD203WI_S1UYJ1YZ601695 is also xfs-encrypted and has no problems mounting via UD.  Something is weird with the 4tb Seagate.  I hoped a reboot would clean up the problems, but it still is stuck with only a format option showing.

 

What should I try next?  (see diagnostics attached for both server conditions, before and after reboot)

drchina1-diagnostics-20180506-1442.zip

drchina1-diagnostics-20180506-2047.zip

I have taken another 4tb drive that has been previously connected to this server when it was XFS formatted and converted it to an empty XFS-Encrypted disk on another server.  I am getting the same problem with my server not recognizing that it has been previously formatted XFS-Encrypted and wanting to format it again.  This is now 2 drives with this same issue.

 

To troubleshoot, I did a new config on the intended destination server and formatted them xfs-encrypted there as a way to prove beyond a shadow of a doubt what might be wrong.  I then restored the server to its previous configuration and these 2 4tb drives were attached via UD.  This time they worked without issue.

 

In conclusion, sometimes you can format xfs-encrypted on another machine and then mount on the intended server via UD, and sometimes you cannot.  The 2 drives that I was able to do this with were both 2tb.  The 2 that wouldn't work were 4tb drives.  The other thing that might have been a factor was that there were formatted via a USB3 external device.  I did also try and plug the USB3 device into the intended destination server and see if we could mount them that way.  Surprisingly one of the drives showed up as crypto formatted on the USB3 connection, but it still would not mount. 

Link to comment
1 hour ago, tr0910 said:

I have taken another 4tb drive that has been previously connected to this server when it was XFS formatted and converted it to an empty XFS-Encrypted disk on another server.  I am getting the same problem with my server not recognizing that it has been previously formatted XFS-Encrypted and wanting to format it again.  This is now 2 drives with this same issue.

 

To troubleshoot, I did a new config on the intended destination server and formatted them xfs-encrypted there as a way to prove beyond a shadow of a doubt what might be wrong.  I then restored the server to its previous configuration and these 2 4tb drives were attached via UD.  This time they worked without issue.

 

In conclusion, sometimes you can format xfs-encrypted on another machine and then mount on the intended server via UD, and sometimes you cannot.  The 2 drives that I was able to do this with were both 2tb.  The 2 that wouldn't work were 4tb drives.  The other thing that might have been a factor was that there were formatted via a USB3 external device.  I did also try and plug the USB3 device into the intended destination server and see if we could mount them that way.  Surprisingly one of the drives showed up as crypto formatted on the USB3 connection, but it still would not mount. 

The encrypted disk feature of UD is only there to support mounting a disk from the array.  Mounting encrypted disks from other computers is not supported at this time and future support will be a decision LT will have to make and implement in UD once they merge it into unRAID.  I have been asked by LT to not support encrypted drives other than array drives because of the possible loss of data access from a user not having the correct passphrase for the drive.  The encrypted disk support in UD is limited to disks formatted by unRAID and use the array passphrase.

Link to comment
7 minutes ago, dlandon said:

The encrypted disk feature of UD is only there to support mounting a disk from the array.  Mounting encrypted disks from other computers is not supported at this time and future support will be a decision LT will have to make and implement in UD once they merge it into unRAID.  I have been asked by LT to not support encrypted drives other than array drives because of the possible loss of data access from a user not having the correct passphrase for the drive.  The encrypted disk support in UD is limited to disks formatted by unRAID and use the array passphrase.

I use the same keyfile/passphrase on the backup server so that I can mount on the primary server.  The problem is very puzzling and may simply be USB3 related.   Formatting XFS-Encrypted on a backup server is the only convenient way today to add an encrypted drive to UD. 

Link to comment

I have a quick question i noticed that when i connect a new drive it takes a while to detect it and not sure if its my system or maybe a option i can enable for faster detection. I have seed my friends system and his seems to detect drives a lot faster. Any input on this would be greatly appreciated.

Link to comment
  • 2 weeks later...

I have an M.2 nvme drive that is mounted in the go file and resides in Unassigned Devices. I love that I can now see temps and all the work done in this area (thank you for that!). Previously, I got help solving Array and Cache drive temp warning spam on another machine from johnie.black, but the method of clicking into the drive name and setting individually doesn't seem to be available under UD. Specifically there are not any temp or utilization threshold option/textboxes. I'm sure I could probably set this globably in disk settings, but since the drive can regularly run at/around/over 50C, I am not comfortable with the other drives having to get this hot before sending me a notification (not that they do-but incase of an issue).

 

Is there anyway to add this into UD? Or some other way of doing this that I am missing?

 

Link to comment
4 hours ago, ryoko227 said:

Or some other way of doing this that I am missing?

 

A possible way of doing this is changing the general setting which applies to all disks and next change each individual disk in the array/cache to their desired values.

 

  • Upvote 1
Link to comment

I have a 5TB drive I pulled from a used Windows system. The drive was formatted NTFS with a single partition. When I try to bring it up in UD, it says "zfs_member" and won't let me mount it. I have tried using UD to format it in both XFS and NTFS after deleting the partition. It ends up with a single 0b partition and won't let me mount it. It still says zfs_member. I even tried pulling it out and reformatting it in a Windows machine (which worked fine on the Windows box), but when I put it back in my unRaid server, I end up with the same unmountable zfs_member drive.

Link to comment
On 5/22/2018 at 3:25 PM, bonienl said:

 

A possible way of doing this is changing the general setting which applies to all disks and next change each individual disk in the array/cache to their desired values.

 

 

Hmm, *thinking* interesting way to work around it! I'll take a look at that when I get home tonight and let you know how it goes. Thank you for the suggestion!

 

 

EDIT- Seems to have worked out :) Thank you again bonienl!

Edited by ryoko227
Updated
Link to comment
11 hours ago, Jackal24 said:

I have a 5TB drive I pulled from a used Windows system. The drive was formatted NTFS with a single partition. When I try to bring it up in UD, it says "zfs_member" and won't let me mount it. I have tried using UD to format it in both XFS and NTFS after deleting the partition. It ends up with a single 0b partition and won't let me mount it. It still says zfs_member. I even tried pulling it out and reformatting it in a Windows machine (which worked fine on the Windows box), but when I put it back in my unRaid server, I end up with the same unmountable zfs_member drive.

Fixed it. Used the preclear plugin to zero out the drive. I was then able to format and mount it successfully.

Link to comment

Hi, may a dumb question, is it possible to assign a specific value for the disk warnings inside unassigned devices ?

 

background, i added an nvme samsung 950pro as drive for my win 10 vm´s, all working good, just annoying cause temps are always higher

then my default values (45°)

 

now i could set my default up and change all my assigned drives to a lower level, but to me it would make more sence vice vers.

 

thanks ahead for an tip.

 

image.thumb.png.bf9f6d7e4cdb22e8c2844be5e52a4288.png

Link to comment

I have some nfs mounts and on the dashboard, only some of them show the used space correctly. I have a suspicion it might have to do with spaces in mount names. Notice how in the attached screenshot, the ones without spaces show correctly and the ones with spaces don't?

 

Thanks

Capture81.PNG

Link to comment

Hi, I recently changed the security on my windows shares. Previously everyone had read/write/etc access and I was able to mount my shares in unraid without issue using this plugin

 

I've created a single user that has write access to these shares now.

 

domain\user

 

I cannot mount my share using the following info

 

IP/Host: 192.168.1.60

Username: domain\user

Password : password

Share: R

 

I ran into a similar issue using cifs in ubuntu and I had to specify domain=domain in the command or credentials file.

Is there a way to do a domain=xxx in this plugin without using the command line?

 

image.png.82eb3e5544d07ce87dbb247f8a8dca6b.png

 

clicking mount on the R share refreshes the page, but yields the same results

logs:

Jun 1 10:29:23 Tower unassigned.devices: Mount of '//192.168.1.60/R' failed. Error message: mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) 
Jun 1 10:34:40 Tower unassigned.devices: Mount SMB share '//192.168.1.60/R' using SMB1 protocol.

 

Thanks!

Edited by Quiks
Link to comment
  • trurl pinned this topic

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.