r8682@llin: dpavlin | 2005-10-24 18:41:06 +0200
authordpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Mon, 24 Oct 2005 16:41:13 +0000 (16:41 +0000)
committerdpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Mon, 24 Oct 2005 16:41:13 +0000 (16:41 +0000)
 limit one file size to 4Gb-2Kb (maximum file size on one media)

git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@228 8392b6e1-25fa-0310-8288-cc32f8e212ea

bin/BackupPC_incPartsUpdate

index cc37b07..b652088 100755 (executable)
@@ -215,6 +215,13 @@ while (my $row = $sth->fetchrow_hashref) {
                my $max_size = $Conf{'MaxArchiveSize'} || die "problem with MaxArchieSize parametar";
                $max_size *= 1024;      # convert to bytes
 
+               # maximum file size on ISO image is 4Gb
+               # this will require Linux kernel 2.6.8 or newer
+               my $max_iso_file_size = 2^32 - 2048;
+               if ( $max_size > $max_iso_file_size ) {
+                       $max_size = $max_iso_file_size;
+               }
+
                my $parts = int( ($size + $max_size - 1) / $max_size );
 
                if (-d "$tar_dir/$tar_file" && $parts != $row->{'parts'}) {