Difference between revisions of "Unionfs of Local Drives"

From WikiDLXTV
Jump to: navigation, search
(Created page with 'This guide is for those with multiple Hard Drives attached directly to your WDTV that wish the contents could be available under 1 folder. 1. Use WEC to enable early mount for …')
(No difference)

Revision as of 09:32, 11 August 2011

This guide is for those with multiple Hard Drives attached directly to your WDTV that wish the contents could be available under 1 folder.

1. Use WEC to enable early mount for each drive that you want to merge. This will create an empty file at the root of each drive .mnt and is necessary to ensure that the drives are mounted at the same location at each boot.

2. Reboot

3. Grab a copy of the net.mounts file that was included with your download of WDLXTV.

4. First create the folders that you want to be visible on screen, type the following in your net.mounts file

 mkdir -p /tmp/media/usb/USB?/?????

this cmd in net.mounts will create a visible folder on the system, input the USB# you want to access your folder under. and then choose a name for your folder.

example.

 mkdir -p /tmp/media/usb/USB2/action

This has created a folder under USB2 titled action

You can do this for as many folders as you like. In my set up I have 4.

 mkdir -p /tmp/media/usb/USB2/family
 mkdir -p /tmp/media/usb/USB2/action
 mkdir -p /tmp/media/usb/USB2/cartoons
 mkdir -p /tmp/media/usb/USB2/seasame

You can probably gess what each folder will contain.

5. Next we will tell the system what to put in these folders. type the following into your net.mounts

 unionfs /tmp/mnt/folder/drive/tobe/merged:/tmp/mnt/folder/drive/tobe/merged /tmp/media/usb/USB?/????

This is fairly simple the cmd "unionfs" followed by the location of 2 drives or folder that should be merged together. Each drive or folder is separated by a colon : you can add as many drives or folder as you like. There is a space when you are done followed by the location to put this union. This 3rd part of the cmd must be the same as what you created in step 4.To find the location of your drives or folder. Use the file manager found on the webend and navigate to

 /tmp/mnt/...

Your drives should all be listed here by UUID.

Example of my completed cmd

 unionfs /tmp/mnt/3E285D9B285D52CF:/tmp/mnt/6EDE131CDE12DBE1/SCIFI2 /tmp/media/usb/USB2/action

My union contains 1 drive and 1 folder on a different drive union'd together. My end result looks like this with my 4 unions.

 unionfs /tmp/mnt/3E285D9B285D52CF:/tmp/mnt/6EDE131CDE12DBE1/SCIFI2 /tmp/media/usb/USB2/action
 unionfs /tmp/mnt/4034E9ED34E9E63E/CARTOONS:/tmp/mnt/6EDE131CDE12DBE1/Cartoons2 /tmp/media/usb/USB2/cartoons
 unionfs /tmp/mnt/4034E9ED34E9E63E/FAMILY1:/tmp/mnt/6EDE131CDE12DBE1/Family2 /tmp/media/usb/USB2/family
 unionfs /tmp/mnt/4034E9ED34E9E63E/Seasame:/tmp/mnt/6EDE131CDE12DBE1/empty /tmp/media/usb/USB2/seasame

and here's my full net.mounts file

 mkdir -p /tmp/media/usb/USB2/family
 mkdir -p /tmp/media/usb/USB2/action
 mkdir -p /tmp/media/usb/USB2/cartoons
 mkdir -p /tmp/media/usb/USB2/seasame
 unionfs /tmp/mnt/3E285D9B285D52CF:/tmp/mnt/6EDE131CDE12DBE1/SCIFI2 /tmp/media/usb/USB2/action
 unionfs /tmp/mnt/4034E9ED34E9E63E/CARTOONS:/tmp/mnt/6EDE131CDE12DBE1/Cartoons2 /tmp/media/usb/USB2/cartoons
 unionfs /tmp/mnt/4034E9ED34E9E63E/FAMILY1:/tmp/mnt/6EDE131CDE12DBE1/Family2 /tmp/media/usb/USB2/family
 unionfs /tmp/mnt/4034E9ED34E9E63E/Seasame:/tmp/mnt/6EDE131CDE12DBE1/empty /tmp/media/usb/USB2/seasame

6.Put the net.mounts at the root of a fat32 drive & Reboot


You should now see your unions on screen and be able to access all your media in those unions. But wait you should still be able to see the system created folder for each drive.

Note: You can hide any folder or drive by using a . period at the start of the name

example: .Action or .Scifi

Note: net.mounts can still contain any network mounted share cmd that you like/need.

KAD