The folder /mnt/my-data can hold the file with maximize volume is 20G or 28G ?
20GB. what you see is what you get. (in fact a little less than 20GB as some space will be eaten up by filesystem metadata
The folder /var can hold the file with maximize volume is 8G or 28G ?
8GB. again same reasoning as above
Now I want to mount /dev/xvdf to /var, what should I do?
umount
from /mnt/my-data and the mount it on /var. By doing this , you will lose all the stuff you have in /var.
cd /
umount /mnt/my-data
mount /dev/xvdf /var