Bug#752062: Fatal error: exception Guestfs.Error(ntfsresize_opts: /dev/vda2: )

2014-06-20 Thread Daniel Baumann

Control: close -1

Mathieu Malaterre ma...@debian.org wrote:
 Hum, I could rescue the disk after all

so i assume this can be closed then.

--
Address:Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email:  daniel.baum...@progress-technologies.net
Internet:   http://people.progress-technologies.net/~daniel.baumann/


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#752062: Fatal error: exception Guestfs.Error(ntfsresize_opts: /dev/vda2: )

2014-06-19 Thread Mathieu Malaterre
Package: ntfs-3g
Version: 1:2012.1.15AR.5-2.1
Severity: important

I cannot resize an ntfs partition, it fails with:

$ virsh --connect qemu:///system dumpxml Win7DELL-compilation | xpath
-e /domain/devices/disk/source
Found 2 nodes in stdin:
-- NODE --
source file=/var/lib/libvirt/images/Win7DELL-clone.img /
-- NODE --
source file=/var/lib/libvirt/images/Win7DELL.iso /
$ virt-filesystems --long --parts --blkdevs -h -a
/var/lib/libvirt/images/Win7DELL-clone.img
Name   Type   MBR  Size  Parent
/dev/sda1  partition  07   100M  /dev/sda
/dev/sda2  partition  07   30G   /dev/sda
/dev/sda   device -30G   -
$ sudo truncate -s 40G /var/lib/libvirt/images/outdisk
$ sudo su -
# virt-resize --expand /dev/sda2
/var/lib/libvirt/images/Win7DELL-clone.img
/var/lib/libvirt/images/outdisk
Examining /var/lib/libvirt/images/Win7DELL-clone.img ...
 100% 
⟦▓⟧
00:00
**

Summary of changes:

/dev/sda1: This partition will be left alone.

/dev/sda2: This partition will be resized from 29,9G to 39,9G.  The
filesystem ntfs on /dev/sda2 will be expanded using the
'ntfsresize' method.

**
Setting up initial partition table on /var/lib/libvirt/images/outdisk ...
Copying /dev/sda1 ...
Copying /dev/sda2 ...
 100% 
⟦▓⟧
00:00
 100% 
⟦▓⟧
00:00
Expanding /dev/sda2 using the 'ntfsresize' method ...
Fatal error: exception Guestfs.Error(ntfsresize_opts: /dev/vda2: )


Bug#752062:

2014-06-19 Thread Mathieu Malaterre
The following seems to be working nicely:

$ ./test.sh
libguestfs: trace: is_config
libguestfs: trace: is_config = 1
libguestfs: trace: add_drive_opts /tmp/test.img format:raw
libguestfs: trace: add_drive_opts = 0
libguestfs: trace: launch
libguestfs: trace: launch = 0
libguestfs: trace: pvcreate /dev/sda
libguestfs: trace: pvcreate = 0
libguestfs: trace: vgcreate VG /dev/sda
libguestfs: trace: vgcreate = 0
libguestfs: trace: lvcreate LV VG 100
libguestfs: trace: lvcreate = 0
libguestfs: trace: mkfs ntfs /dev/VG/LV
libguestfs: trace: mkfs = 0
libguestfs: trace: lvresize /dev/VG/LV 200
libguestfs: trace: lvresize = 0
libguestfs: trace: ntfsresize /dev/VG/LV
libguestfs: trace: ntfsresize = 0
libguestfs: trace: close
libguestfs: trace: internal_autosync
libguestfs: trace: internal_autosync = 0
libguestfs: trace: kill_subprocess
libguestfs: trace: kill_subprocess = 0

where:

$ cat test.sh
#!/bin/bash -

guestfish -x EOF
  sparse /tmp/test.img 500M
  run
  pvcreate /dev/sda
  vgcreate VG /dev/sda
  lvcreate LV VG 100
  mkfs ntfs /dev/VG/LV
  lvresize /dev/VG/LV 200
  ntfsresize /dev/VG/LV
EOF

ref:
https://www.redhat.com/archives/libguestfs/2011-November/msg00114.html


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#752062:

2014-06-19 Thread Mathieu Malaterre
Hum, I could rescue the disk after all:

# virt-rescue -a /var/lib/libvirt/images/outdisk
[0.00] Initializing cgroup subsys cpuset
[0.00] Initializing cgroup subsys cpu
[0.00] Linux version 3.2.0-4-amd64
(debian-ker...@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14)
) #1 SMP Debian 3.2.57-3+deb7u2
[0.00] Command line: panic=1 console=ttyS0 udevtimeout=300
no_timer_check acpi=off printk.time=1 cgroup_disable=memory selinux=0
TERM=xterm guestfs_rescue=1
[0.00] BIOS-provided physical RAM map:
[0.00]  BIOS-e820:  - 0009bc00 (usable)
[0.00]  BIOS-e820: 0009bc00 - 000a (reserved)
[0.00]  BIOS-e820: 000f - 0010 (reserved)
[0.00]  BIOS-e820: 0010 - 1f3fe000 (usable)
[0.00]  BIOS-e820: 1f3fe000 - 1f40 (reserved)
[0.00]  BIOS-e820: feffc000 - ff00 (reserved)
[0.00]  BIOS-e820: fffc - 0001 (reserved)
[0.00] NX (Execute Disable) protection: active
[0.00] SMBIOS 2.4 present.
[0.00] No AGP bridge found
[0.00] last_pfn = 0x1f3fe max_arch_pfn = 0x4
[0.00] PAT not supported by CPU.
[0.00] found SMP MP-table at [880fdaf0] fdaf0
[0.00] init_memory_mapping: -1f3fe000
[0.00] RAMDISK: 1f137000 - 1f3f
[0.00] No NUMA configuration found
[0.00] Faking a node at -1f3fe000
[0.00] Initmem setup node 0 -1f3fe000
[0.00]   NODE_DATA [1f3f6000 - 1f3fafff]
[0.00] kvm-clock: Using msrs 4b564d01 and 4b564d00
[0.00] kvm-clock: cpu 0, msr 0:16a9701, boot clock
[0.00] Zone PFN ranges:
[0.00]   DMA  0x0010 - 0x1000
[0.00]   DMA320x1000 - 0x0010
[0.00]   Normal   empty
[0.00] Movable zone start PFN for each node
[0.00] early_node_map[2] active PFN ranges
[0.00] 0: 0x0010 - 0x009b
[0.00] 0: 0x0100 - 0x0001f3fe
[0.00] SFI: Simple Firmware Interface v0.81 http://simplefirmware.org
[0.00] Intel MultiProcessor Specification v1.4
[0.00] MPTABLE: OEM ID: BOCHSCPU
[0.00] MPTABLE: Product ID: 0.1
[0.00] MPTABLE: APIC at: 0xFEE0
[0.00] Processor #0 (Bootup-CPU)
[0.00] IOAPIC[0]: apic_id 1, version 17, address 0xfec0, GSI 0-23
[0.00] Processors: 1
[0.00] SMP: Allowing 1 CPUs, 0 hotplug CPUs
[0.00] PM: Registered nosave memory: 0009b000 - 0009c000
[0.00] PM: Registered nosave memory: 0009c000 - 000a
[0.00] PM: Registered nosave memory: 000a - 000f
[0.00] PM: Registered nosave memory: 000f - 0010
[0.00] Allocating PCI resources starting at 1f40 (gap:
1f40:dfbfc000)
[0.00] Booting paravirtualized kernel on KVM
[0.00] setup_percpu: NR_CPUS:512 nr_cpumask_bits:512
nr_cpu_ids:1 nr_node_ids:1
[0.00] PERCPU: Embedded 28 pages/cpu @88001ee0 s82944
r8192 d23552 u2097152
[0.00] kvm-clock: cpu 0, msr 0:1ee13701, primary cpu clock
[0.00] KVM setup async PF for cpu 0
[0.00] kvm-stealtime: cpu 0, msr 1ee0dfc0
[0.00] Built 1 zonelists in Node order, mobility grouping on.
Total pages: 126126
[0.00] Policy zone: DMA32
[0.00] Kernel command line: panic=1 console=ttyS0
udevtimeout=300 no_timer_check acpi=off printk.time=1
cgroup_disable=memory selinux=0  TERM=xterm guestfs_rescue=1
[0.00] Disabling memory control group subsystem
[0.00] PID hash table entries: 2048 (order: 2, 16384 bytes)
[0.00] Checking aperture...
[0.00] No AGP bridge found
[0.00] Memory: 491932k/511992k available (3429k kernel code,
468k absent, 19592k reserved, 3310k data, 580k init)
[0.00] Hierarchical RCU implementation.
[0.00] RCU dyntick-idle grace-period acceleration is enabled.
[0.00] NR_IRQS:33024 nr_irqs:256 16
[0.00] Console: colour *CGA 80x25
[0.00] console [ttyS0] enabled
[0.00] Detected 1862.048 MHz processor.
[0.008000] Calibrating delay loop (skipped) preset value.. 3724.09
BogoMIPS (lpj=7448192)
[0.008009] pid_max: default: 32768 minimum: 301
[0.009641] Security Framework initialized
[0.011029] AppArmor: AppArmor disabled by boot time parameter
[0.012143] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
[0.016575] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
[0.019299] Mount-cache hash table entries: 256
[0.020447] Initializing cgroup subsys cpuacct
[0.021937] Initializing cgroup subsys memory
[0.024050] Initializing cgroup subsys devices
[0.025519] Initializing cgroup