Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

Update:

I made an effort at illustrating the structure of a hard disk drive here. disk drive structure 1 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

disk drive structure 2

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.

disk drive structure 3

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?

share|improve this question
add comment

closed as not a real question by akira, 8088, Indrek, Nifle, Diogo Aug 20 '12 at 16:56

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

Depending on the used tool for shrinking a partition and the used file-system of the partition two different strategies are used:

  1. Simple tools allow only to shrink a partition up to the point where the first block is used. Therefore no data is "left outside the new volume".

  2. Advanced tools automatically move blocks at the end of a volume into the boundaries of the new shrinked volume. This is done before the shrink process is started.

Even if a partition operation should be safe it is a general recommendation to perform a full backup before starting such processes. Data loss is not likely but possible.

share|improve this answer
    
Let's say that the filesystem is NTFS and that the used tool is the Disk Management tool that comes with Windows. This should be common for most Windows users at least. Would you say that this is a safe combination? Is it safe to use the Disk Management tool? I personally use Acronis Disk Director 11 for partitioning. I find it easier to use than the Disk Management tool, and also more reliable because I have had some serious problems with the Disk Management tool in the past. –  sammyg Aug 20 '12 at 10:52
add comment

There are two important aspects involved in this question. The first, as you mention, is the Partition. A partition is, quite simply, a contiguous region of bytes in a disk. Its start and end is stored in the MBR (Master Boot Record), which is a region at the start of the disk (first 512 bytes, IIRC)

The second important concept is the Filesystem - sometimes this term is used incorrectly, which leads to some understandable confusion. A filesystem is, put simply, a kind of data structure which holds files, metadata about those files, and metadata about itself.

What one needs to realize is that shrinking/growing a partition does not necessarily resize the filesystem (though almost all partitioning programs do so automatically), which may lead the filesystem to believe that a region is available when it is not. The bottom line is: If you want to shrink a partition, you need to shrink the filesystem first (with the appropriate filesystem tool). If you want to grow a partition, you grow the partition first, then grow the filesystem.

This is the typical reason one talks about data loss occurring when resizing partitions. The partition resizing(itself) is very fast, but the filesystem resizing is typically slow and, depending on the filesystem, may lead to data loss if interrupted, as the metadata is left in an inconsistent state.

Defragmenting, as you mention, has no relevance in this context, AFAIK, besides potentially speeding up the filesystem resizing.

share|improve this answer
    
How do you shrink a filesystem without shrinking the partition on which it resides? And how do you grow or extend a partition without growing its filesystem at the same time? Is there such a tool for NTFS and Windows? If what you say is true, then this is perhaps done in the background by the software tool. Because to the user, these two processes appear as one and the same and tied together. –  sammyg Aug 20 '12 at 12:13
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.