ntfsresize
Resize NTFS partitions
SYNOPSIS
ntfsresize [options] device
PARAMETERS
-s, --size
Specify the new size of the NTFS filesystem.
-i, --info
Display information about the NTFS filesystem (current size, minimum possible size) without performing any resize operation.
-P, --no-progress-bar
Suppress the display of the progress bar during the operation.
-n, --no-action
Perform a dry run. Do not write any changes to the device, just show what ntfsresize would do.
-f, --force
Force ntfsresize to run even if the NTFS filesystem is dirty, inconsistent, or seems to be hibernated. Use with extreme caution, as it can lead to data loss.
--force-min-size
Attempt to shrink the filesystem to the absolute minimum possible size, even if it might fail due to fragmentation.
--bad-sectors
Enable checking for bad sectors during the operation.
-q, --quiet
Suppress all output except error messages.
-v, --verbose
Display more detailed information about the operation steps.
-h, --help
Show the help message and exit.
-V, --version
Show version information and exit.
DESCRIPTION
ntfsresize is a command-line utility for non-destructively resizing NTFS filesystems. It is a vital component of the ntfs-3g project, offering robust read-write support for NTFS partitions. This tool enables users to shrink or enlarge an existing NTFS filesystem without data loss, making it indispensable for disk management scenarios such as dual-booting Windows and Linux, or managing virtual machine disks. It operates by modifying the NTFS metadata to reflect the new size and must be used on an unmounted partition. After ntfsresize adjusts the filesystem, a partition editor (e.g., parted or fdisk) is typically required to adjust the partition table entry to match the filesystem's new dimensions.
CAVEATS
Unmounted Partition Required: The NTFS filesystem must be unmounted before running ntfsresize. Operating on a mounted filesystem can lead to severe data corruption.
Separate Partition Table Adjustment: ntfsresize only modifies the filesystem size; it does not change the partition table. After resizing the filesystem, you must use a partition editor (e.g., fdisk, parted, gparted) to adjust the partition entry in the partition table to match the new filesystem size.
Windows Hibernation/Fast Startup: If Windows was hibernated or has 'Fast Startup' enabled, the NTFS filesystem may be in an inconsistent (dirty) state. ntfsresize will refuse to operate by default. Ensure Windows is fully shut down, or use the -f (force) option with extreme caution.
Fragmentation: High fragmentation on the NTFS volume can prevent shrinking to the desired size, as ntfsresize cannot move data beyond the specified new end. Defragmenting the volume in Windows beforehand can help.
Backup Data: Always back up important data before performing any disk resizing operations.
DEPENDENCIES
ntfsresize is typically provided as part of the ntfs-3g package or similar ntfs-utils on most Linux distributions. Ensure this package is installed to use the command.
UNMOUNTING PROCEDURE
Before any resize operation, verify the target partition is not mounted. You can check its status using the mount command and unmount it using sudo umount /dev/sdXN (replace /dev/sdXN with your partition's device path).
HISTORY
ntfsresize originated as part of the ntfsprogs project, which aimed to provide userspace utilities for NTFS on Linux. This project was later largely integrated into and superseded by ntfs-3g, a more robust and actively developed driver and suite of tools providing full read-write support for NTFS. ntfsresize is now commonly bundled with ntfs-3g and is maintained as a critical component for managing NTFS partitions in a Linux environment. Its development has focused on ensuring data integrity and compatibility with various Windows NTFS versions.