Cifs issues resolved
Please note, I’ve migrated all my posts, including this one, to a new location.
I recently bought a freecom network drive. It’s was cheap, i.e. the cheapest, but promised support for both kind of computers – Win and Mac. What could go wrong? Of course I soon ran into problems trying to mount it in Ubuntu. Both mounting directly from command line or adding an entry to fstab would give me the error:
mount error 20 = Not a directory
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
After plenty of googling, I found a hack on the linux-cifs-client mailing list:
echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled
I was then able to mount without a problem. Clearly my tinpot device only supported the basic smbfs protocol. While this worked, it wasn’t going to survive a reboot so I dug into mount.cifs (8). I found plenty of options for turning off various aspects of the extensions but nothing that disabled them all.
So I went back to google and happily came across this thread, on the same list, discussing adding a new “nounix” option to mount.cifs. It was dated from July last year. Despite it not being in the man page, I gave it a shot. It worked first time.
//diskfrog/music /media/Music cifs guest,nounix 0 0
After a reboot, the share mounted automatically, which was just what I was looking for.
This experience nicely encapsulates what’s great about open source. Faced with a problem with a piece of software, not only did I find a solution, I was able to read about the genesis of a new feature that scratched, not only the developer’s itch, but my itch too. I suppose I should really look into patching manpages and put back.
3 comments so far
Leave a reply
Hi – I’ve just upgraded to Ubuntu 8.04, and cifs performs terribly… (I think I was using SMBFS before, but i believe this has now been dropped) – have you had any problems?
It’s hard to say as I didn’t really try it pre-Hardy. Performance is pretty crappy but I’ve put that down to a combination of relying on an old wireless router and a cheap network drive.
What sort of performance problems are you having? ie speed or unreliability?
I recently had to rebuild my Ubuntu computer and lost the command I had in the FSTab to mount the NAS drive I have. It only mounted read only anyway.
I looked round the Internet for a solution to the directory not found problem. I tried the solution above and it worked a treat.
Thanks.