[CentOS] Resize KVM NTFS file system[SOLVED]

Tue Jun 9 23:20:46 UTC 2015
Mark LaPierre <marklapier at gmail.com>

On 06/09/15 15:41, John R Pierce wrote:
> On 6/9/2015 12:33 PM, James A. Peltier wrote:
>> Listen, it's far simpler than that.  Call Microsoft and tell them that
>> you resized a file system with a third party tool and now your file
>> system is corrupt and you'd like them to support you.  Await the click
>> and awkward silence.
> 
> hey, I'd hang up, too.   I don't trust in-place partition shrinking, no
> matter WHAT the software.
> 
> my preferred method of resizing NTFS is to use Acronis TrueImage or
> another similar backup tool to make a complete file system image of the
> partitions of the disk onto external media, then repartition the disk
> and restore that image to new smaller partitions.   If anything goes
> wrong like a system crash, power fail, etc during the first step,
> nothing is lost, just redo it.  and if something goes wrong during the
> 2nd step, well, you have that full backup, you can restore it again.
> 
> 

Hey All,

Thank you all so much for your help.

Many suggested the MS tools.  I tried those tools before turning to you
all for help.  The MS tools complained about trying to expand the active
file system.  It appears that the tools on Win7 Pro can not expand the
active system file system.  I tried both the GUI version where you right
click on the file system and choose expand, and the command line
diskpart command.

I used:

kpartx -av my.img to mount my image file

ntfsresize -P --force --force /dev/mapper/loop0p2 to resize the file
system to fit the previously expanded partition.

Widows ran a file system check, booted up, and now reports a 50GB
partition.  I'm happy, and Windows is happy.  Now I can proceed to
install a bunch of software on the newly expanded file system.

-- 
    _
   °v°
  /(_)\
   ^ ^  Mark LaPierre
Registered Linux user No #267004
https://linuxcounter.net/
****