Non-Linear

13 April 2006

NSLU2 Samba Problem with Fedora Core 5


I own an use quite heavly one Linksys NSLU2 SoHo network Attached Storage server. Very cheape ('bout £40 GBP) uses usb hard disks for storgae. As with almost any elelctrical applicance now days, you can install Linux on it thanks to the NSLU-Linux group.

As per the website I have 'unslung' my slug and it's been slimin' away happily for a few months now.

With the relase of Fedora Core 5, one of the changes to be made is the deprecation of smbfs from the kernel in favour of CIFS. CIFS is the replacement affectivly for smbfs and should work however, it dosen't always.

If I try to mount a samba share from my slug onto my FC5 box I get the following error.

[root@localhost moses]# mount //192.168.1.77/music /mnt/nasmusic/
mount: unknown filesystem type 'smbfs'

Fair enough, because the smbfs ident has been removed from the kernel. So lets try it with the -t cifs option (specifying the filesystem).

[root@localhost moses]# mount -t cifs //192.168.1.77/music /mnt/nasmusic/
Password:
retrying with upper case share name
mount error 6 = No such device or address
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

So it takes the password ok then says it can't find the share. I don't know why it does this, I've done a ipkg update and ipkg upgrade on the slug but it still does this. Checked /etc/samba/smb.conf (or equivilent) to see if there was an option for share versions, cifs perferance but couldn't find anything.

Eventually, posed with the prospect of having no media I ended up installing and configuring NFS on the slug. Hopefully it's only temporary, it's fairly easy to do, heres how.

  1. Log onto the slug as root
  2. run ipkg update (this updates the package database)
  3. run ipkg install nfs-utils (this'll install nfs)
  4. Edit the /opt/etc/exports file. This file is where the 'shares' are defines along with there permissions, the files fairly self explanitary.
  5. cd to /opt/etc/init.d
  6. Do a sh S56nfs-utils . This'll export the sghres (make them available)
  7. On the local machine add the required entries into your fstab (if you want it to mount everytime the computer comes up) or with a mount command from the shell if it's a one off.
    Heres an example of the last couple of lines of my /etc/fstab on my FC5 box.
[root@localhost kernkraft_400_data11cds]# tail /etc/fstab
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
192.168.1.77:/share/hdd/data/music /media/nasmusic_writable/ nfs rw

You can see from the last line my NFS mount directive. There are some inherent security issues with NFS and also a load of options that you can use whilest mounting, check out google for this info.


0 Comments:

Post a Comment

<< Home