Score:-2

Resizing NTFS partition in Linux won't work

cn flag

I recently switched from Windows 10 to Arch Linux and as I didn't want to lose my data, I left my 2TB HDD untouched during the install and only formatted my SSD. The install worked out nicely and I'm now running Linux as my only OS for around a week. As I now got everything working properly I decided to convert my HDD which was used for storing Pictures and stuff like that from NTFS to ext4 as it's faster and the default for Linux either way. Trying that though I ran into problems. First, I don't have a external disk to backup my data. To work around that I decided to shrink my NTFS partition, create an ext4 partition and move the data from the NTFS to the ext4 one. As I tried to do that first with help of gparted, and as that didn't work with ntfsresize (also didn't work) I now am stuck and need help.

Here is information that could be helpful:

$ sudo ntfsresize -fs 953864 /dev/sdb1

(953864 should work as only around 80GB of the drive is used)

Output:

Device name        : /dev/sdb1
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 1895538184704 bytes (1895539 MB)
Current device size: 1895538188288 bytes (1895539 MB)
New volume size    : 950784 bytes (1 MB)
Checking filesystem consistency ...
Cluster 249604 is referenced multiple times!
Cluster 249605 is referenced multiple times!
Cluster 249606 is referenced multiple times!
Cluster 249607 is referenced multiple times!
Cluster 249608 is referenced multiple times!
Cluster 249609 is referenced multiple times!
Cluster 249610 is referenced multiple times!
Cluster 249611 is referenced multiple times!
Cluster 249612 is referenced multiple times!
Cluster 249613 is referenced multiple times!
100.00 percent completed
ERROR: Filesystem check failed!
ERROR: 32 clusters are referenced multiple times.
NTFS is inconsistent. Run chkdsk /f on Windows then reboot it TWICE!
The usage of the /f parameter is very IMPORTANT! No modification was
and will be made to NTFS by this software until it gets repaired.

I couldn't do what the output suggested as I didn't have Windows installed anymore.

$ sudo ntfsfix -db /dev/sdb1

Output:

Processing of $MFT and $MFTMirr completed successfully.
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
Going to un-mark the bad clusters ($BadClus)... No bad clusters...OK
NTFS partition /dev/sdb1 was processed successfully.

$ sudo fdisk -l /dev/sdb

Output:

Disk model: ST2000DM008-2FR1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x715b873b

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdb1        2048 3702225071 3702223024  1.7T  7 HPFS/NTFS/exFAT

I don't really know what to do here. Do I need to boot into Windows again to run chkdsk /f even though ntfsfix didn't find any errors and I can read and write to the disk as far as I tested?

Thanks in advance!

heynnema avatar
ru flag
Sorry, but we don't support Arch Linux here.
Score:1
cn flag

Probably a dumb question looking back, I just made a Windows 10 Bootdrive and executed chkdsk /F [myPartition] as ntfsresize suggested. Now everything works. Still thanks for replying @user10489

user10489 avatar
in flag
If it's just the dirty bit set, ntfsfix can fix it, but if there's something more serious wrong, you have to use windows chkdsk.
Score:0
in flag

ntfsresize resizes the filesystem, but not the partition. You have to separately resize the partition.

It's a bit tricky to get the math right to resize the partition, so rather than take the risk of getting it too small and damaging the filesystem, when I was using the command line tools to do this, I would resize the filesystem, and then shrink the partition to a bit bigger, and then resize the filesystem again without a size and let it expand into the newly sized partition.

The graphical tool does both at the same time, and is much safer.

Or you could use the windows disk manager to shrink the partition and filesystem, which is what I usually do now. Let windows mess with its own filesystem, much safer.

heynnema avatar
ru flag
The user no longer has Windows installed.
manos avatar
cn flag
Gparted gives the same error, as it also just runs ntfsresize. I think I might need to create a windows bootdrive and use windows tools to fix the issue.
user10489 avatar
in flag
Sorry, I missed the error! Yes, you will probably need to let windows run the filesystem check -- but you don't have to install it, you should be able to do that from windows rescue media, booted from a usb or something.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.