Phill Bandelow
2012-Dec-15 17:04 UTC
[Libguestfs] virt-resize Fatal error: exception Guestfs.Error("e2fsck_f
We?ve been seeing this a lot lately on generic CentOS 6 rpm installs:
rpm -qa | grep libguestfs
libguestfs-java-1.16.19-1.el6.x86_64
libguestfs-java-devel-1.16.19-1.el6.x86_64
libguestfs-1.16.19-1.el6.x86_64
libguestfs-tools-1.16.19-1.el6.x86_64
libguestfs-javadoc-1.16.19-1.el6.x86_64
libguestfs-devel-1.16.19-1.el6.x86_64
libguestfs-tools-c-1.16.19-1.el6.x86_64
libguestfs-winsupport-1.0-7.el6.x86_64
libguestfs-debuginfo-1.7.17-26.el6.x86_64
[root at torpedo ~]# virt-resize -d --resize /dev/sda2=512M --expand /dev/sda1
/home/solusvm/kvm/template/linux-ubuntu-12.04-server-x86_64-min-gen2-v1.gz
/dev/vg0/kvm105_img
command line: virt-resize -d --resize /dev/sda2=512M --expand /dev/sda1
/home/solusvm/kvm/template/linux-ubuntu-12.04-server-x86_64-min-gen2-v1.gz
/dev/vg0/kvm105_img
Examining
/home/solusvm/kvm/template/linux-ubuntu-12.04-server-x86_64-min-gen2-v1.gz ...
libguestfs: trace: add_drive_opts
"/home/solusvm/kvm/template/linux-ubuntu-12.04-server-x86_64-min-gen2-v1.gz"
"readonly:true"
libguestfs: trace: add_drive_opts = 0
libguestfs: trace: add_drive_opts "/dev/vg0/kvm105_img"
"readonly:false"
libguestfs: trace: add_drive_opts = 0
libguestfs: trace: launch
libguestfs: trace: launch = 0
libguestfs: trace: lvm_set_filter "/dev/sda"
libguestfs: trace: lvm_set_filter = 0
libguestfs: trace: available "ntfsprogs ntfs3g"
libguestfs: trace: available = 0
libguestfs: trace: available "btrfs"
libguestfs: trace: available = 0
libguestfs: trace: blockdev_getss "/dev/sdb"
libguestfs: trace: blockdev_getss = 512
libguestfs: trace: blockdev_getsize64 "/dev/sda"
libguestfs: trace: blockdev_getsize64 = 1073741824
libguestfs: trace: blockdev_getsize64 "/dev/sdb"
libguestfs: trace: blockdev_getsize64 = 42949672960
libguestfs: trace: part_get_parttype "/dev/sda"
libguestfs: trace: part_get_parttype = "msdos"
/home/solusvm/kvm/template/linux-ubuntu-12.04-server-x86_64-min-gen2-v1.gz size
1073741824 bytes
/dev/vg0/kvm105_img size 42949672960 bytes
partition table type: msdos
libguestfs: trace: pvs_full
libguestfs: trace: pvs_full = <struct guestfs_lvm_pv_list *>
libguestfs: trace: part_list "/dev/sda"
libguestfs: trace: part_list = <struct guestfs_partition_list *>
libguestfs: trace: part_get_bootable "/dev/sda" 1
libguestfs: trace: part_get_bootable = 1
libguestfs: trace: part_get_mbr_id "/dev/sda" 1
libguestfs: trace: part_get_mbr_id = 131
libguestfs: trace: vfs_type "/dev/sda1"
libguestfs: trace: vfs_type = "ext4"
libguestfs: trace: mount_ro "/dev/sda1" "/"
libguestfs: trace: mount_ro = 0
libguestfs: trace: statvfs "/"
libguestfs: trace: statvfs = <struct guestfs_statvfs *>
libguestfs: trace: part_get_bootable "/dev/sda" 2
libguestfs: trace: part_get_bootable = 0
libguestfs: trace: part_get_mbr_id "/dev/sda" 2
libguestfs: trace: part_get_mbr_id = 130
libguestfs: trace: vfs_type "/dev/sda2"
libguestfs: trace: vfs_type = "ext3"
libguestfs: trace: mount_ro "/dev/sda2" "/"
libguestfs: trace: mount_ro = 0
libguestfs: trace: statvfs "/"
libguestfs: trace: statvfs = <struct guestfs_statvfs *>
libguestfs: trace: lvs
libguestfs: trace: lvs = []
2 partitions found
/dev/sda1:
partition data: 1 1048576-1000341503 (999292928 bytes)
bootable: true
partition ID: 0x83
content: filesystem ext4 (983556096 bytes)
/dev/sda2:
partition data: 2 1000341504-1072693247 (72351744 bytes)
bootable: false
partition ID: 0x82
content: filesystem ext3 (70054912 bytes)
0 logical volumes found
surplus before --expand or --shrink: 41411182592
**********
Summary of changes:
/dev/sda1: This partition will be resized from 953.0M to 39.5G. The
filesystem ext4 on /dev/sda1 will be expanded using the 'resize2fs'
method.
/dev/sda2: This partition will be resized from 69.0M to 512.0M. The
filesystem ext3 on /dev/sda2 will be expanded using the 'resize2fs'
method.
**********
Setting up initial partition table on /dev/vg0/kvm105_img ...
libguestfs: trace: part_init "/dev/sdb" "msdos"
libguestfs: trace: part_init = 0
libguestfs: trace: pread_device "/dev/sda" 446 0
libguestfs: trace: pread_device =
"\xebc\x90\x10\x8e\xd0\xbc\x00\xb0\xb8\x00\x00\x8e\xd8\x8e\xc0\xfb\xbe\x00|\xbf\x00\x06\xb9\x00\x02\xf3\xa4\xea!\x06\x00\x00\xbe\xbe\x078\x04u\x0b\x83\xc6\x10\x81\xfe\xfe\x07u\xf3\xeb\x16\xb4\x02\xb0\x01\xbb\x00|\xb2\x80\x8at\x01\x8bL\x02\xcd\x13\xea\x00|\x00\x00\xeb\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00\xff\xfa\x90\x90\xf6\xc2\x80t\x05\xf6\xc2pt\x02\xb2\x80\xeay|\x00\x001\xc0\x8e\xd8\x8e\xd0\xbc\x00
\xfb\xa0d|<\xfft\x02\x88\xc2R\xbb\x17\x04\x80'\x03t\x06\xbe\x88}\xe8\x17\x01\xbe\x05|\xb4A\xbb\xaaU\xcd\x13ZRr=\x81\xfbU\xaau7\x83\xe1\x01t21\xc0\x89D\x04@\x88D\xff\x89D\x02\xc7\x04\x10\x00f\x8b\x1e\|f\x89\\x08f\x8b\x1e`|f\x89\\x0c\xc7D\x06\x00p\xb4B\xcd\x13r\x05\xbb\x00p\xebv\xb4\x08\xcd\x13s\x0d\xf6\xc2\x80\x0f\x84\xd0\x00\xbe\x93}\xe9\x82\x00f\x0f\xb6\xc6\x88d\xff"<truncated,
original size 446 bytes>
libguestfs: trace: pwrite_device "/dev/sdb"
"\xebc\x90\x10\x8e\xd0\xbc\x00\xb0\xb8\x00\x00\x8e\xd8\x8e\xc0\xfb\xbe\x00|\xbf\x00\x06\xb9\x00\x02\xf3\xa4\xea!\x06\x00\x00\xbe\xbe\x078\x04u\x0b\x83\xc6\x10\x81\xfe\xfe\x07u\xf3\xeb\x16\xb4\x02\xb0\x01\xbb\x00|\xb2\x80\x8at\x01\x8bL\x02\xcd\x13\xea\x00|\x00\x00\xeb\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00\xff\xfa\x90\x90\xf6\xc2\x80t\x05\xf6\xc2pt\x02\xb2\x80\xeay|\x00\x001\xc0\x8e\xd8\x8e\xd0\xbc\x00
\xfb\xa0d|<\xfft\x02\x88\xc2R\xbb\x17\x04\x80'\x03t\x06\xbe\x88}\xe8\x17\x01\xbe\x05|\xb4A\xbb\xaaU\xcd\x13ZRr=\x81\xfbU\xaau7\x83\xe1\x01t21\xc0\x89D\x04@\x88D\xff\x89D\x02\xc7\x04\x10\x00f\x8b\x1e\|f\x89\\x08f\x8b\x1e`|f\x89\\x0c\xc7D\x06\x00p\xb4B\xcd\x13r\x05\xbb\x00p\xebv\xb4\x08\xcd\x13s\x0d\xf6\xc2\x80\x0f\x84\xd0\x00\xbe\x93}\xe9\x82\x00f\x0f\xb6\xc6\x88d\xff"<truncated,
original size 446 bytes> 0
libguestfs: trace: pwrite_device = 446
libguestfs: trace: pread_device "/dev/sda" 2097152 512
libguestfs: trace: pread_device =
"R\xe8(\x01t\x08V\xbe3\x81\xe8L\x01^\xbf\xf4\x81f\x8b-\x83}\x08\x00\x0f\x84\xe9\x00\x80|\xff\x00tFf\x8b\x1df\x8bM\x04f1\xc0\xb0\x7f9E\x08\x7f\x03\x8bE\x08)E\x08f\x01\x05f\x83U\x04\x00\xc7\x04\x10\x00\x89D\x02f\x89\\x08f\x89L\x0c\xc7D\x06\x00pP\xc7D\x04\x00\x00\xb4B\xcd\x13\x0f\x82\xbb\x00\xbb\x00p\xebhf\x8bE\x04f\x09\xc0\x0f\x85\xa3\x00f\x8b\x05f1\xd2f\xf74\x88T\x0af1\xd2f\xf7t\x04\x88T\x0b\x89D\x0c;D\x08\x0f\x8d\x83\x00\x8b\x04*D\x0a9E\x08\x7f\x03\x8bE\x08)E\x08f\x01\x05f\x83U\x04\x00\x8aT\x0d\xc0\xe2\x06\x8aL\x0a\xfe\xc1\x08\xd1\x8al\x0cZR\x8at\x0bP\xbb\x00p\x8e\xc31\xdb\xb4\x02\xcd\x13rP\x8c\xc3\x8eE\x0aX\xc1\xe0\x05\x01E\x0a`\x1e\xc1\xe0\x03\x89\xc11\xff1\xf6\x8e\xdb\xfc\xf3\xa5\x1f\xe8>\x00t\x06\xbe;\x81\xe8c\x00a\x83}\x08\x00\x0f\x85\x1d\xff\x83"<truncated,
original size 2097152 bytes>
libguestfs: trace: pwrite_device "/dev/sdb"
"R\xe8(\x01t\x08V\xbe3\x81\xe8L\x01^\xbf\xf4\x81f\x8b-\x83}\x08\x00\x0f\x84\xe9\x00\x80|\xff\x00tFf\x8b\x1df\x8bM\x04f1\xc0\xb0\x7f9E\x08\x7f\x03\x8bE\x08)E\x08f\x01\x05f\x83U\x04\x00\xc7\x04\x10\x00\x89D\x02f\x89\\x08f\x89L\x0c\xc7D\x06\x00pP\xc7D\x04\x00\x00\xb4B\xcd\x13\x0f\x82\xbb\x00\xbb\x00p\xebhf\x8bE\x04f\x09\xc0\x0f\x85\xa3\x00f\x8b\x05f1\xd2f\xf74\x88T\x0af1\xd2f\xf7t\x04\x88T\x0b\x89D\x0c;D\x08\x0f\x8d\x83\x00\x8b\x04*D\x0a9E\x08\x7f\x03\x8bE\x08)E\x08f\x01\x05f\x83U\x04\x00\x8aT\x0d\xc0\xe2\x06\x8aL\x0a\xfe\xc1\x08\xd1\x8al\x0cZR\x8at\x0bP\xbb\x00p\x8e\xc31\xdb\xb4\x02\xcd\x13rP\x8c\xc3\x8eE\x0aX\xc1\xe0\x05\x01E\x0a`\x1e\xc1\xe0\x03\x89\xc11\xff1\xf6\x8e\xdb\xfc\xf3\xa5\x1f\xe8>\x00t\x06\xbe;\x81\xe8c\x00a\x83}\x08\x00\x0f\x85\x1d\xff\x83"<truncated,
original size 2097152 bytes> 512
libguestfs: trace: pwrite_device = 2097152
align_first_partition_and_fix_bootloader = false
libguestfs: trace: part_add "/dev/sdb" "primary" 2048
82835071
libguestfs: trace: part_add = 0
libguestfs: trace: part_add "/dev/sdb" "primary" 82835072
83883647
libguestfs: trace: part_add = 0
Copying /dev/sda1 ...
libguestfs: trace: copy_device_to_device "/dev/sda1"
"/dev/sdb1" "size:999292928"
100%
?????????????????????????????????????????????????????????????????????????????????????????????????????????????????
00:00
libguestfs: trace: copy_device_to_device = 0
Copying /dev/sda2 ...
libguestfs: trace: copy_device_to_device "/dev/sda2"
"/dev/sdb2" "size:72351744"
libguestfs: trace: copy_device_to_device = 0
libguestfs: trace: part_set_bootable "/dev/sdb" 1 true
libguestfs: trace: part_set_bootable = 0
libguestfs: trace: part_set_mbr_id "/dev/sdb" 1 131
libguestfs: trace: part_set_mbr_id = 0
libguestfs: trace: part_set_mbr_id "/dev/sdb" 2 130
libguestfs: trace: part_set_mbr_id = 0
libguestfs: trace: umount_all
libguestfs: trace: umount_all = 0
libguestfs: trace: sync
libguestfs: trace: sync = 0
libguestfs: trace: close
libguestfs: trace: internal_autosync
libguestfs: trace: internal_autosync = 0
libguestfs: trace: kill_subprocess
libguestfs: trace: kill_subprocess = 0
libguestfs: trace: add_drive_opts "/dev/vg0/kvm105_img"
"readonly:false"
libguestfs: trace: add_drive_opts = 0
libguestfs: trace: launch
libguestfs: trace: launch = 0
Expanding /dev/sda1 using the 'resize2fs' method ...
libguestfs: trace: e2fsck_f "/dev/sda1"
libguestfs: trace: e2fsck_f = -1 (error)
Fatal error: exception Guestfs.Error("e2fsck_f:
/dev/vda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)")
libguestfs: trace: close
libguestfs: trace: internal_autosync
libguestfs: trace: internal_autosync = 0
libguestfs: trace: kill_subprocess
libguestfs: trace: kill_subprocess = 0
[root at torpedo ~]# rpm -qa | grep libguestfs
libguestfs-tools-c-1.16.19-1.el6.x86_64
libguestfs-winsupport-1.0-7.el6.x86_64
libguestfs-1.16.19-1.el6.x86_64
libguestfs-tools-1.16.19-1.el6.x86_64
libguestfs-javadoc-1.16.19-1.el6.x86_64
libguestfs-devel-1.16.19-1.el6.x86_64
libguestfs-debuginfo-1.7.17-26.el6.x86_64
libguestfs-java-1.16.19-1.el6.x86_64
libguestfs-java-devel-1.16.19-1.el6.x86_64
[root at torpedo ~]#
However on another host it works fine using the same source image:
[root at dev1 ~]# virt-resize -d --resize /dev/sda2=512M --expand /dev/sda1
/home/solusvm/kvm/template/linux-ubuntu-12.04-server-x86_64-min-gen2-v1.gz
/dev/vps/kvm109_img
command line: virt-resize -d --resize /dev/sda2=512M --expand /dev/sda1
/home/solusvm/kvm/template/linux-ubuntu-12.04-server-x86_64-min-gen2-v1.gz
/dev/vps/kvm109_img
Examining
/home/solusvm/kvm/template/linux-ubuntu-12.04-server-x86_64-min-gen2-v1.gz ...
libguestfs: trace: add_drive_opts
"/home/solusvm/kvm/template/linux-ubuntu-12.04-server-x86_64-min-gen2-v1.gz"
"readonly:true"
libguestfs: trace: add_drive_opts = 0
libguestfs: trace: add_drive_opts "/dev/vps/kvm109_img"
"readonly:false"
libguestfs: trace: add_drive_opts = 0
libguestfs: trace: launch
libguestfs: trace: launch = 0
libguestfs: trace: lvm_set_filter "/dev/sda"
libguestfs: trace: lvm_set_filter = 0
libguestfs: trace: available "ntfsprogs ntfs3g"
libguestfs: trace: available = 0
libguestfs: trace: available "btrfs"
libguestfs: trace: available = 0
libguestfs: trace: blockdev_getss "/dev/sdb"
libguestfs: trace: blockdev_getss = 512
libguestfs: trace: blockdev_getsize64 "/dev/sda"
libguestfs: trace: blockdev_getsize64 = 1073741824
libguestfs: trace: blockdev_getsize64 "/dev/sdb"
libguestfs: trace: blockdev_getsize64 = 107374182400
libguestfs: trace: part_get_parttype "/dev/sda"
libguestfs: trace: part_get_parttype = "msdos"
/home/solusvm/kvm/template/linux-ubuntu-12.04-server-x86_64-min-gen2-v1.gz size
1073741824 bytes
/dev/vps/kvm109_img size 107374182400 bytes
partition table type: msdos
libguestfs: trace: pvs_full
libguestfs: trace: pvs_full = <struct guestfs_lvm_pv_list *>
libguestfs: trace: part_list "/dev/sda"
libguestfs: trace: part_list = <struct guestfs_partition_list *>
libguestfs: trace: part_get_bootable "/dev/sda" 1
libguestfs: trace: part_get_bootable = 1
libguestfs: trace: part_get_mbr_id "/dev/sda" 1
libguestfs: trace: part_get_mbr_id = 131
libguestfs: trace: vfs_type "/dev/sda1"
libguestfs: trace: vfs_type = "ext4"
libguestfs: trace: mount_ro "/dev/sda1" "/"
libguestfs: trace: mount_ro = 0
libguestfs: trace: statvfs "/"
libguestfs: trace: statvfs = <struct guestfs_statvfs *>
libguestfs: trace: part_get_bootable "/dev/sda" 2
libguestfs: trace: part_get_bootable = 0
libguestfs: trace: part_get_mbr_id "/dev/sda" 2
libguestfs: trace: part_get_mbr_id = 130
libguestfs: trace: vfs_type "/dev/sda2"
libguestfs: trace: vfs_type = "ext3"
libguestfs: trace: mount_ro "/dev/sda2" "/"
libguestfs: trace: mount_ro = 0
libguestfs: trace: statvfs "/"
libguestfs: trace: statvfs = <struct guestfs_statvfs *>
libguestfs: trace: lvs
libguestfs: trace: lvs = []
2 partitions found
/dev/sda1:
partition data: 1 1048576-1000341503 (999292928 bytes)
bootable: true
partition ID: 0x83
content: filesystem ext4 (983556096 bytes)
/dev/sda2:
partition data: 2 1000341504-1072693247 (72351744 bytes)
bootable: false
partition ID: 0x82
content: filesystem ext3 (70054912 bytes)
0 logical volumes found
surplus before --expand or --shrink: 105835692032
**********
Summary of changes:
/dev/sda1: This partition will be resized from 953.0M to 99.5G. The
filesystem ext4 on /dev/sda1 will be expanded using the 'resize2fs'
method.
/dev/sda2: This partition will be resized from 69.0M to 512.0M. The
filesystem ext3 on /dev/sda2 will be expanded using the 'resize2fs'
method.
**********
Setting up initial partition table on /dev/vps/kvm109_img ...
libguestfs: trace: part_init "/dev/sdb" "msdos"
libguestfs: trace: part_init = 0
libguestfs: trace: pread_device "/dev/sda" 446 0
libguestfs: trace: pread_device =
"\xebc\x90\x10\x8e\xd0\xbc\x00\xb0\xb8\x00\x00\x8e\xd8\x8e\xc0\xfb\xbe\x00|\xbf\x00\x06\xb9\x00\x02\xf3\xa4\xea!\x06\x00\x00\xbe\xbe\x078\x04u\x0b\x83\xc6\x10\x81\xfe\xfe\x07u\xf3\xeb\x16\xb4\x02\xb0\x01\xbb\x00|\xb2\x80\x8at\x01\x8bL\x02\xcd\x13\xea\x00|\x00\x00\xeb\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00\xff\xfa\x90\x90\xf6\xc2\x80t\x05\xf6\xc2pt\x02\xb2\x80\xeay|\x00\x001\xc0\x8e\xd8\x8e\xd0\xbc\x00
\xfb\xa0d|<\xfft\x02\x88\xc2R\xbb\x17\x04\x80'\x03t\x06\xbe\x88}\xe8\x17\x01\xbe\x05|\xb4A\xbb\xaaU\xcd\x13ZRr=\x81\xfbU\xaau7\x83\xe1\x01t21\xc0\x89D\x04@\x88D\xff\x89D\x02\xc7\x04\x10\x00f\x8b\x1e\|f\x89\\x08f\x8b\x1e`|f\x89\\x0c\xc7D\x06\x00p\xb4B\xcd\x13r\x05\xbb\x00p\xebv\xb4\x08\xcd\x13s\x0d\xf6\xc2\x80\x0f\x84\xd0\x00\xbe\x93}\xe9\x82\x00f\x0f\xb6\xc6\x88d\xff"<truncated,
original size 446 bytes>
libguestfs: trace: pwrite_device "/dev/sdb"
"\xebc\x90\x10\x8e\xd0\xbc\x00\xb0\xb8\x00\x00\x8e\xd8\x8e\xc0\xfb\xbe\x00|\xbf\x00\x06\xb9\x00\x02\xf3\xa4\xea!\x06\x00\x00\xbe\xbe\x078\x04u\x0b\x83\xc6\x10\x81\xfe\xfe\x07u\xf3\xeb\x16\xb4\x02\xb0\x01\xbb\x00|\xb2\x80\x8at\x01\x8bL\x02\xcd\x13\xea\x00|\x00\x00\xeb\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x01\x00\x00\x00\x00\x00\x00\x00\xff\xfa\x90\x90\xf6\xc2\x80t\x05\xf6\xc2pt\x02\xb2\x80\xeay|\x00\x001\xc0\x8e\xd8\x8e\xd0\xbc\x00
\xfb\xa0d|<\xfft\x02\x88\xc2R\xbb\x17\x04\x80'\x03t\x06\xbe\x88}\xe8\x17\x01\xbe\x05|\xb4A\xbb\xaaU\xcd\x13ZRr=\x81\xfbU\xaau7\x83\xe1\x01t21\xc0\x89D\x04@\x88D\xff\x89D\x02\xc7\x04\x10\x00f\x8b\x1e\|f\x89\\x08f\x8b\x1e`|f\x89\\x0c\xc7D\x06\x00p\xb4B\xcd\x13r\x05\xbb\x00p\xebv\xb4\x08\xcd\x13s\x0d\xf6\xc2\x80\x0f\x84\xd0\x00\xbe\x93}\xe9\x82\x00f\x0f\xb6\xc6\x88d\xff"<truncated,
original size 446 bytes> 0
libguestfs: trace: pwrite_device = 446
libguestfs: trace: pread_device "/dev/sda" 2097152 512
libguestfs: trace: pread_device =
"R\xe8(\x01t\x08V\xbe3\x81\xe8L\x01^\xbf\xf4\x81f\x8b-\x83}\x08\x00\x0f\x84\xe9\x00\x80|\xff\x00tFf\x8b\x1df\x8bM\x04f1\xc0\xb0\x7f9E\x08\x7f\x03\x8bE\x08)E\x08f\x01\x05f\x83U\x04\x00\xc7\x04\x10\x00\x89D\x02f\x89\\x08f\x89L\x0c\xc7D\x06\x00pP\xc7D\x04\x00\x00\xb4B\xcd\x13\x0f\x82\xbb\x00\xbb\x00p\xebhf\x8bE\x04f\x09\xc0\x0f\x85\xa3\x00f\x8b\x05f1\xd2f\xf74\x88T\x0af1\xd2f\xf7t\x04\x88T\x0b\x89D\x0c;D\x08\x0f\x8d\x83\x00\x8b\x04*D\x0a9E\x08\x7f\x03\x8bE\x08)E\x08f\x01\x05f\x83U\x04\x00\x8aT\x0d\xc0\xe2\x06\x8aL\x0a\xfe\xc1\x08\xd1\x8al\x0cZR\x8at\x0bP\xbb\x00p\x8e\xc31\xdb\xb4\x02\xcd\x13rP\x8c\xc3\x8eE\x0aX\xc1\xe0\x05\x01E\x0a`\x1e\xc1\xe0\x03\x89\xc11\xff1\xf6\x8e\xdb\xfc\xf3\xa5\x1f\xe8>\x00t\x06\xbe;\x81\xe8c\x00a\x83}\x08\x00\x0f\x85\x1d\xff\x83"<truncated,
original size 2097152 bytes>
libguestfs: trace: pwrite_device "/dev/sdb"
"R\xe8(\x01t\x08V\xbe3\x81\xe8L\x01^\xbf\xf4\x81f\x8b-\x83}\x08\x00\x0f\x84\xe9\x00\x80|\xff\x00tFf\x8b\x1df\x8bM\x04f1\xc0\xb0\x7f9E\x08\x7f\x03\x8bE\x08)E\x08f\x01\x05f\x83U\x04\x00\xc7\x04\x10\x00\x89D\x02f\x89\\x08f\x89L\x0c\xc7D\x06\x00pP\xc7D\x04\x00\x00\xb4B\xcd\x13\x0f\x82\xbb\x00\xbb\x00p\xebhf\x8bE\x04f\x09\xc0\x0f\x85\xa3\x00f\x8b\x05f1\xd2f\xf74\x88T\x0af1\xd2f\xf7t\x04\x88T\x0b\x89D\x0c;D\x08\x0f\x8d\x83\x00\x8b\x04*D\x0a9E\x08\x7f\x03\x8bE\x08)E\x08f\x01\x05f\x83U\x04\x00\x8aT\x0d\xc0\xe2\x06\x8aL\x0a\xfe\xc1\x08\xd1\x8al\x0cZR\x8at\x0bP\xbb\x00p\x8e\xc31\xdb\xb4\x02\xcd\x13rP\x8c\xc3\x8eE\x0aX\xc1\xe0\x05\x01E\x0a`\x1e\xc1\xe0\x03\x89\xc11\xff1\xf6\x8e\xdb\xfc\xf3\xa5\x1f\xe8>\x00t\x06\xbe;\x81\xe8c\x00a\x83}\x08\x00\x0f\x85\x1d\xff\x83"<truncated,
original size 2097152 bytes> 512
libguestfs: trace: pwrite_device = 2097152
align_first_partition_and_fix_bootloader = false
libguestfs: trace: part_add "/dev/sdb" "primary" 2048
208664191
libguestfs: trace: part_add = 0
libguestfs: trace: part_add "/dev/sdb" "primary" 208664192
209712767
libguestfs: trace: part_add = 0
Copying /dev/sda1 ...
libguestfs: trace: copy_device_to_device "/dev/sda1"
"/dev/sdb1" "size:999292928"
100%
[############################################################################################################################################]
00:00
libguestfs: trace: copy_device_to_device = 0
Copying /dev/sda2 ...
libguestfs: trace: copy_device_to_device "/dev/sda2"
"/dev/sdb2" "size:72351744"
libguestfs: trace: copy_device_to_device = 0
libguestfs: trace: part_set_bootable "/dev/sdb" 1 true
libguestfs: trace: part_set_bootable = 0
libguestfs: trace: part_set_mbr_id "/dev/sdb" 1 131
libguestfs: trace: part_set_mbr_id = 0
libguestfs: trace: part_set_mbr_id "/dev/sdb" 2 130
libguestfs: trace: part_set_mbr_id = 0
libguestfs: trace: umount_all
libguestfs: trace: umount_all = 0
libguestfs: trace: sync
libguestfs: trace: sync = 0
libguestfs: trace: close
libguestfs: trace: internal_autosync
libguestfs: trace: internal_autosync = 0
libguestfs: trace: kill_subprocess
libguestfs: trace: kill_subprocess = 0
libguestfs: trace: add_drive_opts "/dev/vps/kvm109_img"
"readonly:false"
libguestfs: trace: add_drive_opts = 0
libguestfs: trace: launch
libguestfs: trace: launch = 0
Expanding /dev/sda1 using the 'resize2fs' method ...
libguestfs: trace: e2fsck_f "/dev/sda1"
libguestfs: trace: e2fsck_f = 0
libguestfs: trace: resize2fs "/dev/sda1"
libguestfs: trace: resize2fs = 0
Expanding /dev/sda2 using the 'resize2fs' method ...
libguestfs: trace: e2fsck_f "/dev/sda2"
libguestfs: trace: e2fsck_f = 0
libguestfs: trace: resize2fs "/dev/sda2"
libguestfs: trace: resize2fs = 0
libguestfs: trace: umount_all
libguestfs: trace: umount_all = 0
libguestfs: trace: sync
libguestfs: trace: sync = 0
libguestfs: trace: close
libguestfs: trace: internal_autosync
libguestfs: trace: internal_autosync = 0
libguestfs: trace: kill_subprocess
libguestfs: trace: kill_subprocess = 0
Resize operation completed with no errors. Before deleting the old
disk, carefully check that the resized disk boots and works correctly.
[root at dev1 ~]# rpm -qa | grep libguestfs
libguestfs-java-1.16.19-1.el6.x86_64
libguestfs-java-devel-1.16.19-1.el6.x86_64
libguestfs-1.16.19-1.el6.x86_64
libguestfs-tools-1.16.19-1.el6.x86_64
libguestfs-javadoc-1.16.19-1.el6.x86_64
libguestfs-devel-1.16.19-1.el6.x86_64
libguestfs-tools-c-1.16.19-1.el6.x86_64
libguestfs-winsupport-1.0-7.el6.x86_64
libguestfs-debuginfo-1.7.17-26.el6.x86_64
[root at dev1 ~]#
Both the servers are on CentOS 6 using the same kernel and are fully updated.
Regards
Phill
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://listman.redhat.com/archives/libguestfs/attachments/20121215/a0c15a72/attachment.htm>
Richard W.M. Jones
2012-Dec-15 19:56 UTC
[Libguestfs] virt-resize Fatal error: exception Guestfs.Error("e2fsck_f
On Sat, Dec 15, 2012 at 05:04:40PM -0000, Phill Bandelow wrote:> Fatal error: exception Guestfs.Error("e2fsck_f: > /dev/vda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. > (i.e., without -a or -p options)")To try to summarise a rather long IRC conversation for the benefit of history; what's happening is: (1) virt-resize calls the libguestfs resize2fs API. (2) The libguestfs resize2fs API will try to run e2fsck on the filesystem first, since resize2fs in offline mode needs that. https://github.com/libguestfs/libguestfs/blob/master/daemon/ext2.c#L186 (3) e2fsck (ie. the host program) is failing. (4) The failure is surely something to do with either the filesystem or the e2fsck program or (not likely) something else. Phill kindly supplied me with LIBGUESTFS_DEBUG=1 output, but e2fsck didn't print any more information about the problem. I would need to spend a lot more time looking at e2fsprogs and the filesystem image to work out what's going on here. I suggested to Phill that he file a bug (see: http://libguestfs.org/) if it continues to be a problem. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
Apparently Analagous Threads
- Re: virt-customize fail to inject firstboot script when running it from script.
- DsReplicaSync failed - WERR_LOGON_FAILURE // Failed to bind to uuid for ncacn_ip_tcp - NT_STATUS_LOGON_FAILURE
- Re: virt-customize fail to inject firstboot script when running it from script.
- virt-customize fail to inject firstboot script when running it from script.
- R on Solaris 10 x64