{"id":3625,"date":"2022-12-20T17:09:12","date_gmt":"2022-12-20T20:09:12","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/ntfsresize-man8\/"},"modified":"2022-12-20T17:09:12","modified_gmt":"2022-12-20T20:09:12","slug":"ntfsresize-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/ntfsresize-man8\/","title":{"rendered":"NTFSRESIZE (man8)"},"content":{"rendered":"<h1 align=\"center\">NTFSRESIZE<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#EXIT CODES\">EXIT CODES<\/a><br \/> <a href=\"#KNOWN ISSUES\">KNOWN ISSUES<\/a><br \/> <a href=\"#AUTHORS\">AUTHORS<\/a><br \/> <a href=\"#ACKNOWLEDGEMENT\">ACKNOWLEDGEMENT<\/a><br \/> <a href=\"#AVAILABILITY\">AVAILABILITY<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ntfsresize \u2212 resize an NTFS filesystem without data loss<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ntfsresize<\/b> [<i>OPTIONS<\/i>] <b>\u2212\u2212info(\u2212mb\u2212only)<\/b> <i>DEVICE<\/i> <b><br \/> ntfsresize<\/b> [<i>OPTIONS<\/i>] [<b>\u2212\u2212size<\/b> <i>SIZE<\/i>[<b>k<\/b>|<b>M<\/b>|<b>G<\/b>]] <i>DEVICE<\/i><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>ntfsresize<\/b> program safely resizes Windows XP, Windows Server 2003, Windows 2000, Windows NT4 and Longhorn NTFS filesystems without data loss. All NTFS versions are supported, used by 32\u2212bit and 64\u2212bit Windows. <b>Defragmentation is NOT required prior to resizing<\/b> because the program can relocate any data if needed, without risking data integrity.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Ntfsresize can be used to shrink or enlarge any NTFS filesystem located on an unmounted <i>DEVICE<\/i> (usually a disk partition). The new filesystem will fit in a DEVICE whose desired size is <i>SIZE<\/i> bytes. The <i>SIZE<\/i> parameter may have one of the optional modifiers <b>k<\/b>, <b>M<\/b>, <b>G<\/b>, which means the <i>SIZE<\/i> parameter is given in kilo\u2212, mega\u2212 or gigabytes respectively. <b>Ntfsresize<\/b> conforms to the SI, ATA, IEEE standards and the disk manufacturers by using k=10^3, M=10^6 and G=10^9.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If both <b>\u2212\u2212info(\u2212mb\u2212only)<\/b> and <b>\u2212\u2212size<\/b> are omitted then the NTFS filesystem will be enlarged to match the underlying <i>DEVICE<\/i> size.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">To resize a filesystem on a partition, you must resize BOTH the filesystem and the partition by editing the partition table on the disk. Similarly to other command line filesystem resizers, <b>ntfsresize<\/b> doesn\u2019t manipulate the size of the partitions, hence to do that you must use a disk partitioning tool as well, for example <b>fdisk<\/b>(8). Alternatively you could use one of the many user friendly partitioners that uses <b>ntfsresize<\/b> internally, like Mandriva\u2019s DiskDrake, QTParted, SUSE\/Novell\u2019s YaST Partitioner, IBM\u2019s EVMS, GParted or Debian\/Ubuntu\u2019s Partman.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>IMPORTANT!<\/b> It\u2019s a good practice making REGULAR BACKUPS of your valuable data, especially before using ANY partitioning tools. To do so for NTFS, you could use <b>ntfsclone<\/b>(8). Don\u2019t forget to save the partition table as well!<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Shrinkage<\/b> <br \/> If you wish to shrink an NTFS partition, first use <b>ntfsresize<\/b> to shrink the size of the filesystem. Then you could use <b>fdisk<\/b>(8) to shrink the size of the partition by deleting the partition and recreating it with the smaller size. Do not make the partition smaller than the new size of NTFS otherwise you won\u2019t be able to boot. If you did so notwithstanding then just recreate the partition to be as large as NTFS.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Enlargement<\/b> <br \/> To enlarge an NTFS filesystem, first you must enlarge the size of the underlying partition. This can be done using <b>fdisk<\/b>(8) by deleting the partition and recreating it with a larger size. Make sure it will not overlap with another existing partition. You may enlarge upwards (first sector unchanged) or downwards (last sector unchanged), but you may not enlarge at both ends in a single step. If you merge two NTFS partitions, only one of them can be expanded to the merged partition. After you have enlarged the partition, you may use <b>ntfsresize<\/b> to enlarge the size of the filesystem.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Partitioning<\/b> <br \/> When recreating the partition by a disk partitioning tool, make sure you create it at the same starting sector and with the same partition type as before. Otherwise you won\u2019t be able to access your filesystem. Use the \u2019u\u2019 fdisk command to switch to the reliable sector unit from the default cylinder one.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Also make sure you set the bootable flag for the partition if it existed before. Failing to do so you might not be able to boot your computer from the disk.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Below is a summary of all the options that <b>ntfsresize<\/b> accepts. Nearly all options have two equivalent names. The short name is preceded by <b>\u2212<\/b> and the long name is preceded by <b>\u2212\u2212<\/b>. Any single letter options, that don\u2019t take an argument, can be combined into a single command, e.g. <b>\u2212fv<\/b> is equivalent to <b>\u2212f \u2212v<\/b>. Long named options can be abbreviated to any unique prefix of their name. <b><br \/> \u2212c<\/b>, <b>\u2212\u2212check<\/b><\/p>\n<p style=\"margin-left:22%;\">By using this option ntfsresize will only check the device to ensure that it is ready to be resized. If not, it will print any errors detected. If the device is fine, nothing will be printed.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212i<\/b>, <b>\u2212\u2212info<\/b><\/p>\n<p style=\"margin-left:22%;\">By using this option without <b>\u2212\u2212expand<\/b>, ntfsresize will determine the theoretically smallest shrunken filesystem size supported. Most of the time the result is the space already used on the filesystem. Ntfsresize will refuse shrinking to a smaller size than what you got by this option and depending on several factors it might be unable to shrink very close to this theoretical size. Although the integrity of your data should be never in risk, it\u2019s still strongly recommended to make a test run by using the <b>\u2212\u2212no\u2212action<\/b> option before real resizing.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">Practically the smallest shrunken size generally is at around &#8220;used space&#8221; + (20\u2212200 MB). Please also take into account that Windows might need about 50\u2212100 MB free space left to boot safely.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">If used in association with option <b>\u2212\u2212expand<\/b>, ntfsresize will determine the smallest downwards expansion size and the possible increments to the size. These are exact byte counts which must not be rounded. This option may be used after the partition has been expanded provided the upper bound has not been changed.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">This option never causes any changes to the filesystem, the partition is opened read\u2212only.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212m<\/b>, <b>\u2212\u2212info\u2212mb\u2212only<\/b><\/p>\n<p style=\"margin-left:22%;\">Like the info option, only print out the shrinkable size in MB. Print nothing if the shrink size is the same as the original size (in MB). This option cannot be used in association with option <b>\u2212\u2212expand<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212s<\/b>, <b>\u2212\u2212size<\/b> SIZE[<b>k<\/b>|<b>M<\/b>|<b>G<\/b>]<\/p>\n<p style=\"margin-left:22%;\">Resize filesystem to fit in a partition whose size is <i>SIZE<\/i>[<b>k<\/b>|<b>M<\/b>|<b>G<\/b>] bytes by shifting its end and keeping its beginning unchanged. The filesystem size is set to be at least one sector smaller than the partition. The optional modifiers <b>k<\/b>, <b>M<\/b>, <b>G<\/b> mean the <i>SIZE<\/i> parameter is given in kilo\u2212, mega\u2212 or gigabytes respectively. Conforming to standards, k=10^3, M=10^6 and G=10^9. ki=2^10, Mi=2^20 and Gi=2^30 are also allowed. Use this option with <b>\u2212\u2212no\u2212action<\/b> first.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212x<\/b>, <b>\u2212\u2212expand<\/b><\/p>\n<p style=\"margin-left:22%;\">Expand the filesystem to the current partition size, shifting down its beginning and keeping its end unchanged. The metadata is recreated in the expanded space and no user data is relocated. This is incompatible with option \u2212s (or \u2212\u2212size) and can only be made if the expanded space is an exact multiple of the cluster size. It must also be large enough to hold the new metadata.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">If the expansion is interrupted for some reason (power outage, etc), you may restart the resizing, as the original data and metadata have been kept unchanged.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">Note : expanding a Windows system partition and filesystem downwards may lead to the registry or some files not matching the new system layout, or to some important files being located too far from the beginning of the partition, thus making Windows not bootable.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212f<\/b>, <b>\u2212\u2212force<\/b><\/p>\n<p style=\"margin-left:22%;\">Forces ntfsresize to proceed with the resize operation either without prompting for an explicit acceptance, or if the filesystem is marked for consistency check. Double the option (-ff, &#8211;force &#8211;force) to avoid prompting even if the file system is marked for check.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">Please note, ntfsresize always marks the filesystem for consistency check before a real resize operation and it leaves that way for extra safety. Thus if NTFS was marked by ntfsresize then it\u2019s safe to use this option. If you need to resize several times without booting into Windows between each resizing steps then you must use this option.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212n, \u2212\u2212no\u2212action<\/b><\/p>\n<p style=\"margin-left:22%;\">Use this option to make a test run before doing the real resize operation. Volume will be opened read\u2212only and <b>ntfsresize<\/b> displays what it would do if it were to resize the filesystem. Continue with the real resizing only if the test run passed.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212b<\/b>, <b>\u2212\u2212bad\u2212sectors<\/b><\/p>\n<p style=\"margin-left:22%;\">Support disks having hardware errors, bad sectors with those <b>ntfsresize<\/b> would refuse to work by default.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">Prior using this option, it\u2019s strongly recommended to make a backup by <b>ntfsclone<\/b>(8) using the \u2212\u2212rescue option, then running \u2019chkdsk \/f \/r volume:\u2019 on Windows from the command line. If the disk guarantee is still valid then replace it. It\u2019s defected. Please also note, that no software can repair these type of hardware errors. The most what they can do is to work around the permanent defects.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">This option doesn\u2019t have any effect if the disk is flawless.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212P<\/b>, <b>\u2212\u2212no\u2212progress\u2212bar<\/b><\/p>\n<p style=\"margin-left:22%;\">Don\u2019t show progress bars.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212v<\/b>, <b>\u2212\u2212verbose<\/b><\/p>\n<p style=\"margin-left:22%;\">More output.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212V<\/b>, <b>\u2212\u2212version<\/b><\/p>\n<p style=\"margin-left:22%;\">Print the version number of <b>ntfsresize<\/b> and exit.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212h<\/b>, <b>\u2212\u2212help<\/b><\/p>\n<p style=\"margin-left:22%;\">Display help and exit.<\/p>\n<h2>EXIT CODES <a name=\"EXIT CODES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The exit code is 0 on success, non\u2212zero otherwise.<\/p>\n<h2>KNOWN ISSUES <a name=\"KNOWN ISSUES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">No reliability problem is known. If you find a bug please send an email describing the problem to the development team at: <br \/> ntfs\u22123g\u2212devel@lists.sf.net<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">There are a few very rarely met restrictions at present: filesystems having unknown bad sectors, relocation of the first MFT extent and resizing into the middle of a $MFTMirr extent aren\u2019t supported yet. These cases are detected and resizing is restricted to a safe size or the closest safe size is displayed.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Ntfsresize<\/b> schedules an NTFS consistency check and after the first boot into Windows you must see <b>chkdsk<\/b> running on a blue background. This is intentional and no need to worry about it. Windows may force a quick reboot after the consistency check. Moreover after repartitioning your disk and depending on the hardware configuration, the Windows message <b>System Settings Change<\/b> may also appear. Just acknowledge it and reboot again.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The disk geometry handling semantic (HDIO_GETGEO ioctl) has changed in an incompatible way in Linux 2.6 kernels and this triggered multitudinous partition table corruptions resulting in unbootable Windows systems, even if NTFS was consistent, if <b>parted<\/b>(8) was involved in some way. This problem was often attributed to ntfsresize but in fact it\u2019s completely independent of NTFS thus ntfsresize. Moreover ntfsresize never touches the partition table at all. By changing the \u2019Disk Access Mode\u2019 to LBA in the BIOS makes booting work again, most of the time. You can find more information about this issue in the Troubleshooting section of the below referred Ntfsresize FAQ.<\/p>\n<h2>AUTHORS <a name=\"AUTHORS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ntfsresize<\/b> was written by Szabolcs Szakacsits, with contributions from Anton Altaparmakov and Richard Russon. It was ported to ntfs-3g by Erik Larsson and Jean-Pierre Andre.<\/p>\n<h2>ACKNOWLEDGEMENT <a name=\"ACKNOWLEDGEMENT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Many thanks to Anton Altaparmakov and Richard Russon for libntfs, the excellent documentation and comments, to Gergely Madarasz, Dewey M. Sasser and Miguel Lastra and his colleagues at the University of Granada for their continuous and highly valuable help, furthermore to Erik Meade, Martin Fick, Sandro Hawke, Dave Croal, Lorrin Nelson, Geert Hendrickx, Robert Bjorkman and Richard Burdick for beta testing the relocation support, to Florian Eyben, Fritz Oppliger, Richard Ebling, Sid\u2212Ahmed Touati, Jan Kiszka, Benjamin Redelings, Christopher Haney, Ryan Durk, Ralf Beyer, Scott Hansen, Alan Evans for the valued contributions and to Theodore Ts\u2019o whose <b>resize2fs<\/b>(8) man page originally formed the basis of this page.<\/p>\n<h2>AVAILABILITY <a name=\"AVAILABILITY\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ntfsresize<\/b> is part of the <b>ntfs-3g<\/b> package and is available from: <br \/> http:\/\/www.tuxera.com\/community\/<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>fdisk<\/b>(8), <b>cfdisk<\/b>(8), <b>sfdisk<\/b>(8), <b>parted<\/b>(8), <b>evms<\/b>(8), <b>ntfsclone<\/b>(8), <b>mkntfs<\/b>(8), <b>ntfsprogs<\/b>(8)<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  ntfsresize \u2212 resize an NTFS filesystem without data loss <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,741],"class_list":["post-3625","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-ntfsresize"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3625"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3625\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}