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


Recommended Posts

4 hours ago, dlandon said:

Are you accessing the remote share through the local mount point?

Yes. And it works fine when the mount command is done manually by me instead of the automated mount with the plugin.

That is the point of mounting the share locally (it is being used by my nextcloud docker container).

And it needs the modes to be 0770 otherwise it won't work.

But you haven't answered the question yet :D

How can I do that manual mount automatically? 

Link to comment
1 hour ago, comet424 said:

@dlandonso my preclear finally finished... so i did a re do of the 3 cycles   i  did a reboot.. and came back on  there was no resume

here is the sys log hopefully finds out why   and on my back up server its 6.12.2

syslog-20230709-110917.txt 227.6 kB · 0 downloads

Preclear paused two disks when it shut down:

Jul  9 11:09:08 backupserver unassigned.devices: Unmounting All Devices...
Jul  9 11:09:08 backupserver preclear.disk: Pausing preclear of disk 'sdc'
Jul  9 11:09:08 backupserver preclear.disk: Pausing preclear of disk 'sde'

Were these the disks being precleared at the time of the shutdown?

Link to comment
28 minutes ago, Natrim said:

Yes. And it works fine when the mount command is done manually by me instead of the automated mount with the plugin.

Yes, you can mount the remote share manually with different paramaters on the mount command, but that's not how UD mounts the remote shares.

30 minutes ago, Natrim said:

That is the point of mounting the share locally (it is being used by my nextcloud docker container).

And it needs the modes to be 0770 otherwise it won't work.

Create a folder on the remote share for NextCloud and it can control the permissions it needs, or you can set the folder permissions manually.

31 minutes ago, Natrim said:

But you haven't answered the question yet :D

How can I do that manual mount automatically? 

I did answer this:

21 hours ago, dlandon said:

There is no way for you to control the mount permissions.

 

Link to comment

@dlandon  ya  i did what you asked to do but i re did it after they finished there preclears incase i couldnt resume again

 

so what i did was a i chose preclear on both drives   i set them to 3 cycles

then i did a reboot..  

i re checked the resume isnt there  wanted to restart ... and then i send you the syslog you wanted.. from me having started that sys log server

Link to comment
1 hour ago, dlandon said:

Yes, you can mount the remote share manually with different paramaters on the mount command, but that's not how UD mounts the remote shares.

Create a folder on the remote share for NextCloud and it can control the permissions it needs, or you can set the folder permissions manually.

I did answer this:

 

Thanks for taking the time to answer.

Unfortunately, is not helpful :(

Is there any documentation on how the plugin works and how it does mount shares? and probably provide parameters? Or is this maybe something that can be implemented as an option?

Is there a git repository for the plugin publicly available where I or others can check the code and maybe add that functionality?

Thanks.

Link to comment
5 hours ago, Benni-chan said:

rootshares don't work with exlusive shares active.

the rootshare won't follow the symlinks used for exclusive shares

 

would it be possible, to add these lines to the smb config for root shares, if exclusive shares are enabled?

follow symlinks = yes
wide links = yes

 

I'll look into it.

Link to comment

@dlandon  i remember you mentioned when i said a while ago  if i unplug ntfs drive from windows it gets errors reason the errors shows up in rsync  for my UD drives...  but i also do  remove drive safetly.. or i shut down windows with the usb drives plugged in  but if i plug into unraid afterwards  and try to rsync to the drives... they get errors.   

 

so my question is...  since i gotta run check disk on the usb drive in windows

 

my question is is there a unraid/linux script  so when i plug my ud drives in  that the script will run a windows style check disk and correct the errors each time i click the mount button....

 

 

and my 2nd question is

 

on my main server i reinstalled plugins etc..  i dunno  how to get back the UD attachment under VMS  at the bottom of the VM page 

 

and my USB Manager i used to be able to mount a USB drive attach to a VM  but i no longer cant..  keeps saying Mounted to Unraid even though its not mounted...  

 

 

and the Passthrough  when do can i use that is that so i can pass through the HD to a VM   reason i wanted to know for undapting nvmes firmware   instead of taking it out of the server and shoving into a windows machine.. to try to see if there is an update

 

Link to comment
6 hours ago, Benni-chan said:

rootshares don't work with exlusive shares active.

the rootshare won't follow the symlinks used for exclusive shares

 

would it be possible, to add these lines to the smb config for root shares, if exclusive shares are enabled?

follow symlinks = yes
wide links = yes

 

Those are set at the global level.  What issues are you having with exclusive shares in the rootshare?

Link to comment
7 minutes ago, dlandon said:

Those are set at the global level.  What issues are you having with exclusive shares in the rootshare?

maybe it hasn't to do with the samba share but how UD mounts the rootshare.

 

using the UD rootshare, any exclusive share is missing. using my own rootshare defined in smb-extra, it worked (but I use /mnt/user directly)

 

I just checked the mount under /mnt/rootshare/ and I can't go to any exclusive share in there.

 

attached is a screenshot from both exclusive shares, once listed in the rootshare folder and once in /mnt/user.

inside the rootshare folder any symlink is displayed red and not working.

 

rootshare_mount.png

Link to comment
23 minutes ago, comet424 said:

i remember you mentioned when i said a while ago  if i unplug ntfs drive from windows it gets errors reason the errors shows up in rsync  for my UD drives...  but i also do  remove drive safetly.. or i shut down windows with the usb drives plugged in  but if i plug into unraid afterwards  and try to rsync to the drives... they get errors.   

I think what I was trying to say is be sure the disk is unmounted properly in UD before unplugging it.

 

25 minutes ago, comet424 said:

my question is is there a unraid/linux script  so when i plug my ud drives in  that the script will run a windows style check disk and correct the errors each time i click the mount button....

There is an icon on the UD page to do a disk check.  I don't think it is a good idea to do it when the disk is plugged in.

 

27 minutes ago, comet424 said:

on my main server i reinstalled plugins etc..  i dunno  how to get back the UD attachment under VMS  at the bottom of the VM page 

That sounds like the Libvirt Hotplug Plugin is not installed.

 

27 minutes ago, comet424 said:

and my USB Manager i used to be able to mount a USB drive attach to a VM  but i no longer cant..  keeps saying Mounted to Unraid even though its not mounted...  

Post this issue on the USB Manager plugin forum.

 

28 minutes ago, comet424 said:

and the Passthrough  when do can i use that is that so i can pass through the HD to a VM   reason i wanted to know for undapting nvmes firmware   instead of taking it out of the server and shoving into a windows machine.. to try to see if there is an update

You can set the disk passed through in UD and then attach it to your VM.  Having it set passed throuogh will prevent any operations with UD.

Link to comment
5 minutes ago, Benni-chan said:

attached is a screenshot from both exclusive shares, once listed in the rootshare folder and once in /mnt/user.

inside the rootshare folder any symlink is displayed red and not working.

I just ran a test and see the issue also.  The global settings should apply to rootshares, but it doesn't appear it does.  I'll do some more testing.

Link to comment

@dlandon

ah ok.. thats probably one of them

ya what i always do is 

unmount and then try to power down drive  icon  and then unplug    but i find everytime i use windows  and power down.. and then when i plug back into unraid  where it automounts for me and when  i run my rsync scrip to copy files off the array  the drive is corrupted  so it wont copy the files over till i shove back in a windows VM in past or a Windows machine and you goto properties and do the check.. to fix any errors   and then i can shove back into unraid and then re run rsync

 

so what i wanted is..  i plug in my music drives   then the UD automounts and then  i wanted it to do a windows Check repair style version  before  it runs the rsync  to copy from the array  to the ud  drives

 

 

Link to comment
3 hours ago, Benni-chan said:

 

attached is a screenshot from both exclusive shares, once listed in the rootshare folder and once in /mnt/user.

inside the rootshare folder any symlink is displayed red and not working.

The rootshare is a bind mount and symlinks don't work in a bind mount.

Link to comment

Thanks for this plugin. I think/hope it is exactly what I need, unfortunately though it seems I am not doing something(s?) right. I want to mount a root share on one unraid box on another box but I havent been able to mount either on the other (if that makes sense). I think I was able to create a rootshare on both but when I go to the other and try to mount smb rootshare is never an option. I tried looking at the diag and am apparently getting two different errors; one box (tower) says:

Jul 12 10:14:05 Tower unassigned.devices: Mounting Remote Share '//TINYTOWER/rootshare'...
Jul 12 10:14:05 Tower unassigned.devices: Mount SMB share '//TINYTOWER/rootshare' using SMB default protocol.
Jul 12 10:14:05 Tower unassigned.devices: Mount SMB command: /sbin/mount -t 'cifs' -o rw,noserverino,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=99,gid=100,credentials='/tmp/unassigned.devices/credentials_rootshare' '//TINYTOWER/rootshare' '/mnt/remotes/TINYTOWER_rootshare'
Jul 12 10:14:05 Tower kernel: CIFS: Attempting to mount \\TINYTOWER\rootshare
Jul 12 10:14:05 Tower kernel: CIFS: VFS: \\TINYTOWER failed to connect to IPC (rc=-13)
Jul 12 10:14:05 Tower kernel: CIFS: VFS: cifs_mount failed w/return code = -13
Jul 12 10:14:05 Tower unassigned.devices: Share '//TINYTOWER/rootshare' failed to mount.

 

and tinytower says:

Jul 12 17:53:55 tinytower unassigned.devices: Mount SMB share '//TOWER//Tower/rootshare' using SMB 1.0 protocol.
Jul 12 17:53:55 tinytower unassigned.devices: Mount SMB command: /sbin/mount -t 'cifs' -o rw,noserverino,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=99,gid=100,vers=1.0,credentials='/tmp/unassigned.devices/credentials_rootshare' '//TOWER//Tower/rootshare' '/mnt/remotes/TOWER_rootshare'
Jul 12 17:53:55 tinytower kernel: Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers
Jul 12 17:53:55 tinytower kernel: 
Jul 12 17:53:55 tinytower kernel: CIFS: VFS: Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers
Jul 12 17:53:55 tinytower kernel: CIFS: Attempting to mount \\TOWER\
Jul 12 17:53:55 tinytower kernel: CIFS: VFS: cifs_mount failed w/return code = -95
Jul 12 17:53:55 tinytower unassigned.devices: SMB 1.0 mount failed: 'mount error(95): Operation not supported Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg) '.
Jul 12 17:53:55 tinytower unassigned.devices: Share '//TOWER//Tower/rootshare' failed to mount. 

 

I am not sure about the tower error but it seems the tinytower error is about the version of smb its using? (didnt see an option to change the version being used in settings samba?)

 

am quite lost...

Link to comment
56 minutes ago, Stumpy said:

I want to mount a root share on one unraid box on another box but I havent been able to mount either on the other (if that makes sense). I think I was able to create a rootshare on both but when I go to the other and try to mount smb rootshare is never an option.

Use these steps:

  • Create the root share on your local machine.  Name it a unique name.
  • Click on the gear icon in the upper right of the UD page.  That is the UD settings.  Set SMB sHaring to how you want UD devices shared with SMB.  Choose either "Private" or "Private Hidden".  I don't recommend "Public" for security reasons, especially when using a root share.
  • Click on the three gear icon by the root share device and set the "Share" switch on.
  • Mount your rootshare.
  • You should be able to see the root share when browsing with a PC.
  • Go to the other server and add a SMB device.  Let UD search the servers, and then choose the server.
  • Enter Credentials and then let UD search for the shares.
  • Choose the root share and it should then be mountable.

You will potentially have an issue with auto mounting your root shares.  Each server has to be on-line when the other wants to auto mount the other root share.

 

Why are you cross sharing rootshares?  I assume you're on a LAN?  Just set both to share their rootshares and browse to them.  If you are doing this across the Internet, you'll have issues with Internet hiccups.  CIFS does not handle networking drops/errors very well.

  • Like 1
Link to comment

New to Unraid and Unassigned Device plug in. I want to move an external USB drive (Unassigned) to an internal bay (remaining Unassigned) as I am moving to a larger pc case. If I unmount the drive, do the move and restart Unraid, will the drive still be recognized or will I need to start from scratch with it.

Link to comment
48 minutes ago, azflyer19 said:

New to Unraid and Unassigned Device plug in. I want to move an external USB drive (Unassigned) to an internal bay (remaining Unassigned) as I am moving to a larger pc case. If I unmount the drive, do the move and restart Unraid, will the drive still be recognized or will I need to start from scratch with it.

It will be recognized.

Link to comment

I have a sun oracle f80 pcie ssd that UD (I think) is constantly trying to spin down.

 

Jul 13 21:06:08 trantor emhttpd: spinning down /dev/sdz
Jul 13 21:06:08 trantor emhttpd: spinning down /dev/sdaa
Jul 13 21:06:08 trantor emhttpd: spinning down /dev/sdx
Jul 13 21:06:10 trantor emhttpd: spinning down /dev/sdy

 

(The above is repeated every 45 minutes)

 

The drives are formatted using btrfs (not through UD).

sun oracle f80.PNG

Link to comment
7 hours ago, srirams said:

I have a sun oracle f80 pcie ssd that UD (I think) is constantly trying to spin down.

 

Jul 13 21:06:08 trantor emhttpd: spinning down /dev/sdz
Jul 13 21:06:08 trantor emhttpd: spinning down /dev/sdaa
Jul 13 21:06:08 trantor emhttpd: spinning down /dev/sdx
Jul 13 21:06:10 trantor emhttpd: spinning down /dev/sdy

 

(The above is repeated every 45 minutes)

 

The drives are formatted using btrfs (not through UD).

sun oracle f80.PNG

UD disks are spun down according to the disk spin down time for the Unraid server.  It looks like you have that timer set to 45 minutes.

 

You can set the disk spin down for the server to never spin down and then set the spin down on each disk.

 

If those disks are formatted, Linux is not detecting a file system.  I would also mark the UD disks as passed through so no UD operations will occur on them.  You wouldn't want to accidentily format a disk.

Link to comment

so i found a way to fix ntfs in unraid.. but its not working right i added in my  UD script of the hard drives

so once it mounts  the drive it will run the repair of ntfs

 

 

i did  

ntfsfix /dev/disk/by-id/ata-WDC_WD6003FFBX-68MU3N0_V9J4LJ1L

 

well it didnt like that 

Mounting volume... NTFS signature is missing.
FAILED
Attempting to correct errors... NTFS signature is missing.
FAILED
Failed to startup volume: Invalid argument
NTFS signature is missing.
Trying the alternate boot sector
Unrecoverable error
Volume is corrupt. You should run chkdsk.

 

so i did 

ntfsfix /dev/sdo1

and it did some stuff but it didnt work as i tried to copy to the drive and got errors  so i re ran the above and then told me it cant fix it

root@Tardis:~# ntfsfix /dev/sdo1
Mounting volume... The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
FAILED
Attempting to correct errors... 
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sdo1 was processed successfully.
root@Tardis:~# ls /dev
aer_inject       full          loop0    md3      nvme0n1    rtc@  sdf   sdl   sg0   sg4      tpmrm0  tty18  tty29  tty4   tty50  tty61    vcs2   vcsu         zero
block/           fuse          loop1    md4      nvme0n1p1  rtc0  sdf1  sdl1  sg1   sg5      tty     tty19  tty3   tty40  tty51  tty62    vcs3   vcsu1
bsg/             hidraw0       loop2    md5      nvme1      sda   sdg   sdm   sg10  sg6      tty0    tty2   tty30  tty41  tty52  tty63    vcs4   vcsu2
btrfs-control    hidraw1       loop3    mem      nvme1n1    sda1  sdg1  sdm1  sg11  sg7      tty1    tty20  tty31  tty42  tty53  tty7     vcs5   vcsu3
bus/             hpet          loop4    mouse@   nvme1n1p1  sdb   sdh   sdn   sg12  sg8      tty10   tty21  tty32  tty43  tty54  tty8     vcs6   vcsu4
char/            hwrng         loop5    mpt2ctl  port       sdb1  sdh1  sdn1  sg13  sg9      tty11   tty22  tty33  tty44  tty55  tty9     vcsa   vcsu5
console          initctl|      loop6    mpt3ctl  ppp        sdc   sdi   sdo   sg14  shm/     tty12   tty23  tty34  tty45  tty56  ttyS0    vcsa1  vcsu6
core@            input/        loop7    net/     pps0       sdc1  sdi1  sdo1  sg15  snd/     tty13   tty24  tty35  tty46  tty57  uinput   vcsa2  vfio/
cpu/             kmsg          mapper/  ng0n1    ptmx       sdd   sdj   sdp   sg16  stderr@  tty14   tty25  tty36  tty47  tty58  urandom  vcsa3  vga_arbiter
cpu_dma_latency  kvm           mcelog   ng1n1    ptp0       sdd1  sdj1  sdp1  sg17  stdin@   tty15   tty26  tty37  tty48  tty59  usb/     vcsa4  vhci
disk/            log=          md1      null     pts/       sde   sdk   sdq   sg2   stdout@  tty16   tty27  tty38  tty49  tty6   vcs      vcsa5  vhost-net
fd@              loop-control  md2      nvme0    random     sde1  sdk1  sdq1  sg3   tpm0     tty17   tty28  tty39  tty5   tty60  vcs1     vcsa6  xconsole|
root@Tardis:~# ntfsfix /dev/sdo1
Refusing to operate on read-write mounted device /dev/sdo1.
root@Tardis:~# ntfsfix /dev/sdo1
Refusing to operate on read-write mounted device /dev/sdo1.
root@Tardis:~# ^C

 

 

 

so what i trying to do is 

Mount the Drive

Run a Windows Check Disk Equvalant  i figured NTFSFIX

and then it can copy

 

and i went by byid   as by dev/sdo1  is going to change each time you plug the drive in...  

 

and i not sure if i should post in here or the main general

Link to comment
7 minutes ago, comet424 said:

so i found a way to fix ntfs in unraid.. but its not working right i added in my  UD script of the hard drives

so once it mounts  the drive it will run the repair of ntfs

You check an ntfs disk when it is unmounted.  It doesn't work after it is mounted.

 

3 minutes ago, comet424 said:
ntfsfix /dev/sdo1

Correct.  You can't use the hard coded sdX because it changes on boot.

 

In the UD script use this because it will adjust for 'sdX' changing:

 

netsfix -n $DEVICE

The '-n' does a repair.

 

But you are caught in a catch 22, because the UD script is executed after the disk is mounted, so it is too late to check the disk.

Link to comment

ok ill try the 

ntfsfix /dev/disk/by-id/ata-WDC_WD6003FFBX-68MU3N0_V9J4LJ1L

 

while unmounted..

 

so i confused..  why cant you run a ntfsfix   while mounted?   if you were in windows  its mounted once you plug in and run checkdsk..   how come you cant do the reverse...   i guess id have to edit my user scripts  script

that it would run the ntfsfix  on 3 drives

then mount the drives... then copy the data to the drives ..

all in the same user script  but not sure how you mount a drive from the command line  

 

 

update:

the 

ntfsfix /dev/disk/by-id/ata-WDC_WD6003FFBX-68MU3N0_V9J4LJ1L

 

doesnt work unmounted either  figures lol

 

 

Mounting volume... NTFS signature is missing.
FAILED
Attempting to correct errors... NTFS signature is missing.
FAILED
Failed to startup volume: Invalid argument
NTFS signature is missing.
Trying the alternate boot sector
Unrecoverable error
Volume is corrupt. You should run chkdsk.

 

 

 

 

it tells me to run chkdsk  but i tried in unraid there is no chkdsk...  false advertising i see

 

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

ok ill try the 

ntfsfix /dev/disk/by-id/ata-WDC_WD6003FFBX-68MU3N0_V9J4LJ1L

 

while unmounted..

 

so i confused..  why cant you run a ntfsfix   while mounted?   if you were in windows  its mounted once you plug in and run checkdsk..   how come you cant do the reverse...   i guess id have to edit my user scripts  script

that it would run the ntfsfix  on 3 drives

then mount the drives... then copy the data to the drives ..

all in the same user script  but not sure how you mount a drive from the command line  

 

Linux is different from Windows.  You can't compare them.

 

Go to the UD webpage, click on the Help icon ('?').  Read down in the help and you'll see how to mount a UD device from the command line.

Link to comment

ok sounds good

 

ok so i still cant seem to get it to work

ntfsfix /dev/disk/by-id/ata-WDC_WD6003FFBX-68MU3N0_V9J4LJ1L   while the disk is unmounted.. is there a different way?

 

and why does the error say use chkdsk  is it referencing  windows?  or a plugin  you install  in unraid?

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.