Archive for September, 2008

Listen to SomaFm on 3G phones

SomaFM has some of the best online radio stations available. My favourite one is Boot Liquor – Americana Roots music for Cowhands, Cowpokes and Cowtippers.

A while back I came across a link that let’s me listen to some SomaFM stations on my N95. Just enter http://somafm.com/soma.xhtml into your mobile browser and you get the station menu: Groove Salad, Secret Agent, Indie Pop Rocks, Illinois Street Lounge, Space Station Soma, and Boot Liquor.

Just make sure you have a decent data plan or are using wifi! ;)


Easy NFS share with auto-mount

I have a large hard drive in my desktop machine where I store all my media, i.e. audio, video, photographs, etc… I wanted an easy way to access it from my laptop when connected to my network and decided to give NFS a try. It’s easy to set up, and it auto-mounts easily through fstab. Here’s how I did it in Ubuntu (make sure you use your own machine’s IP/computer name):

Let’s start with the server install and configuration:

sudo apt-get install nfs-kernel-server nfs-common portmap

Restart your machine.

Next we have to specify the drives or folders we want to export in the file /etc/exports:

sudo gedit /etc/exports

On a new line first enter the absolute path of the exported folder followed by a list of authorised clients separated by a space. In my case I share the complete drive sda1 with the IP range 192.168.1.1 – 192.168.1.6:

/media/sda1 192.168.1.1/6(rw)

You can use a netmask like me, or you can use the machine name(s) instead. The option rw (default) gives read/write access, ro would make it read-only. Check out the exports(5) man page for all available options. If you add more options then separate them by commas, e.g. (rw,no_root_squash).

Save changes and close the exports file. Restart the server machine. To just apply the changes on an already running server enter:

sudo exportfs -a

Now we’re ready to set up the client machine.

Install the following:

sudo apt-get install nfs-common portmap

Restart the machine.

We need a mount point for the remote volume. I created a new one in /media called d-media:

sudo mkdir /media/d-media

Let’s try and mount the NFS volume from the command line. Enter the following:

sudo mount 192.168.1.2:/media/sda1 /media/d-media

You should now be able to browse your new network drive from the command line and find it in the Places menu and in Nautilus listed with the rest of your drives.

If you successfully mounted the network drive from the command line, then you can now add it to /etc/fstab to automatically mount at start-up:

sudo gedit /etc/fstab

Copy the following line (make sure to use your own server’s IP and folder names):

192.168.1.2:/media/sda1 /media/d-media nfs rsize=8192,wsize=8192

rsize specifies the maximum number of bytes in each network READ request that the NFS client can receive when reading data from a file on an NFS server, wsize is the maximum number of bytes per network WRITE request that the NFS client can send when writing data to a file on an NFS server. The values used for both are multiples of 1024, up to 1,048,576 bytes (1MB). If you have performance issues with the above options, then try changing rsize and wsize. Check the nfs(5) man page for more details and options.

Save and close fstab. Restart the client machine.

Your remote volume should now be available as a local drive.

Note: The above steps should apply to pretty much any Linux install. I successfully tried it with Opensuse 11 as a client and it already had all the client parts installed by default.

If you use NFS and have any tips, then feel free to leave a comment.

1 Comment more...

  • Categories

  • Archives

  • Random snaps

    www.flickr.com
  • Visitor Map

  • Miscellaneous

  • iDream theme by Templates Next | Powered by WordPress