[Gluster-devel] AFR and df

Krishna Srinivas krishna at zresearch.com
Fri Jul 13 11:50:57 UTC 2007


Hi All,

"df" gets the info of the disk from statvfs() system call. As of now
AFR gets it from the first available child specified in subvolumes list.

Reporting output of df command does not have a perfect solution
when using AFR whose children are of different disk sizes.

In the case where all the children have same disk size and we
have "option replicate *:n" where n is the number of children,
then everything will be symmetric across the children, so we can
just report the information from the first child.

But in case the children have different disk sizes, we need to
give the best possible information to the user in the df command.

statvfs() call give us:
total disk size
total available size
total inodes
available inodes

Typically user will have a second child with a disk of a smaller
size to store the redundant critical files. In this case it will be
wrong to just inform the user about the statvfs info from the
child with the least disk size (2nd child) as user will expect to see the
first child's info (primary disk which has a bigger disk).

what can be done is
report total size from the biggest disk
report total available size from the disk with least available size
report total inodes from the biggest disk
report total available inodes from the disk with least available inodes

So the user can see the max capacity amongst the children also know
the minimum space available amongst the children.

As of now AFR gets statvfs info from the first available child specified
in subvolumes list.
If anyone has a good suggestion regarding how we can report
disk info in best manner, please reply.

"man statvfs" for more info.

Thanks
Krishna



More information about the Gluster-devel mailing list