Wednesday, April 4, 2007

fusesmb howto

fusesmb is a userspace application that allows you to mount your whole CIFS/SMB based network neighborhood to your filesystem.

This little app solves a whole bunch of headaches that I've had for a long time with KDE applications. Almost none of them support streaming from network locations, so while you can get to the files with smb://server/share/superkewlsong.mp3 you can't play it in your application from there. KDE will download the whole thing to a cache, which it then leaves on your hard drive, and play it locally.

This really sucks for divx video files of about a gig each, so to take the burden off of KDE, since it can't seem to pipe file data via it's network stuff, I use fusesmb.

To install it in FC6 you
localhost ~]$ sudo yum -y install fuse-smb
This installs the software, then you have to edit the file ~/.smb/fusesmb.conf to add your username/password and tell it to show hidden shares or ignore specific servers.

localhost ~]$ nano ~/.smb/fusesmb.conf

The website documentation for fusesmb is really skimpy, but you can get a sample config from man fusesmb.conf which is pretty easy to manage

EXAMPLE
; Global settings
[global]

; Default username and password
username=user
password=totallysecret

; List hidden shares
showhiddenshares=true

; Connection timeout in seconds
timeout = 10

;Interval for updating new shares in minutes
interval = 10

; Section for servers and/or workgroups to ignore
[ignore]
servers=SERVER,SERVER2,SERVER3
workgroups=WORKGROUP,WG2

; Share-specific settings
[/SERVER/SHARE]
username=john
password=doe

; Server-specific settings
[/SERVER]
username=jane
password=doe
showhiddenshares=true
ignore=true


Once you've configured that, you got a good shot that your shares will all show up. My setup, of course, didn't work out of the box.

The file ~/.fusesmb.cache would never pickup my XP machine with my music collection on it. It would find all the other shares on my network fine, and if I used the credentials in the fusesmb.conf file to smbbrowse to it I had no problems.

I manually added it to the flat file that has the shares in it of ~/.fusesmb.cache and it would work for a few minutes then disappear!

After some trial and error I found out that fusesmb.cache is not just a file with a plain text list of shares on your network neighborhood, it's also an application that runs and rescans that file every 10 minutes.

So I ran the fusesmb.cache with a -h to see if it took some arguments or something and it actually started spewing some information.

Server: 192.168.200.197 : Share: IPC$ : Workgroup: WAG3SLAV3
Kinit failed: Cannot resolve network address for KDC in requested realm

Fusesmb tries to auth against kerberos and will fail if your linux machine isn't a member machine of the domain. Fortunately with the - tag the fusesmb.cache application will find all your hosts. Must be a timeout thing.

localhost ~]$ fusesmb.cache --

To workaround this rename /usr/bin/fusesmb.cache to /usr/bin/fusesmb.cache.back after it populates the text file ~/.fusesmb.cache

localhost ~]$ fusesmb.cache -- && sudo mv /usr/bin/fusesmb.cache /usr/sbin/fusesmb.cache.back
Just be sure to run fusesmb.cache.back -- if you make a new share on your network because it won't be picked up until you do.
localhost ~]$ /usr/bin/fusesmb.cache.back --

Sunday, April 1, 2007

Adventures from State Surplus - Dell PowerEdge 6400/700 Part 2

Okay, so me and metaframe stop off at the gas station for a four pack of Jones Cherry soda and get started.

I lugged the monster up the four steps into my house, then needed a break from all that lifting and carrying, so I had my soda. I've been lazy for a long time, and just looking at that bad boy in the rack I knew I needed to plan my next break carefully.

But I digress....

Back from tangent A.

Once I got a monitor and keyboard hooked up I booted into the Perc RAID controller, since I've used Dell Poweredges before, and this is the thing that you change after you have the OS installed and it eats your discs and you have to take another break after chucking something across the room, and I didn't want to do that.

Turns out the labels on the two SCSI drives was right, tiny little 33GB drives. Oh well. I need space more than I care about backing up that little spec of data so I break the RAID1 mirror they were in and start installing Fedora Core 6.

After about 20 minutes, I find out that the kernel dev guys have STOPPED supporting the Perc controller in this thing! WTF! Great, now I need to run a 2.6.2 kernel, or do a backported kernel driver module.

Well, I was going to have this thing be a vmware linux with a Windows 2k3 server virtual machine, I'll just do a 2k3 server with a linux vm instead.

Zip bang, or maybe install disc and watch status crawl for two hours, and I'm rocking in 2k3. I don't even have to install network drivers, it "just works".

Nice.

Now what to do with this thing.... It's big enough to be a coffee table, but it's a bit to high for that, to low for and end table. It doesn't match the 10" subwoofer box that's the headboard on my bed, and it's WAY too noisy for that.

I think I'll stick it on the base of the stairs to my attic. Yeah, that's great, I just need to pick the lock every time I want to put a disk in the drive.

What fun!