In my palatial estate in scenic Waltham, Massachusetts, aka my apartment, I have several computers. My two favorite computers to use are my Lenovo X60 (running SUSE Linux Enterprise Desktop 10 SP1) and my Apple Macbook Pro running OS X (10.4.10). I also have a whitebox machine from Intel that I use as my server running SLES 10 SP1.

The thought came across my mind the other day that I would like a central way to store and access my music. This way I can save room on my laptop hard drive for “business” items and utilize the larger disk on my server to store higher bit rate songs. (true audiophiles will really appreciate this)

To achieve this I scp’d all of my music files from my my Mac over to my SLES server using OS X’s terminal application located in /Applications/Utilities/terminal. In this example the ip address of my server is 192.168.2.5.

scp -r /Users/username/music 192.168.2.5:/music
The ‘-r’ stands for recursive and allows me to copy over a directory.

Next I setup a NFS server on my SLES machine. NFS is a network file system protocol that allows a user on a client computer to access files over a network as easily as if the network devices were attached to its local disks. This is perfect for our purposes.

To setup a NFS server:

  • Open up YaST: Alt+f2, enter yast2
  • Filter for “nfs server”
  • Check off “Start” under the NFS server section
  • Check off “open port in firewall” if you have a local firewall enabled
  • Hit next
  • Go to “Add directory”
  • Enter the path to your music folder.

Next you need to mount the NFS volume on your local machine

  • On Linux enter (in a terminal as root): mount 192.168.5:/Music /music
  • On OS X enter (in a terminal): sudo /sbin/mount_nfs -P linux:/install /music
  • I had to use the ‘-P’ option to get around an error that said something to the effect of “mount_nfs: Operation not permitted”

At this point you need to configure your desired music players to point to the appropriate directories.

On SLED 10 if you are using Banshee:

  • Open up Banshee
  • Go to Edit>Preferences
  • Make sure that “copy files to music folder when importing” is unchecked
  • Go to Music>Import Music
  • Choose Local folder and navigate to where you mounted the NFS share. (in this example in /music)

On OS X, if you are using iTunes:

  • Open up iTunes
  • Go to iTunes>Preferences
  • Go to the “Advanced” tab.
  • Make sure that the “Copy files to iTunes Music folder when adding to library” option is unchecked
  • Go to File>Import and browse to the location of your NFS mount (in this example /music).

In this example I do not set the machines to automatically mount the NFS share. Each time you reboot you will have to remount the NFS volume, but you shouldn’t have to re-import the music.

Advertisements