manually mounting usb-connected drives (terramaster D5-300 enclosure) and making them available through NFS


Recommended Posts

Hi everyone,

 

I have a Terramaster D5-300 USB enclosure with 5 bays, connected through USB3 Type C with my UNRAID server. In a previous post (linked below), I concluded that the terramaster does not pass the UUID of the devices on to unraid, which makes it virtually impossible to mount the drives as "single drives", which is what I am trying to do.

 

Looking into it a bit more (and because it's really hard to find other enclosures right now where I live), I realized that each drives serial numbers ARE actually passed through but the UUID looks like this:


 

sudo mount UUID=0B340F6C0B340F6C /mnt/sdt
sudo mount UUID=0B3507380B350738 /mnt/sdu
sudo mount UUID=0B35150F0B35150F /mnt/sdv
sudo mount UUID=0B360EF20B360EF2 /mnt/sdw
sudo mount UUID=0B3705760B370576 /mnt/sdx

 

So without using the Unassigned Devices Plugin which can't handle this for some reason, I am able to mount all my drives "manually".

The next step is that I want to make them available as public NFS shares (no security needed). I have hence edited the /etc/exports file as follows:

 

"/mnt/sdt" -async,no_subtree_check,fsid=301 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/sdu" -async,no_subtree_check,fsid=302 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/sdv" -async,no_subtree_check,fsid=303 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/sdw" -async,no_subtree_check,fsid=304 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/sdx" -async,no_subtree_check,fsid=305 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)

 

Note: I manually established the fsid and these ids are not in use by other mounts.

 

Then mounting the shares with

 

exportfs -a

 

Doesn't throw any errors, so I am assuming it works.

 

On the client, I mount the NFS shares in /etc/fstab as follows:

 

192.168.10.8:/mnt/sdt              /mnt/sdt       nfs      defaults    0       0
192.168.10.8:/mnt/sdu              /mnt/sdu       nfs      defaults    0       0
192.168.10.8:/mnt/sdv              /mnt/sdv       nfs      defaults    0       0
192.168.10.8:/mnt/sdw              /mnt/sdw       nfs      defaults    0       0
192.168.10.8:/mnt/sdx              /mnt/sdx       nfs      defaults    0       0

 

Then I run

 

mount -a

 

Again, no errors. On the client, I can now "see" the mounts.

So two questions to the experts please:

 

  1. Is the the right way to do this or will there be any issues down the line with the UD (unassigned devices) plugin? Am I missing anything?
  2. What would I need to do - once this is working on the host - to make this permanent, i.e. surviving a reboot on the host? Both the initial mount as well as the NFS shares..

 

Thanks in advance for your time!

 

The initial post referenced above:
 

 

Edited by theunraidhomeuser
Link to comment
Posted (edited)

Hi everyone, can anybody help me how to make the above changes permanent please?

 

I need to make permanent changes to:

 

/etc/exports

/etf/fstab

 

Thanks!

 

PS:

 

  • to those of you suggesting to use the UD plugin: that won't work (read above).
  • to those of you suggesting to add a user script: please explain how you would do that, I'm not great with bin bash stuff...
  • to those of you suggesting to add to the go file, kindly advise how I can add to both files above the information requoired!

 

Edited by theunraidhomeuser
Link to comment
Posted (edited)
8 minutes ago, jonathanm said:

sdX designations are subject to change on reboot, so don't rely on them.

 

yes, but I am mounting with the UUID of the disks, so it's always consistent.

 

Quote

 

Any changes will need to be scripted, and run either from the go file or using the User Scripts plugin scheduled on array start.

 

you couldn't see my edit to my question (the one you responded to). I added the "PS" section 🙂 but you were faster..

 

Edited by theunraidhomeuser
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.