A volume is technically a formatted partition. It is commonly referred to just as a "partition" these days. But the distinction between the two is important.
Resizing or moving a partition that is not formatted is not a problem at all, since it has no data stored on it. It's not possible to store data on a partition without first formatting it.
But having a formatted partition means there is a good chance that it is already in use for storing files. Now, if you shrink this volume, chances are that some fragmented memory blocks would be left outside the new volume, in the unallocated memory space. This would effectively make associated file or files corrupted.
To avoid this problem it is recommended to defragment the volume first. But is this really necessary? This may be a good practice perhaps, but how important is this today with modern operating systems and disk drives, if at all important?
I made an effort at illustrating the structure of a hard disk drive here. The files are of course stored within the filesystem. A partition without a filesystem is sometimes referred to as a raw partition.
As I understand it, what Goncalopp is saying is that if you shrink the partition first and then the filesystem, the filesystem might try to access data in the unallocated area of the disk
So the shrink operation should be done in two steps. The first step is to shrink the filesystem itself. The second step is to shrink the partition. To grow or to extend a partition these steps are done in reverse order.
What I don't understand is how you are supposed to shrink or extend the filesystem independently of the disk partition. What kind of tools do you guys use for this?
Can we agree that whether or not a disk volume resize corrupts the data on the volume would depend on the tool used for this operation? In other words, tools that follow the process as described above should be - at least theoretically - safe to use?