[Libguestfs] Virt-resize error (ntfs) : Fatal error: exception Guestfs.Error("ntfsresize_opts: /dev/vda2)

Richard W.M. Jones rjones at redhat.com
Mon Nov 21 22:04:43 UTC 2011


On Mon, Nov 21, 2011 at 04:27:40PM +0000, Morgan Cox wrote:
> Hi.
> 
> (sorry I replyed in last email rather than posting to the list..)
> 
> Thanks - after issuing the commands it has correctly resized.. So it is
> possible to resize (with the extra steps..)
> 
> Here is the output from the ntfsresize command:-
[...]
> ----------------------------
> Welcome to virt-rescue, the libguestfs rescue shell.
> 
> Note: The contents of / are the rescue appliance.
> You have to mount the guest's partitions under /sysroot
> before you can examine them.
> 
> bash: cannot set terminal process group (-1): Inappropriate ioctl for device
> bash: no job control in this shell
> groups: cannot find name for group ID 0
> I have no name!@(none):/# ntfsresize /dev/vda2
> ntfsresize v2011.4.12AR.4 (libntfs-3g)
> Device name        : /dev/vda2
> NTFS volume version: 3.1
> Cluster size       : 4096 bytes
> Current volume size: 14925427200 bytes (14926 MB)
> Current device size: 32105103360 bytes (32106 MB)
> New volume size    : 32105099776 bytes (32106 MB)
> Checking filesystem consistency ...
> 100.00 percent completed
> Accounting clusters ...
> Space in use       : 7860 MB (52.7%)
> Collecting resizing constraints ...
> WARNING: Every sanity check passed and only the dangerous operations left.
> Make sure that important data has been backed up! Power outage or computer
> crash may result major data loss!
> Are you sure you want to proceed (y/[n])? y
> Schedule chkdsk for NTFS consistency check at Windows boot time ...
> Resetting $LogFile ... (this might take a while)
> Updating $BadClust file ...
> Updating $Bitmap file ...
> Updating Boot record ...
> Syncing device ...
> Successfully resized NTFS on device '/dev/vda2'.
> ----------------------------

I managed to track this down to some type of difference in the
ntfsresize utility in Ubuntu 11.10 vs Fedora 16, even though they are
almost the same version of the same program.

Attached is a test script that fails on Ubuntu 11.10, but works fine
on Fedora 16.  The failure on Ubuntu 11.10 is exactly the same as the
one you described.

  Fails with: ntfsresize v2011.4.12AR.4 (libntfs-3g) [Ubuntu 11.10]
  OK with: ntfsresize v2011.4.12 (libntfs-3g) [Fedora 16]

Fedora is carrying about half a dozen patches to ntfs-3g.  It's not
clear that there is a "smoking gun" amongst them, but until proven
otherwise I'm going to put this down to a bug in the Ubuntu package.
It's certainly worth investigating if someone has more spare time.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.sh
Type: application/x-sh
Size: 209 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20111121/4836ed1d/attachment.sh>


More information about the Libguestfs mailing list