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


Recommended Posts

On 9/6/2022 at 12:45 PM, dlandon said:

This command is not a...

Sorry for slow reply, I gave up trying to make my comments and quotes look pretty.

 

I agree on `udisksctl`. We should not consider adding this as it is unnecessary. I only mentioned it as it had a documented caveat that seemed relevant to any similar approach.

 

`If I implement a 'safely_remove' feature it will not be generic in the sense that it will not be done on every unmount.  The user will have to add a 'safely_remove' command, and only USB devices will be operated on.  You can appreciate doing a safe removal on a built in hard disk by accident.  A reboot would be required to restore it.`

 

Can we consider making this a button (or buttons) operation. I had imagined this never being event driven but rather would require a human button action in an identical manner to umount each and every time.

This feels safer to me, allowing users not to press it of they choose (or even need) to do so if there are any edge cases out there. It would also let us add some safety where the button is only available within the correct context i.e. drive is not mounted.

 

The term `safe removal` might be too harsh if we go this route since it implies not pressing would be `unsafe` which we have no proof is actually true. We can discuss terminology if this is agreed.

 

`You can appreciate doing a safe removal on a built in hard disk by accident.  A reboot would be required to restore it.`

I agree that this would be a terrible situation but I expect that since we know `echo 1 > /sys/class/scsi_device/<scsi bus>/device/rescan` can reactivate a device we could create an action to undo this mistake. e.g. https://www.systutorials.com/docs/linux/man/8-rescan-scsi-bus.sh.

 

I say this for two reasons. Whilst I agree with your conclusion about maintaining flash /boot writes is bad I suspect `I'm not sure a re-attach is practical for UD.` could also be covered by this generic scan/undo action without having to maintain a state or action memory.

 

More importantly I would like to made sure hotplug disks are not excluded from this as there is no real need to limit it to USB as long as we can exclude arrays disks and have a scan/undo option.

 

Should we create a new thread on this whole concept and discussions to attract more attention and make it easier to refer back to and google later?

  • Like 1
Link to comment

@NAS This discussion all began with you saying that USB disks would make a noise when spun down.  I asked you to do some testing for me:

On 9/5/2022 at 10:09 AM, dlandon said:

 

Try these commands and see if it stops the spin down noises:

/usr/local/sbin/rc.unassigned spindown devX
echo 'offline' > /sys/block/sdX/device/state
echo '1' > /sys/block/sdX/device/delete

If it makes noises with the spindown command, try the other commands without the spindown.

 

When I tried this it spun down the USB device and then disconnected it from the server.  The only way it could be reconnected was unplugging and then replugging.  I never hear the sounds you are refering to, so I have no idea if this makes a difference.

 

Can you please respond to this post and let me know if it makes a difference?

Link to comment
2 hours ago, mouzzampk said:

Hi, need little help with passed through option. I have passed through enable and I am not exactly sure how to passed through into VM. 

 

image.png.520e28f0a1352bc5bfb07a81b844f5cb.png

All that does in UD is tell UD not to mount or otherwise mess with the disk.  For help on passing through a disk ti a VM, check this Spaceinvader One You Tube video.

 

Link to comment
20 hours ago, dlandon said:

@NAS This discussion all began with you saying that USB disks would make a noise when spun down.  I asked you to do some testing for me:

 

Can you please respond to this post and let me know if it makes a difference?

I can confirm that spinning down a drive before you unpower it reduces or even removes completely the unpleasant noise.

 

This is expected behavior since these noises are caused by the very action of un-powering an actively moving drive. This is not USB specific it is also true of hotplug albeit harder to hear because they are typically within a chassis.

 

I apologize if this was not clear. I started this discussion from a position of already knowing that reducing the power state has this impact. What was not clear is how far "down" we could take them and the best methodology to do this within unRAID.

Link to comment
8 hours ago, NAS said:

I can confirm that spinning down a drive before you unpower it reduces or even removes completely the unpleasant noise.

 

This is expected behavior since these noises are caused by the very action of un-powering an actively moving drive. This is not USB specific it is also true of hotplug albeit harder to hear because they are typically within a chassis.

 

I apologize if this was not clear. I started this discussion from a position of already knowing that reducing the power state has this impact. What was not clear is how far "down" we could take them and the best methodology to do this within unRAID.

I think the latest release of UD will meet your needs.  Please check to see if the changes in the update make a difference in the removal of a disk device for you.

  • Like 1
Link to comment

Hello people!

My apologies in advance but I have been struggling with that issue for a while before deciding to ask for support.

I'm running unraid Version: 6.10.3 with the latest version of UP.

I would like to add two SMB remote shares from two laptops I have as I want to access them from krusader.

  1. One laptop has windows 10 pro, the other windows 10 home.
  2. I have created a local user on the windows 10 pro laptop, and shared with full permission the disk.
  3. The laptop with window 10 home can see the other's disk.
  4. I have tried to add the remote SMB share on unraid without success. I follow every step, try to connect but on the diagnostics it says that the server is offline and the smb share is grayed out.

I don't understand if the only solution is to enable smb1 or if this as nothing to do with my issue.

 

Thanks in advance for who is willing to help to sort this out...

 

Marco

 

 

Edited by Marcco
Link to comment
40 minutes ago, JonathanM said:

Make sure all machines respond to ping from each other.

 

Thanks for the answer, yes! they do, I saw you gave to someone else a similar answer in the past and I checked. From unraid I can ping both laptops from unraid and vice-versa

Link to comment
21 minutes ago, Marcco said:

 

Thanks for the answer, yes! they do, I saw you gave to someone else a similar answer in the past and I checked. From unraid I can ping both laptops from unraid and vice-versa

Are you referencing the remote servers by name or IP address?  If name, try IP address.

Link to comment
1 minute ago, Marcco said:

I was referncing by name. Changed to ip address, it worked. That's great, thank you very much!

Sometimes the name lookup doesn't work well on SMB shares.  I've done a few things to help with this, but I don't understand why sometimes it doesn't work.

Link to comment
16 hours ago, dlandon said:

Sometimes the name lookup doesn't work well on SMB shares.  I've done a few things to help with this, but I don't understand why sometimes it doesn't work.

I still have problems :(

If I may help, after testing different machines I noticed that: on windows 11, I can access the smb share from unraid by simply authorizing my outlook account (xx@hotmail..). Of note, it has a question mark in the password. On windows 10 home I have tried the same, but it did not work (I got green light on the status but the system log said "CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE".  I then created a local account, and as password I used only letters and numbers (mixed capitals), and it worked . ( I have read somewhere that some people experienced issues with question marks etc). In Windows 10 pro I have tried everything but I am unable to make it work. I have tried with my outlook account, with a local user, referencing by name and by ip. 

Link to comment
8 hours ago, Marcco said:

I still have problems :(

If I may help, after testing different machines I noticed that: on windows 11, I can access the smb share from unraid by simply authorizing my outlook account (xx@hotmail..). Of note, it has a question mark in the password. On windows 10 home I have tried the same, but it did not work (I got green light on the status but the system log said "CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE".  I then created a local account, and as password I used only letters and numbers (mixed capitals), and it worked . ( I have read somewhere that some people experienced issues with question marks etc). In Windows 10 pro I have tried everything but I am unable to make it work. I have tried with my outlook account, with a local user, referencing by name and by ip. 

The question mark in credentials is a problem.  Post diagnostics when Windows 10 Pro does not work.

Link to comment

what do i need to do  to get the UD to share...

i know it used to work in the past  but i was trying to use it again but it wont share

 

the share is enabled..  for the NTFS 1TB  drive i have in UD    but it wont show up as a windows share...  is there something new that has to be done extra to get it to share   even reboot doesnt help

Link to comment
32 minutes ago, comet424 said:

what do i need to do  to get the UD to share...

i know it used to work in the past  but i was trying to use it again but it wont share

 

the share is enabled..  for the NTFS 1TB  drive i have in UD    but it wont show up as a windows share...  is there something new that has to be done extra to get it to share   even reboot doesnt help

What do you mean won't share?  Can you see it in the Network?  Post diagnostics.

Link to comment

ya doesnt show  in the Samba shares   so when i access my server  after i share the UD   "transport data"   it doesnt throw it in the SMB shares of the server.. it used to work but i dont remember which ud plugin it worked last on  as i constantly update it

 

 

ive tried  saving a default script  to see if thats what i needed to get it to share.. but wouldnt work either

tardis-diagnostics-20220918-2206.zip

Edited by comet424
Link to comment
1 hour ago, comet424 said:

ive tried also  toggling   share switch  then hitting apply a few times that doesnt help either

Check the "Enable SMB Security?" in UD settings.  The default of "No" does not share at all now.  Check the Help for more information.

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.