Saturday, May 4, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 4898  / 1 Year ago, wed, april 5, 2023, 5:09:38

Ubuntu 12.04 LTS, all updates current as of 7/3/2012



gksudo gparted
Shrink /dev/sda2 from 367GB to 307GB



GParted 0.11.0 --enable-libparted-dmraid

Libparted 2.3

Shrink /dev/sda2 from 367.00 GiB to 307.00 GiB 00:32:57 ( ERROR )

calibrate /dev/sda2 00:00:00 ( SUCCESS )

path: /dev/sda2
start: 20,484,096
end: 790,142,975
size: 769,658,880 (367.00 GiB)
check file system on /dev/sda2 for errors and (if possible) fix them 00:00:53 ( SUCCESS )

ntfsresize -P -i -f -v /dev/sda2

ntfsresize v2012.1.15AR.1 (libntfs-3g)
Device name : /dev/sda2
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 394065338880 bytes (394066 MB)
Current device size: 394065346560 bytes (394066 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 327950 MB (83.2%)
Collecting resizing constraints ...
Estimating smallest shrunken size supported ...
File feature Last used at By inode
$MFT : 389998 MB 0
Multi-Record : 394061 MB 386464
$MFTMirr : 314823 MB 1
Compressed : 394064 MB 1019521
Sparse : 330887 MB 752454
Ordinary : 393297 MB 706060
You might resize at 327949758464 bytes or 327950 MB (freeing 66116 MB).
Please make a test run using both the -n and -s options before real resizing!
shrink file system 00:32:04 ( ERROR )

run simulation 00:32:04 ( ERROR )

ntfsresize -P --force --force /dev/sda2 -s 329640837119 --no-action

ntfsresize v2012.1.15AR.1 (libntfs-3g)
Device name : /dev/sda2
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 394065338880 bytes (394066 MB)
Current device size: 394065346560 bytes (394066 MB)
New volume size : 329640829440 bytes (329641 MB)
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 327950 MB (83.2%)
Collecting resizing constraints ...
Needed relocations : 13300525 (54479 MB)
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Relocating needed data ...
Updating $BadClust file ...
Updating $Bitmap file ...
ERROR(5): Could not map attribute 0x80 in inode 1667593: Input/output error
========================================


Windows has run chkdsk successfully (on boot) several times now


More From » partitioning

 Answers
3

Ok. So what I eventually did to resize it was to resize in increments



First resize, shrink by 5GB, then tried by an additional 10GB, 25GB, and 20GB until it got down to the desired size.



Not entirely sure why gparted gives an error when it tries to do it all at once, but seems like this strategy works.



Probably the same technique that @TylerH used (by setting shrink size to 10% larger than before)


[#37105] Thursday, April 6, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
measord

Total Points: 259
Total Questions: 131
Total Answers: 106

Location: Venezuela
Member since Sun, Oct 2, 2022
2 Years ago
measord questions
Wed, Jul 14, 21, 21:39, 3 Years ago
Mon, May 16, 22, 21:12, 2 Years ago
Mon, Oct 11, 21, 03:11, 3 Years ago
Sun, Apr 17, 22, 21:22, 2 Years ago
;