Making Multiple unRAID Servers Appear as One


Recommended Posts

I'm looking to unify shares across 3 unRAID servers and have them appear under the same, single folder to my media players.

 

I have different shared folders on each:

 

Server1:  Action, Childrens and Comedy

Server2:  Crime, Documentary and Drama

Server3:  Period, SciFi, and Thriller

 

Now what I want is to have all these individual shares made available as sub-folders under a single Samba share: "Film"

 

Is it possible to do this somehow?

Link to comment

I don't have one server simply because I don't have enough space for drives.

 

They're HP Microservers, and they can only hold 5 drives each. They're really cheap, really good and really compact.

 

I have 15 drives across the 3 servers. 32TB of storage in all.

 

I also like the fact this solution gives me more redundancy as I have 3 parity drives across the set.

 

(Another nice-to-have would be support for multiple parity drives in a single, high capacity unRAID box).

 

It just seems most logical to distribute the video images (DVD and Blu-Ray .ISO files) across the boxes by genre.

 

It would  be great if I could use one of the unRAID boxes as a 'share master' and be able to configure a virtual directory structure to front all the folders across multiple servers.

 

Something like:

 

Video -

              Film -

                            Action -      (Actual share = FilmAction)

                            Comedy -  (Actual share = FilmComedy)

                            Drama -      (Actual share = FilmDrama)

                            etc...

              TV -

                            Action -    (Actual share = TVAction)

                            Comedy -  (Actual share = TVComedy)

                            Drama -    (Actual share = TVDrama)

                            etc...

 

 

Where the individual genres/categories are separate shares on unRAID.

 

I could do this with Microsoft DFS, but I don't have Windows 2008 server.

 

Link to comment

you can try CIFS/SMB mounting 2 servers on the third server.

 

This question has come up before. I believe that if you create a mount point on an existing array disk and mount an external disk there, that that directory will behave like any old subdirectory on that array disk from a user shares perspective.  Heck you could probably mount the entire user share there and have it act like it was part of the local array.

 

I do not think there is any need to have a third server.

 

Someone with more Linux skills may shoot me down, but I think this would work.

Link to comment

I use:

mount -t cifs -o user=[username],password=[password],sec=ntlm //[your.remote.server.ip.address]/[shareName] [path_where_you_want_to_have_the_mount_created]

 

for example:

mount -t cifs -o user=nmt,password=1234,sec=ntlm //192.168.2.115/Share /mnt/cache/unRAID_Apps/PCH_MasterBedRoom

 

you need to unmount before you can stop and shut down array

 

umount -l /mnt/cache/unRAID_Apps/PCH_MasterBedRoom

 

I created a plugin for this - attached (rename to .plg)

smb_remote.txt

Link to comment
  • 2 weeks later...

OK, so this is what I did in the end. I created a bunch of symlinks to the local share folders on the 'master' UNRAID-01 server, and mounted cifs shares to the shares on the two remote (UNRAID-02 & UNRAID-03) servers.

 

I edited the 'go' file on UNRAID-01 as listed below, and then added a single samba share to the 'smb-extra.conf' file on UNRAID-01 pointing to the local '/mnt/Video' folder, and hey presto - transparent access to all my genre-specific shares across all my unRAID servers from \\UNRAID-01\Video

 

One issue I have is when trying to write to any of the folders on UNRAID-02 or UNRAID-03 via this common folder, I get a permissions error "you must have permission to..." which I'm not sure how to cure. Any ideas?

 

/config/go  (on UNRAID-01):

 

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
#
#DISABLE DSF SHARES
sed -i -e "s/host msdfs = Yes/host msdfs = No/" -e "s/msdfs root = Yes/msdfs root = No/" /etc/samba/smb.conf
smbcontrol smbd reload-config
#
#CREATE FOLDER STRUCTURE TO MOUNT FOREIGN SHARES
mkdir  /mnt/Video
mkdir  /mnt/Video/Film
mkdir  /mnt/Video/TV
mkdir  /mnt/Video/Film/Comedy
mkdir "/mnt/Video/Film/Crime & Thriller"
mkdir "/mnt/Video/Film/Documentary & Bio"
mkdir  /mnt/Video/Film/Drama
mkdir  /mnt/Video/Film/Horror
mkdir  /mnt/Video/Film/Musical
mkdir "/mnt/Video/Film/Period & Historical"
mkdir  /mnt/Video/Film/Romance
mkdir "/mnt/Video/Film/SciFi & Fantasy"
mkdir "/mnt/Video/TV/Crime & Thriller"
#
#CREATE LOCAL SYMLINKS
# - FROM UNRAID-01
ln -s /mnt/user/Film-Action          "/mnt/Video/Film/Action"
ln -s /mnt/user/Film-ChildrensAnime  "/mnt/Video/Film/Childrens & Anime"
ln -s /mnt/user/TV-ChildrensAnime    "/mnt/Video/TV/Childrens & Anime"
#
#MOUNT FOREIGN SHARES
#  - FROM UNRAID-02
mount -t cifs //192.168.1.126/Film-Comedy            -o guest   /mnt/Video/Film/Comedy
mount -t cifs //192.168.1.126/Film-CrimeThriller     -o guest  "/mnt/Video/Film/Crime & Thriller"
mount -t cifs //192.168.1.126/Film-DocumentaryBio    -o guest  "/mnt/Video/Film/Documentary & Bio"
mount -t cifs //192.168.1.126/TV-CrimeThriller       -o guest  "/mnt/Video/TV/Crime & Thriller"
#  - FROM UNRAID-03
mount -t cifs //192.168.1.127/Film-Drama             -o guest   /mnt/Video/Film/Drama
mount -t cifs //192.168.1.127/Film-Horror            -o guest   /mnt/Video/Film/Horror
mount -t cifs //192.168.1.127/Film-Musical           -o guest   /mnt/Video/Film/Musical
mount -t cifs //192.168.1.127/Film-PeriodHistorical  -o guest  "/mnt/Video/Film/Period & Historical"
mount -t cifs //192.168.1.127/Film-Romance           -o guest   /mnt/Video/Film/Romance
mount -t cifs //192.168.1.127/Film-SciFiFantasy      -o guest  "/mnt/Video/Film/SciFi & Fantasy"

 

/config/smb-extra.conf  (on UNRAID-01):

 

[Video]
   path = /mnt/Video
   read only = no
   guest ok = yes

Link to comment

Cool stuff. If you look into automount, allot of these external commands could be simplified with automount configurations.

it takes a bit of work to get it just right, but once it works, the mere access of a file system causes it to be mounted automatically.  When it's idle it can be unmounted.

 

I use it with NFS to access all my hosts in a host oriented tree

 

cd /unraid/mnt/disk1

 

cd /unraid2/mnt/disk2

etc, etc.

 

No reason why it could not work with this cool arrangement of genre divided mounts.

Link to comment

OK, so this is what I did in the end. I created a bunch of symlinks to the local share folders on the 'master' UNRAID-01 server, and mounted cifs shares to the shares on the two remote (UNRAID-02 & UNRAID-03) servers.

 

I edited the 'go' file on UNRAID-01 as listed below, and then added a single samba share to the 'smb-extra.conf' file on UNRAID-01 pointing to the local '/mnt/Video' folder, and hey presto - transparent access to all my genre-specific shares across all my unRAID servers from \\UNRAID-01\Video

 

One issue I have is when trying to write to any of the folders on UNRAID-02 or UNRAID-03 via this common folder, I get a permissions error "you must have permission to..." which I'm not sure how to cure. Any ideas?

 

/config/go  (on UNRAID-01):

 

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
#
#DISABLE DSF SHARES
sed -i -e "s/host msdfs = Yes/host msdfs = No/" -e "s/msdfs root = Yes/msdfs root = No/" /etc/samba/smb.conf
smbcontrol smbd reload-config
#
#CREATE FOLDER STRUCTURE TO MOUNT FOREIGN SHARES
mkdir  /mnt/Video
mkdir  /mnt/Video/Film
mkdir  /mnt/Video/TV
mkdir  /mnt/Video/Film/Comedy
mkdir "/mnt/Video/Film/Crime & Thriller"
mkdir "/mnt/Video/Film/Documentary & Bio"
mkdir  /mnt/Video/Film/Drama
mkdir  /mnt/Video/Film/Horror
mkdir  /mnt/Video/Film/Musical
mkdir "/mnt/Video/Film/Period & Historical"
mkdir  /mnt/Video/Film/Romance
mkdir "/mnt/Video/Film/SciFi & Fantasy"
mkdir "/mnt/Video/TV/Crime & Thriller"
#
#CREATE LOCAL SYMLINKS
# - FROM UNRAID-01
ln -s /mnt/user/Film-Action          "/mnt/Video/Film/Action"
ln -s /mnt/user/Film-ChildrensAnime  "/mnt/Video/Film/Childrens & Anime"
ln -s /mnt/user/TV-ChildrensAnime    "/mnt/Video/TV/Childrens & Anime"
#
#MOUNT FOREIGN SHARES
#  - FROM UNRAID-02
mount -t cifs //192.168.1.126/Film-Comedy            -o guest   /mnt/Video/Film/Comedy
mount -t cifs //192.168.1.126/Film-CrimeThriller     -o guest  "/mnt/Video/Film/Crime & Thriller"
mount -t cifs //192.168.1.126/Film-DocumentaryBio    -o guest  "/mnt/Video/Film/Documentary & Bio"
mount -t cifs //192.168.1.126/TV-CrimeThriller       -o guest  "/mnt/Video/TV/Crime & Thriller"
#  - FROM UNRAID-03
mount -t cifs //192.168.1.127/Film-Drama             -o guest   /mnt/Video/Film/Drama
mount -t cifs //192.168.1.127/Film-Horror            -o guest   /mnt/Video/Film/Horror
mount -t cifs //192.168.1.127/Film-Musical           -o guest   /mnt/Video/Film/Musical
mount -t cifs //192.168.1.127/Film-PeriodHistorical  -o guest  "/mnt/Video/Film/Period & Historical"
mount -t cifs //192.168.1.127/Film-Romance           -o guest   /mnt/Video/Film/Romance
mount -t cifs //192.168.1.127/Film-SciFiFantasy      -o guest  "/mnt/Video/Film/SciFi & Fantasy"

 

/config/smb-extra.conf  (on UNRAID-01):

 

[Video]
   path = /mnt/Video
   read only = no
   guest ok = yes

 

I have seen issues several times with mounting shares via cifs on Linux as a guest user and no write permissions. Either create a user account and grant it access to the shares and place those parameters in your mount or use NFS. NFS will give you better performance and will tolerate network blips and issues than cifs will.

Link to comment
  • 3 years later...

I was doing some research on google and ended here. I couldn't help myself but noticing that there was no resolution on CIFS mount options. I realize that this post is old. But I had encountered a similar issue before. When mounting your CIFS share, you will need to add some parameters.

username=msusername,password=mspassword,uid=ubuntuuser,file_mode=0777,dir_mode=0777

Username => Authorized user on the source server

Password => Password of said user

UID => PAM local user used as the owner

File_mode => File permission of the mount

Dir_mode => Directory permission of the mount

 

If you want to have those on boot, I suggest you add entries in your /etc/fstab

 

Reference : https://wiki.ubuntu.com/MountWindowsSharesPermanently

 

Finally although NFS would provide better performance, SMB will provide you with better security. NFS is usually used when all the NAS are on a separate dedicated network. So that clients will not be able to reach them. And those shares would be then made available via a SMB server that sits between the SAN (Storage Area Network) and the Local LAN to serve the clients.

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