NFS on the slug
By llauren on Nov 26, 2006 in english, geek
I’ve added a thing or two on bun-bun, my unslung NSLU2. First of all, there’s another 0.4T of storage on it, now making it a 0.6T system. Moreover i installed a few programs to make use of that disk space.
rsync is a senslessly nifty little suite of programs to keep a source and a target directory structure in synch. In fact, it is so nifty that i seldom use cp/scp (copy or secure copy) anymore, since rsync only copies the bits that have changed or do not exist on the target box. It can be configured to work on its native rsync protocol or over ssh. In my case, i have my home directory and music to sync using native rsync and anything else i need no a more ad-hoc basis over ssh. It’s all automagic anyway, once you have the hairy bits configured.
rsnapshot is another set of programs which build on rsync. I wish i had known of this program when i worked in Kudos and in Timor-Leste (in fact, i read about it while in TL, but it seemed so complicated to install that i didn’t care for it — and if i had known about it in my Kudos days, it would have been even more complicated to install :)). Rsnapshot will make so called “snapshot copies” of your stuff. What that means is that your data will seem to exist in a myriad of “snapshot directories” (one for each day of the last thirty, for example), but in reality, only data that has changed during this time exist as a copy. Everything else is linked and will take almost zero bits to store. Not bad.
Finally, i installed nfs — network file system — on the server and mounted to that share on my workstation. And did the rudimentary security bits of denying all clients but the workstation. So now i can finally get my music over the network. It’s not that it was a complicated thing to do — in fact, most of the installation was a routine of ipkg install <packagename> and editnig some configuration file and starting the service — it’s just that i’ve never done anything with nfs before. So it counts as progress.
In the same exercise, i learned one important thing. Well, two. The second one was that since uninstalling the updated busybox (NSLU2 Unslung already comes with an older busybox “bult in”) also removed /opt/bin/sh, i suddenly wasn’t aboe to ssh into bun-bun anymore, and it took me a while to understand that the error message that my password was incorrect wasn’t exactly what the problem was. Replacing /opt/bin/sh with just /bin/sh in /etc/passwd fixed that. But the first problem is that my UID and GID (numerical user ID and group ID) on the workstation is different from the corresponding ones on the slug. So i edited my UID on the slug to match (in /etc/passwd), and i created groups on the workstation to correspond to my GIDs on the slug. I hope i didn’t screw things up irrevocably, but i guess i’ll need to chown -R stuff on my home directory before i reboot anything or anything crashes.
I did try to install djmount earlier on my workstation (running Kubuntu 6.06), but it wouldn’t work. djmount is a user space tool to mount UPnP shares. Pity, but nfs solved that. And i’m quite sure i installed something else somewhere that didn’t work either. But it can’t have been too important or i might still remember it.
Ah yes, MRTG didn’t work for a while on the slug. Seems that there is a glitch in the communication somewhere between me, my router’s dhcp server, bun-bun’s dhcp client and me again. Somehow bun-bun forgets that it should search my LAN even though i’ve instructed my dhcpd on the router to add this directive to the dhcp options. As an ugly workaround, i edited the mrtg config file for my gateway on the slug to poll the gateway using its fully qualified domain name.
Post a Comment