Difference between revisions of "Howto: Using Network Shares"

From LinuxMCE
Jump to: navigation, search
m (Added to the Tutorials category)
Line 1: Line 1:
 +
[[Category: Tutorials]]
 +
[[Category: Network Attached Storage| ]]
 +
 
The LinuxMCE core is able to auto-detect, configure and use Windows (SMB or CIFS) and *nix (NFS) network shares. This document details the different options for using network shares in LinuxMCE and the actions required to successfully configure them, when the automated discovery processes fail.
 
The LinuxMCE core is able to auto-detect, configure and use Windows (SMB or CIFS) and *nix (NFS) network shares. This document details the different options for using network shares in LinuxMCE and the actions required to successfully configure them, when the automated discovery processes fail.
  
Line 113: Line 116:
 
* '''Directories''': When a share is configured to use LinuxMCE's directory structure, it will by default be used in all media directories: ''audio, documents, pictures'' and ''videos''. You can restrict which media directories will be used by entering their names in this field, separated by commas.
 
* '''Directories''': When a share is configured to use LinuxMCE's directory structure, it will by default be used in all media directories: ''audio, documents, pictures'' and ''videos''. You can restrict which media directories will be used by entering their names in this field, separated by commas.
 
* '''Readonly''': checking this option will make LinuxMCE mount the share as read-only. This will stop LinuxMCE from creating .id3 files for all your videos, and from modifying the MP3 tags of your music files.
 
* '''Readonly''': checking this option will make LinuxMCE mount the share as read-only. This will stop LinuxMCE from creating .id3 files for all your videos, and from modifying the MP3 tags of your music files.
 
[[Category: Tutorials]]
 

Revision as of 17:03, 6 October 2007


The LinuxMCE core is able to auto-detect, configure and use Windows (SMB or CIFS) and *nix (NFS) network shares. This document details the different options for using network shares in LinuxMCE and the actions required to successfully configure them, when the automated discovery processes fail.

Network Share Use

Network shares are accessed in LinuxMCE using synbolic links created in the media storage directories, either in /home/public/data in the case of public shares, or in /home/<user_name>/data if the share has been assigned to a user.

LinuxMCE offers two alternatives for use of network shares:

  1. Using LinuxMCE's directory structure
  2. As a simple storage area, either public or private

Network Share Using LinuxMCE's Directory Structure

In this case LinuxMCE uses separate directories on the share for each user, with media sub-directories in each one. These directory trees are created if they do not already exist on the share.

For a typical Windows share, the storage layout will look like this:

my_share\public\audio
my_share\public\documents
my_share\public\pictures
my_share\public\videos
my_share\<user_1>\audio
my_share\<user_1>\documents
my_share\<user_1>\pictures
my_share\<user_1>\videos

Network Share As a Simple Storage Device

In this case the share will simply be attached either to the public storage or to a specified user, using a symbolic link in the other media directory. For example:

/home/public/data/other/my_share

or:

/home/<user_1>/data/other/my_share

Adding Network Shares Using Auto-Detection and the Orbiter

Adding a new network share to LinuxMCE consists of two stages: Adding the computer hosting the share as a File Server, and then adding each share on this computer.

Adding a File Server

  1. Ensure that the file server is active and connected to your network.
  2. Quick-reload the router. In the Orbiter, click More -> Advanced options -> Quick reload router.
  3. The orbiter will display a message identifying the detected network share, and ask what you would like to do with this share. Click File Server.
  4. The orbiter will ask for the user name and password for this file server. If the file server does not require a login, simply click Ok.
  5. The orbiter will inform you that the File Server has been created, and ask which room the file server is in.

This concludes the first stage. LinuxMCE will now proceed to detect and configure any available shares on this file server. At some point, the message "I finished installing the software for your new devices. You will need to restart the router before you can use them" will be displayed. You can press Ok to dismiss the message, but you should not reload the router as this will interrupt the share configuration process.

Adding File Shares

  1. For each available file share on your new file server, the orbiter will display the share name and ask what you would like to do with it. The list will contain a single option - either Windows Share or NFS Share. Click this option.
  2. The orbiter will ask if the new storage device can be used automatically for storing media. If you select Yes, LinuxMCE will store ripped CDs and DVDs and recorded TV shows on this device.
  3. The next orbiter screen will ask allow you to select if you would like to use LinuxMCE's directory structure on the new storage device. You have three options:
    1. Use LinuxMCE's directory structure
    2. Access the device content as-is and make it public
    3. Access the device content as-is and make it private for a selected user

When you have finished with this process, quick-reload the router.

Troubleshooting and Manual Configuration

The automated configuration process can fail at several places. This section explains how to complete the configuration in each case, using the LinuxMCE admin website and a Linux shell.

For all processes described below, start by navigating to the devices tree in the administration site: Either click show devices tree in the left-hand Wizard menu, or select Advances -> configuration -> Devices from the top menu.

To enter shell commands, either press Ctrl+Alt+F2 on the core console, or use SSH to connect to the core from another computer. In either case, log in using the user account you created when installing Ubuntu. When running a sudo operation, enter the password of the same user.

Manual Creation of a File Server

In case LinuxMCE fails to detect your file server, or if it detected it in the past and you selected to ignore it:

  1. Click Core in the left-hand navigation tree.
  2. Click Create Child Device in the main window.
  3. Enter the file server's description and IP address.
  4. Click Pick device template.
  5. In the Device Category menu select File/Media Server.
  6. Click Apply Filter.
  7. In the Device Template menu select File Server.
  8. Click Pick device template.
  9. If the file server requires a login, in the Device data section, enter the username and password for the file server, and check Password Required. Then click Save.
  10. Note the device number of the new file server, displayed at the top of the main window.
  11. In the shell, trigger the network share detection script for the new file server:
sudo /usr/pluto/bin/Configure_1837.sh -d <device number>

At this point, return to the orbiter to continue the automated process.

Manual Creation of Network Shares

In case LinuxMCE fails to detect the shares on your file server:

  1. In the left-hand navigation tree, locate and click the file server entry.
  2. Click Create Child Device in the main window.
  3. Click Pick device template.
  4. In the Device Template menu select the appropriate share type for your file server.
  5. In the Device data area, fill in:
    1. PK_Users: Leave empty for a public share, or select the desired user
    2. Share Name (if the share is \\my_server\my_share, enter my_share)
    3. Filesystem: cifs for Windows shares, nfs for *nix shares
    4. Check Use Automatically if desired
    5. Username, Password and Password Required if the file server requires login.

LinuxMCE should now mount your new share and create the required links to make your data available.

NOTE: I have not been able to find how to select to use LinuxMCE's directory structure in this process.

Advanced Configuration Options

Network shares use can be further customized using the LinuxMCE admin site. To use the following options, navigate to the network share device and scroll to the Device data section.

  • Directories: When a share is configured to use LinuxMCE's directory structure, it will by default be used in all media directories: audio, documents, pictures and videos. You can restrict which media directories will be used by entering their names in this field, separated by commas.
  • Readonly: checking this option will make LinuxMCE mount the share as read-only. This will stop LinuxMCE from creating .id3 files for all your videos, and from modifying the MP3 tags of your music files.