Hey all,
I resized a partition inside a KVM RAW file system disk image. When I start the Win7 virtual machine it does not report the new partition size. It shows the file system as 15GB instead of the 50GB size of the partition that it lives on. I gather from hours so reading the manual that I need to increase the NTFS file system size to fill the new larger partition where it lives.
The ntfresize command does not seem to be compatible with disk image files. Do I have to mount the disk image file with a loopback first?
I tried doing it inside the Win7 VM using the disk management tools but that didn't work either.
Any suggestions welcome.
On 06/06/2015 06:19 PM, Mark LaPierre wrote:
I resized a partition inside a KVM RAW file system disk image. When I start the Win7 virtual machine it does not report the new partition size. It shows the file system as 15GB instead of the 50GB size of the partition that it lives on. I gather from hours so reading the manual that I need to increase the NTFS file system size to fill the new larger partition where it lives.
The ntfresize command does not seem to be compatible with disk image files. Do I have to mount the disk image file with a loopback first?
It's generally recommended to use Windows tools to do NTFS re-sizing. I can't help with that, but from Linux you would need to run kpartx -a -v /path/to/image/file to create the /dev/mapper/loop?p? devices for the partitions within the image. You can then access those devices just like regular disk partitions.
Run "kpartx -d -v /path/to/image/file" to delete the loop devices.
On 06/07/2015 07:14 AM, Robert Nichols wrote:
It's generally recommended to use Windows tools to do NTFS re-sizing. I can't help with that
As I recall, right click on "Computer," select "Manage." Select the "Storage" item on the left. Right click on the volume you want to expand and resize it.
On Sun, 07 June 2015 at 14:14 zulu, Robert Nichols wrote:
It's generally recommended to use Windows tools to do NTFS re-sizing.
I tend to disagree with that advice... I would recommend http://gparted.org/livecd.php over the microsoft-supplied tools, in a heartbeat.
Boot off that Live image on a CD or thumbdrive (or use the version of GPartEd included with the System Rescue Live CD from http://www.sysresccd.org/ ), select the correct disk from the drop down menu in the upper-right, set the borders of the partitions where you want them with the GUI, then tell it to Apply the pending actions.
If I recall correctly, the disk management tool in the windows MMC won't resize the partition it's running from, by the way.
On 06/07/2015 09:01 PM, Darr247 wrote:
I tend to disagree with that advice... I would recommend http://gparted.org/livecd.php over the microsoft-supplied tools, in a heartbeat.
Why? If you use gparted (ntfsprogs, under the covers, IIRC), the system will chkdsk on the next boot. No such requirement exists with Microsoft's tools.
If I recall correctly, the disk management tool in the windows MMC won't resize the partition it's running from, by the way.
You do not recall correctly.
On Monday, 08 June 2015 at @07:06 zulu, Gordon Messmer wrote:
Why? If you use gparted (ntfsprogs, under the covers, IIRC), the system will chkdsk on the next boot. No such requirement exists with Microsoft's tools
That's not been my experience... gparted does use ntfs-3g to work on NTFS partitions (what linux-based tool doesn't?), but does not by default set the dirty bit. Its GUI also offers much-finer granularity than microsoft's.
----- Original Message ----- | On Monday, 08 June 2015 at @07:06 zulu, Gordon Messmer wrote: | | > Why? If you use gparted (ntfsprogs, under the covers, IIRC), the system | > will chkdsk on the next boot. No such requirement exists with Microsoft's | > tools | | | | That's not been my experience... gparted does use ntfs-3g to work on NTFS | partitions (what linux-based tool doesn't?), but does not by default set | the dirty bit. Its GUI also offers much-finer granularity than microsoft's.
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.
Now call Microsoft and tell them that you used their tools to resize the file system and it is somehow corrupt and watch as they try to determine what happened recover that file system.
I've had experience with both and their technical support staff and management are far more likely to support you when something goes wrong if it's their tools rather than some third party systems. Just my 2c
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.
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.
On 06/09/2015 04:20 PM, Mark LaPierre wrote:
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.
Diagnosing that problem, specifically, is probably off topic, but I can assure you that the tools on Windows 7 can expand an active file system. I shrank and expanded a partition (the C:\ volume) on Windows 7 Home Basic this morning, and I'm absolutely certain that every version of Windows 7 (and Windows Server 2008) can resize an active NTFS volume, with no chkdsk required.
On 9 June 2015 at 21:41, John R Pierce pierce@hogranch.com 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.
-- john r pierce, recycling bits in santa cruz
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
What I normally do is power off the VM; add the drive I want to extend onto another windows VM and use Microsoft diskpart tool to extend the volume and it works in VMware, Virtual Box and KVM without fail or corrupting any file system.
I tried doing it inside the Win7 VM using the disk management tools but that didn't work either.
Within windows, use diskpart from a command shell:
C:>diskpart
Microsoft DiskPart version 6.3.9600
Copyright (C) 1999-2013 Microsoft Corporation. On computer: TEST
DISKPART> rescan
Please wait while DiskPart scans your configuration...
DiskPart has finished scanning your configuration.
DISKPART> lis dis
Disk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- --- Disk 0 Online 35 GB 3072 MB
DISKPART> lis vol
Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 D DVD-ROM 0 B No Media Volume 1 C Windows NTFS Partition 31 GB Healthy System
DISKPART> sel vol 1
Volume 1 is the selected volume.
DISKPART> extend
DiskPart successfully extended the volume.
DISKPART> lis vol
Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 D DVD-ROM 0 B No Media * Volume 1 C Windows NTFS Partition 34 GB Healthy System
DISKPART>