[OpenAFS] what about partitions larger than 2 TB?

Rich Sudlow rich@nd.edu
Mon, 30 Nov 2009 10:43:05 -0500


This is a multi-part message in MIME format.
--------------050207060501070901020700
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Giovanni Bracco wrote:
> What is the situation for partitions larger than 2 TB?
> 
> We have a file server with two partitions of 5 TB
> 
> %vos partinfo linafs1.frascati.enea.it
> Free space on partition /vicepa: 3357685900 K blocks out of total 5016031624
> Free space on partition /vicepb: 4950671196 K blocks out of total 5175721624
> 
> and apparentely they works but the "fs" command from openafs 1.4.11 does
> not report correctly the information about quota or available blocks
> 
> Also "fs" from openafs 1.5.66 has the same problem.
> 
> %./fs lq ~toselli
> Volume Name                    Quota       Used %Used   Partition
> user.toselli                40000000   17710136   44%        230%<<
> <<WARNING
> 
> %./fs examine ~toselli
> File /afs/enea.it/fra/user/toselli (536939031.1.1) contained in volume
> 536939031
> Volume status for vid = 536939031 named user.toselli
> Current disk quota is 40000000
> Current blocks used are 17710136
> The partition has -937281318 blocks available out of 721064328
> 
> Giovanni
> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info

See the attached script as a workaround for fixing the 32 bit issue.
We call the script "quota" in our cell.

Rich


-- 
Rich Sudlow
University of Notre Dame
Center for Research Computing
128 Information Technology Center
PO Box 539
Notre Dame, IN 46556-0539

(574) 631-7258 office phone
(574) 631-9283 office fax


--------------050207060501070901020700
Content-Type: text/plain;
 name="quota"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="quota"

#!/usr/bin/perl
#
# RKS - June 2009
# This script uses the output of the vos partinfo command
# to calculate the partition % rather than the 32 bit 
# limited fs commands.
#
# RKS - Oct 21,2009 - If a argument is given check that
# Change from white space split to packed data in return 
# due to large volumes

$path_to_check = $ARGV[0];

if ( $path_to_check eq "" ) {
	$path_to_check = $ENV{HOME};
}
	
print "AFS quota using values reported by vos server for partition\n";
print "Quota for $path_to_check\n";

$return = `fs listq $path_to_check | grep -v Quota`;
$header = `fs listq $path_to_check | grep Quota`;
chop $header;
chop $return;
($volume,$quota,$used,$percent) = unpack("A25 A10 A10 A5",$return);
$return = `/usr/sbin/vos examine $volume -format | grep server`;

($server,$partition) = (split(/\s+/,$return))[2,4];
$return = `/usr/sbin/vos partinfo $server $partition`;
chop $return;
($partfree, $total) = (split(/\s+/,$return))[5,11];
$partused = $total - $partfree;
print "$header\n";
printf "%-23s  %10d%10d %4d\%\% %10d\%\%\n",$volume, $quota, $used, $percent, (($partused/$total) * 100);

--------------050207060501070901020700--