mogilefs newbie help

Rob Rogers robrogers at
Thu Mar 31 06:12:11 PST 2005


I'm trying to configure mogilefs and perlbal and I'm having some 

Specifically, when I try to create a new file with MogileFS using the 
example code on the danga site, I get this error message:

- unable to save file cuz Bad file descriptor at ./ line 22, <GEN2> 
line 7.

And, when I did into /var/log/messages I see Perlbal is logging this 
messages when I try to save a file (ie $fh->close):

Mar 31 04:16:29 sls2 perlbal[30001]: system error: Unable to create 
file (error = Invalid argument, \
path = /var/mogdata//dev3/0/000/000, file = 0000000044.fid, fd = -1 
(Error obtaining link info: No s\
uch file or directory))

Pls note the path argument.

Here's my code:

use MogileFS;
use Carp;
use Data::Dumper;
$MogileFS::DEBUG = 1;
sub println {
     while ($_ = shift) {
     print "\n";
$myfile = `cat /etc/passwd`;
my $mogfs = MogileFS->new(domain => 'test',hosts => ['']);
die "Unable to init mogfs obj cuz $!\n" unless $mogfs;
my $fh = $mogfs->new_file("mykey1","normal");
#print "DUMPING:", Dumper($fh);
die "no fh cuz $!\n" unless $fh;
$ret = $fh->close;
warn "unable to save file cuz $!" unless $ret;



More information about the mogilefs mailing list