CIFS mount as subfolder

FTP Server, File Server, DDNS, SAMBA, AFP, NFS
Post Reply
mbuette
Starting out
Posts: 13
Joined: Thu Jul 08, 2021 5:29 pm

CIFS mount as subfolder

Post by mbuette »

My TS-431K is about to reach it's limits, so I'm starting to think about how to integrate a 2nd NAS box. I have a share called "Public" which contains the majority of my data (media, software etc.). I'd like to migrate a sub-folder "Public\Archive" to a new NAS but still be able to access it through the TS-431K. In Linux terms: I'd like to mount an external CIFS volume into a shared folder on the TS-431K. I tried the "Hybrid Mount" app but it seems that it always creates a new share \\NAS1\NAS2share and does not support a local mount-point. Any pointers would be greatly appreciated! BTW: I'm not afraid to use a shell, but I'm new to QNAP and e.g. don't really understand my current /etc/fstab...
Thanks in advance!
User avatar
dolbyman
Guru
Posts: 35021
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: CIFS mount as subfolder

Post by dolbyman »

Side question:

instead of buying an additional NAS with additional drives .. why not just expand the existing NAS with larger drives ?
mbuette
Starting out
Posts: 13
Joined: Thu Jul 08, 2021 5:29 pm

Re: CIFS mount as subfolder

Post by mbuette »

Right now, thanks to f*ing HD-based crypto currencies, prices are through the roof. Also the current capacity is 23,6TB according to windows and I really don't want to throw that away. Given current prices of 25€ / TB the drives are valued at around 650€. I have a JBOD with 4, 6 and 2x8 TB drives and replacing the 4 TB with an 8 TB drive would cost around 200 €. For the same price I recently have purchased a TS-431K NAS. Also 4TB is not really obsolete yet and I'd have to spend several days restoring the NAS from backup. I'm a friend of reusing equipment as long as possible...
User avatar
dolbyman
Guru
Posts: 35021
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: CIFS mount as subfolder

Post by dolbyman »

fair enough .. yeah the price increase on larger drives is sadly very annoying
mbuette
Starting out
Posts: 13
Joined: Thu Jul 08, 2021 5:29 pm

Re: CIFS mount as subfolder

Post by mbuette »

Unfortunately it's not just larger drives, I recently had to purchase a 4 TB Seagate Barracuda drive for around 100€ and that's basically highway-robbery ...
Update: I just calculated that if I wanted to double the capacity in my NAS to 4x 12TB Seagate IronWolf it would cost 1.556€.
Even considering that the speed (JBOD vs. Raid 0) would increase significantly, that's a no-go. Especially since my backup would have to increase as well, another 1500+ €...
mbuette
Starting out
Posts: 13
Joined: Thu Jul 08, 2021 5:29 pm

Re: CIFS mount as subfolder

Post by mbuette »

Right now I have an external CIFS share mounted from a host called "HV2" and it represents as:

Code: Select all

//HV2.MyDomain.com/Public/_Archive on /share/external/.nd/0/085edd03c-8ace-406d-8af6-454e305e08e1 type cifs (rw)
But it's not listed in

Code: Select all

/etc/fstab
so how do I get an external CIFS volume into the NAS's fstab? With a normal Linux i would do

Code: Select all

//HV2/Incoming  /media/incoming  cifs  uid=108,gid=116,credentials=/etc/smbsecret.incoming,iocharset=utf8,vers=3.0,noperm,file_mode=0775,dir_mode=0775  0  0
How does this work with QTS=
Mousetick
Experience counts
Posts: 1081
Joined: Thu Aug 24, 2017 10:28 pm

Re: CIFS mount as subfolder

Post by Mousetick »

/etc/fstab is not used on QTS. I've never used HybridMount but isn't there an option to remount the network share at startup?
mbuette
Starting out
Posts: 13
Joined: Thu Jul 08, 2021 5:29 pm

Re: CIFS mount as subfolder

Post by mbuette »

That's not the issue: Hybrid Mount creates a new share on NAS1 for the CIFS folder on NAS2 so you access it as \\NAS1\NAS2-share but I'd like it be \\NAS1\local-share\NAS2-share.
But I got thinking and given that I work in IT / networking I'm maybe overthinking things. If my existing NAS support an expansion unit, I think that's a much simpler way to do it.
Mousetick
Experience counts
Posts: 1081
Joined: Thu Aug 24, 2017 10:28 pm

Re: CIFS mount as subfolder

Post by Mousetick »

Yeah that expansion plan sounds convoluted and quite inefficient.

But anyhow, in theory, assuming the HybridMount mount point doesn't change over time, you can create a symbolic link in the Public shared folder that points to the HybridMount mount point. For this to work you need to enable the option Control Panel > Network & File Services > Win/Mac/NFS > Microsoft Networking > Advanced Options > Allow Symbolic links between different shared folders (it's a security risk). I can't vouch for this solution - I don't use this option, nor do I use HybridMount.
mbuette
Starting out
Posts: 13
Joined: Thu Jul 08, 2021 5:29 pm

Re: CIFS mount as subfolder

Post by mbuette »

Well at first look it seems that expansion units represent as individual units, that is you cannot use drives in the expansion to enlarge volumes in the main NAS. So that's not what I'm looking for either, but that's for another topic to discuss...

Back to the topic at hand: What you described seems to work for now: Install HybridMount, the cross-folder symlink option was already activated and edit the share permissions to give access, the HybridMount share had no permissions for nobody. Then use SSH to run "ln -s". So far so good! :-) As for the mount point changing over time, right now it's mounted using some sort of ID:

Code: Select all

/share/external/.nd/500/0896f24e6-ee53-430d-a84f-451f913b2bf3/
I don't know if this ID changes after a reboot. I'll have to get back to you on that in a couple of days, after I've finished restoring 20TB to the NAS. But it looks like a Windows GUID, so that shouldn't change unless you delete and re-create the share on the destination server.

Also, I'm hitting myself in the head, because this solution is sooo obvious! I guesst with all the fancy GUI-stuff I sometimes forget, that it's still Unix at heart :-)
mbuette
Starting out
Posts: 13
Joined: Thu Jul 08, 2021 5:29 pm

Re: CIFS mount as subfolder

Post by mbuette »

Hybrid mount seems to "survive" a reboot, the ID does not seem to change...
Post Reply

Return to “File Sharing”