df command shows % capacity which the percentage of used space. Specifically in case of thin volumes, we cannot use this value of % used capacity as they have options to grow and the actual allocated capacity of thin volume remains unknown. Take the below scenario,
Aggregate total space = 100GB
Vol1 - thick - with 10GB size and 1 GB used. Here, free space of the volume is 9 GB
Vol2 - thin - with 200GB size and 5 GB used. Here, free space of the volume is 195 GB which is greater than aggregate space and is incorrect.
So, Is there a way to determine the free space of a thin volume?.
So does that mean there can be no free space for a individual thin volume?
vola - thick - 20GB -of which 40GB is used
That's impossible. You cannot use more space than volume size. It is true for both thick and thin volumes. Your total data on a volume may exceed it though if you are using deduplication and/or compression. But that's different story.
In this case, total size of all volumes is greater than aggregate size as thin volumes share aggregate space. How does the thin volume operate here?.
First space for thick volumes is reserved. What remains is shared between all thin volumes. Yes, you can create thin volumes with size greater than containing aggregate size. You won't be able to fill them with more data than is available on aggregate though. So in your example two thin volumes have max 30G of free space (50G aggregate - 20G thick volume). If you put 30G in one volume, another one does not have any free space.