1

I'm resizing an ntfs partition using ntfsresize (ntfs-3g) and fdisk. I used the following command in order to change the filesystem size:

# ntfsresize -f -s 10G /dev/sdb1
ntfsresize v2013.1.13AR.1 (libntfs-3g)
Device name        : /dev/sdb1
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 31457276416 bytes (31458 MB)
Current device size: 31457280000 bytes (31458 MB)
New volume size    : 9999995392 bytes (10000 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 538 MB (1.7%)
Collecting resizing constraints ...
Needed relocations : 23717 (98 MB)
WARNING: Every sanity check passed and only the dangerous operations left.
Make sure that important data has been backed up! Power outage or computer
crash may result major data loss!
Are you sure you want to proceed (y/[n])? y
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Relocating needed data ...
100.00 percent completed
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
Syncing device ...
Successfully resized NTFS on device '/dev/sdb1'.

The second step is to change the size of the partition, so I divided the new size (9999995392) by 512, and I got 19531241 sectors. So, I ran fdisk and deleted the first partition, and I created it anew:

# fdisk /dev/sdb
Command (m for help): d
Partition number (1-4): 1

Command (m for help): n
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-156299374, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-61442047, default 61442047): +19531241

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 7
Changed system type of partition 1 to 7 (HPFS/NTFS/exFAT)

Everything seems to work, gparted shows no errors:

screen

But the size of the new partition is bigger compared to its filesystem:

# ntfsresize -i -f /dev/sdb1
ntfsresize v2013.1.13AR.1 (libntfs-3g)
Device name        : /dev/sdb1
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 9999995392 bytes (10000 MB)
Current device size: 9999995904 bytes (10000 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 538 MB (5.4%)
Collecting resizing constraints ...
You might resize at 537047040 bytes or 538 MB (freeing 9462 MB).
Please make a test run using both the -n and -s options before real resizing!

It's just one sector (512b). Does anyone know where this extra sector came from?

  • A file system format data and use some space to store information that are not file or folder it seems perfectly normal to me that the file system shows less byte than the partition itself – Kiwy Jan 13 '14 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.