Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?


by nperrins (Initiate)
on Dec 10, 2012 at 18:11 UTC ( #1008145=perlquestion: print w/replies, xml ) Need Help??
nperrins has asked for the wisdom of the Perl Monks concerning the following question:

WE recently came across the fact that Buffalo NAS units have MySQL, apache, PHP and Perl installed. Since our database is in MySQL and we have been using Perl front end for years, we thought this was a pretty neat opportunity to put the whole lot on a NAS. The bad news is that although Perl works, the DBI modules are not installed, so there is no data connection for Perl. (the CGI directory, with is there, but even "pushing" a path into @INC will not get it to work). It has taken me 2 days to hack the OS (a cut down linux). When I came to install with perl -MCPAN, it could not find "make" and I'm pretty sure there's no gcc. Any easy suggestions would be gratefully received.

Replies are listed 'Best First'.
Re: DBI on NAS
by davido (Archbishop) on Dec 10, 2012 at 19:19 UTC

    I've had three different Buffalo NAS's over the years, and have occasionally followed the user groups that hack them. You're right that they run a paired-down Linux OS. And people in the nas-central user group have managed to install other, more complete, distributions. But it's always one of those things that seems to be fraught with peril. After retiring my old 100baseT 160GB unit years ago, I attempted to follow the online instructions for jail-breaking it and installing a more open Linux dist I ended up bricking the thing. It was no great loss; I just pulled out the drive and gave it some other use. Later, my retired Gigabit, 320GB unit was successfully jail-broken, but the results were never all that useful. I don't intend to mess around with the 2TB unit I'm using now. I certainly wouldn't suggest diving too deep into the unknown on a unit that I'm still using for anything serious. Data loss is a high probability if something goes wrong.

    My suggestion is to get your hands on a Raspberry Pi if you want to tinker like this. Also, the Synology NAS's seem to be designed more for hackers.

    BTW: I too noticed that current firmwares for the Buffalo products have Perl available, but if I recall, it's a 5.8.x version, and the last thing I would do on a NAS that has important data on it is mess with upgrading the system Perl.



      The advice is sound. I know it. However, I'm so close. I have no intention of taking serious risks with the array and if nobody can offer a simple fix, I'm out of here.

      It was all the NAS-Central posts that helped me hack into it in the first place (acp_commander.jar)

      Thanks for the post showing that it is very probably Debian - the unit is a Terastation III.

      After push-ing the correct path for, the simple DBI module script is pretty damning:

      `can't locate object method "connect" via package "DBI" (perhaps you forgot to load "DBI")`

      Not me mate, that would be BuffaloTech

Re: DBI on NAS
by blue_cowdawg (Monsignor) on Dec 10, 2012 at 18:27 UTC

    None of what you are saying surprises me much... NAS units don't typically come with any compilers installed. Is there an underlying OS (windbloze, *nix, ?) that you can possibly do a cross compile for? Or in the case of *nix compile on one machine and copy over?

    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

      FYI: Buffalo

      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

      Nothing to do with the big W. Underlying OS? Well I'd just assumed that being a NAS, it was simply a cut-down Ubuntu or Debian, but uname -a has been edited. It doesn't look dissimilar to an old Red Hat, but I just can't tell. The problem is, that the unit is holding 2.7Tb pf backup. Not something I want to cross compile. I might have to buy (God forbid) another unit to sort this all out. (I'd be happier installing gcc/ if I knew how to do it.) Weird thing is that is there under a sub-directory (why copy it across in a cut down OS and not use it?). Nothing I do tells me that it is installed - but it is there. Is there a way of "activating" it rather than a full install? All the other modules work. (It doesn't run from the command line, I tried a one off perl script using "use DBI;" and "$dbh = DBI->connect(...." )
Re: DBI on NAS
by thundergnat (Deacon) on Dec 10, 2012 at 19:05 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1008145]
Approved by Lotus1
Discipulus ignores..
Discipulus IE just maps to id est in my mind .. ;=)
[Corion]: marto: I believe nowadays, at least window.opener should not be set anymore (except maybe within the same domain)
[Corion]: But I wouldn't really know as I don't use iexplore much (except at $work) and mostly surf with JS disabled (except at $work :) )

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2018-03-21 11:45 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (267 votes). Check out past polls.