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. -- _ ?v? /(_)\ ^ ^ Mark LaPierre Registered Linux user No #267004 https://linuxcounter.net/ ****
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. -- Bob Nichols "NOSPAM" is really part of my email address. Do NOT delete it.
> 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>
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 thatAs 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.