Ok, I freely admit that I'm in over my head here... I am NOT a perl programmer. However, here is the method that is puking when trying to create the links:

sub MakeFileLink
{
    my($bpc, $name, $d, $newFile, $compress) = @_;
    my($i, $rawFile);

    return -1 if ( !-f $name );
    for ( $i = -1 ; ; $i++ ) {
return -2 if ( !defined($rawFile = $bpc->MD52Path($d, $compress)) );
        $rawFile .= "_$i" if ( $i >= 0 );
        if ( -f $rawFile ) {
            if ( (stat(_))[3] < $bpc->{Conf}{HardLinkMax}
                    && !compare($name, $rawFile) ) {
                unlink($name);
                return -3 if ( !link($rawFile, $name) );
                return 1;
            }
        } elsif ( $newFile && -f $name && (stat($name))[3] == 1 ) {
            my($newDir);
            ($newDir = $rawFile) =~ s{(.*)/.*}{$1};
            mkpath($newDir, 0, 0777) if ( !-d $newDir );
            return -4 if ( !link($name, $rawFile) );
            return 2;
        } else {
            return 0;
        }
    }
}


The line:

return -4 if ( !link($name, $rawFile) );

is where the problem occurs. How do I get the contents of $name or $rawFile to spit out into the log so I can see for sure where it is trying to link to/from?

I'd like to try manually creating the link as Les suggested as the backuppc user, but I'm unsure what to pass to ln in the shell.

Here, again, is the error from my log:

2008-02-27 15:03:50 BackupPC_link got error -4 when calling MakeFileLink(/mnt/plump/backuppc/pc/192.168.0.8/6/f%2fUsers%2fkathy/ attrib, 3a473beda0c8d3677d88cd783aa4cc68, 1)

I'm just unsure how to take the parameters that are passed to MakeFleLink and convert them into whatever is passed to the link call later.

Thanks!

-- Kimball


On Feb 27, 2008, at 2:48 PM, Les Mikesell wrote:

Kimball Larsen wrote:
Pool is used if you don't have compression enabled, cpool if you do. Whichever is used must be on the same filesystem as the pc directory tree so that hardlinks work between them. If you are getting errors making the links, check that you have space (df) and inodes available (df -i), and that the directory is writable by the backuppc user.

Hmm....Something is definitely up with my inodes:

[EMAIL PROTECTED]:/mnt/plump/backuppc# df -i
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/sdc2                  0       0       0    -  /
varrun                497169      77  497092    1% /var/run
varlock               497169       2  497167    1% /var/lock
udev                  497169    3232  493937    1% /dev
devshm                497169       1  497168    1% /dev/shm
lrm 497169 13 497156 1% /lib/modules/ 2.6.22-14-generic/volatile
/dev/sda1                  0       0       0    -  /mnt/tubby
/dev/sdb1                  0       0       0    -  /mnt/portly
/dev/sde1                  0       0       0    -  /mnt/brick
/dev/sdd1                  0       0       0    -  /mnt/plump
/dev/sdf10 4294967295 975408 4293991887 1% /media/ Hammer USB

I notice that all my disks that are ReiserFS do not list any inode info at all... is ReiserFS the problem, then? Should I change the backuppc disk to be ext3?

Reiserfs creates inodes as needed so that's not a problem. Just look at your logs and if you still see 'unable to link' errors, try to find the reason. Trying execute the same ln command as the backuppc user might give you some sort of error message.

--
 Les Mikesell
  [EMAIL PROTECTED]


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
BackupPC-users mailing list
[email protected]
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to