Union Mount Share Folders

Tell us your most wanted features from QNAP products.
Post Reply
Hyacinth
New here
Posts: 4
Joined: Thu Dec 18, 2014 3:01 am

Can a union mount be created?

Post by Hyacinth »

Hi QNAP Community,

I've been looking high and low for information on using a union mount with a QNAP system. To be clear, this is distinct from folder aggregation, which is a folder that collects other shared folders. A union mount allows the contents of multiple folders to be shared in the same mount (without the original folders being seen). I've had this setup (using UnionFS) on my linux file server for years with much success, but I can't figure out if there is a way through the QNAP interface to set this sort of mount up. Does anyone have any suggestions on how to do this?

Just in case anyone is wondering why this is useful, I will provide an example. I use individual folders to sort video files based on source: Bluray, DVD, PVR, etc. I union mount these folders to create a single folder full of video files. The HTPC SQL database stores the file location as the union mount (//Videos/) instead of a longer path (//Videos/DVD/). If a file gets replaced with a file from a different source (DVD source gets replaced by a Bluray source), no changes to the SQL database are needed, which can be especially useful when replacing a whole season of a TV show. I would like to avoid this little annoyance if possible.

Thanks in advance!
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: Can a union mount be created?

Post by pwilson »

Hyacinth wrote:Hi QNAP Community,

I've been looking high and low for information on using a union mount with a QNAP system. To be clear, this is distinct from folder aggregation, which is a folder that collects other shared folders. A union mount allows the contents of multiple folders to be shared in the same mount (without the original folders being seen). I've had this setup (using UnionFS) on my linux file server for years with much success, but I can't figure out if there is a way through the QNAP interface to set this sort of mount up. Does anyone have any suggestions on how to do this?

Just in case anyone is wondering why this is useful, I will provide an example. I use individual folders to sort video files based on source: Bluray, DVD, PVR, etc. I union mount these folders to create a single folder full of video files. The HTPC SQL database stores the file location as the union mount (//Videos/) instead of a longer path (//Videos/DVD/). If a file gets replaced with a file from a different source (DVD source gets replaced by a Bluray source), no changes to the SQL database are needed, which can be especially useful when replacing a whole season of a TV show. I would like to avoid this little annoyance if possible.

Thanks in advance!
This is NOT supported at this time. Have you asked QNAP about this? This sounds like a Feature Request, but you posted it to the File Sharing subForum.

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
Hyacinth
New here
Posts: 4
Joined: Thu Dec 18, 2014 3:01 am

Union Mount Share Folders

Post by Hyacinth »

I would like to have the ability to make union mount share folders on a QNAP system. To be clear, this is distinct from folder aggregation, which is a folder that collects other shared folders. A union mount folder allows the contents within multiple folders to be shared in the same folder (without the original folders being seen). I've had this setup (using UnionFS) on my linux file server for years with much success, but I have not found a way through the QNAP interface to set something like this up.

Using union mount folders can make accessing data much easier. For example, I use individual folders to sort video files based on source: Bluray, DVD, PVR, etc. I union mount these folders to create a single folder full of video files. The HTPC SQL database stores the file location as the union mount (//Videos/) instead of a longer path (//Videos/DVD/). If a file gets replaced with a file from a different source (DVD source gets replaced by a Bluray source) and thus moved to a different source folder, no changes to the database are needed and no customized metadata for those files is lost (user-selected images, watched flag, times viewed, etc). This can be especially useful when replacing a whole season of a TV show. As well, users browsing the folders directly don't have to traverse through each of the subfolders looking for their favorite TV show.

UnionFS and AUFS are two common projects that can accomplish this on linux systems. My thought is that adding one of these two projects to the QNAP system could accomplish this task.

Union mount share folders would be applicable for all cases in which you would like to use folders to sort content "behind the scenes" in a way that is not useful to be seen/traversed by the users/databases. If you think this sounds useful to you, have your own cases where you might use this feature, or consider an alternative approach to solve these types of cases, please share your thoughts.
User avatar
schumaku
Guru
Posts: 43578
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Union Mount Share Folders

Post by schumaku »

This would require that a complete new layer of file system mounts need to established on top of the standard file system, requiring an SQL database to simplify things, each and every application needs to be adopted, ... no way for a product. Much to niche usage. Far to much an application layer on top of a file system. Finally we have to explain why the same "files" show up several times, why these file systems can't be used for NFS exporting, ...

Long before we will see the Linux RAID and ext4 file system replaced by a fully blown BTRFS implementation, including redundancy.
Hyacinth
New here
Posts: 4
Joined: Thu Dec 18, 2014 3:01 am

Re: Can a union mount be created?

Post by Hyacinth »

Hi Patrick,

Thanks for your reply. I didn't notice that my two posts got merged, and I accidentally removed my initial reply to you. To cut to the chase, I followed your advice. :)

As an experienced QNAP user, do you have any suggestions for workarounds for this type of issue? Have you had to handle this dilemma on your own systems?

Thanks again!
Last edited by Hyacinth on Tue Mar 03, 2015 4:10 am, edited 3 times in total.
Hyacinth
New here
Posts: 4
Joined: Thu Dec 18, 2014 3:01 am

Re: Union Mount Share Folders

Post by Hyacinth »

Hi schumaku,

Thanks for your reply. Your description does sound like a lot of overhaul would be needed to make this work in the QNAP system. I suppose it seems so simple when I run unionfs on my linux machine to access the files from other machines.

Considering the potential system-wide integration issues, are there any alternatives you might suggest to give a similar functionality for cases like the one above? Might there be a way for me to install unionfs outside of the standard interface? I would hate to lose one of the key features of my linux server in the migration to my new QNAP system.
jgrete
New here
Posts: 5
Joined: Mon Jan 18, 2016 3:04 pm

Re: Union Mount Share Folders

Post by jgrete »

Hi Hyacinth,
sorry to re-animate this old thread. I've the same situation like you.
On my Linux machines I solved that by using mhddfs (multi TB sizes).
Very small and very efficient (no need of any databases).
By now the only feature I'm missing on my QNAP
Juergen
Post Reply

Return to “Features Wanted”