n1.ovirt.local # lsblk sdb 8:16 0 3.5T 0 disk └─3600508b1001c28ef5974c4bc1d1b5555 253:17 0 3.5T 0 mpath ├─gluster_vg_sdb-gluster_lv_engine 253:12 0 100G 0 lvm /gluster_bricks/engine ├─gluster_vg_sdb-gluster_thinpool_gluster_vg_sdb_tmeta 253:13 0 15G 0 lvm │ └─gluster_vg_sdb-gluster_thinpool_gluster_vg_sdb-tpool 253:15 0 3.4T 0 lvm │ ├─gluster_vg_sdb-gluster_thinpool_gluster_vg_sdb 253:16 0 3.4T 1 lvm │ ├─gluster_vg_sdb-gluster_lv_vmstore 253:18 0 3T 0 lvm /gluster_bricks/vmstore │ ├─gluster_vg_sdb-gluster_lv_isos 253:19 0 100G 0 lvm /gluster_bricks/isos │ └─gluster_vg_sdb-gluster_lv_images 253:20 0 200G 0 lvm /gluster_bricks/images ... # mount | grep gluster /dev/mapper/gluster_vg_sdb-gluster_lv_engine on /gluster_bricks/engine type xfs ... /dev/mapper/gluster_vg_sdb-gluster_lv_vmstore on /gluster_bricks/vmstore type xfs ... /dev/mapper/gluster_vg_sdb-gluster_lv_isos on /gluster_bricks/isos type xfs ... /dev/mapper/gluster_vg_sdb-gluster_lv_images on /gluster_bricks/images type xfs ... n1.ovirt.local:/engine on /rhev/data-center/mnt/glusterSD/n1.ovirt.local:_engine type fuse.glusterfs ... n1.ovirt.local:/vmstore on /rhev/data-center/mnt/glusterSD/n1.ovirt.local:_vmstore type fuse.glusterfs ... n1.ovirt.local:/isos on /rhev/data-center/mnt/glusterSD/n1.ovirt.local:_isos type fuse.glusterfs ... n1.ovirt.local:/images on /rhev/data-center/mnt/glusterSD/n1.ovirt.local:_images type fuse.glusterfs ... # cd /rhev/data-center/mnt/glusterSD/n1.ovirt.local:_vmstore/926b54a8-611c-4919-ad18-bf0d818c1dfe/images/47dd801f-f765-45cd-a756-b867d8500058 # ls -alhZ -rw-rw----. vdsm kvm system_u:object_r:fusefs_t:s0 1fb644c5-d170-4e82-ac80-b1f0dc761073 -rw-rw----. vdsm kvm system_u:object_r:fusefs_t:s0 1fb644c5-d170-4e82-ac80-b1f0dc761073.lease -rw-r--r--. vdsm kvm system_u:object_r:fusefs_t:s0 1fb644c5-d170-4e82-ac80-b1f0dc761073.meta # qemu-img info 1fb644c5-d170-4e82-ac80-b1f0dc761073 image: 1fb644c5-d170-4e82-ac80-b1f0dc761073 file format: qcow2 virtual size: 8.0G (8589934592 bytes) disk size: 848M cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: false refcount bits: 16 corrupt: false # cat 1fb644c5-d170-4e82-ac80-b1f0dc761073.meta CAP=8589934592 CTIME=1651588008 DESCRIPTION= DISKTYPE=DATA DOMAIN=926b54a8-611c-4919-ad18-bf0d818c1dfe FORMAT=COW GEN=0 IMAGE=47dd801f-f765-45cd-a756-b867d8500058 LEGALITY=LEGAL PUUID=00000000-0000-0000-0000-000000000000 TYPE=SPARSE VOLTYPE=LEAF EOF
engine.ovirt.local # su postgres psql postgres=# \c engine engine=# engine=# SELECT disk_id, disk_alias, disk_description FROM public.base_disks WHERE disk_id ='47dd801f-f765-45cd-a756-b867d8500058'; disk_id | disk_alias | disk_description --------------------------------------+------------+--------------------------------------------------------- 47dd801f-f765-45cd-a756-b867d8500058 | test | CentOS 7 Generic Cloud Image v2009 for x86_64 (0748fd4) engine=# SELECT image_group_id, image_guid, size FROM public.images WHERE image_group_id = '47dd801f-f765-45cd-a756-b867d8500058'; image_group_id | image_guid | size --------------------------------------+--------------------------------------+------------ 47dd801f-f765-45cd-a756-b867d8500058 | 1fb644c5-d170-4e82-ac80-b1f0dc761073 | 8589934592
n1.ovirt.local # cd /rhev/data-center/mnt/glusterSD/n1.ovirt.local:_vmstore/926b54a8-611c-4919-ad18-bf0d818c1dfe/images/47dd801f-f765-45cd-a756-b867d8500058 # scp old-vmhost:/path/to/img/vmdisk.qcow2 . # chown vdsm:kvm * # qemu-img info vmdisk.qcow2 file format: qcow2 virtual size: 10G (10737418240 bytes) # vmdisk.qcow2 1fb644c5-d170-4e82-ac80-b1f0dc761073 # vi 1fb644c5-d170-4e82-ac80-b1f0dc761073.meta ## change CAP=10737418240 engine.ovirt.local # su postgres psql postgres=# \c engine engine=# UPDATE public.base_disks SET disk_alias = '068_doku.qcow2', disk_description = '' WHERE disk_id ='47dd801f-f765-45cd-a756-b867d8500058'; UPDATE public.images SET size = 10737418240 WHERE image_group_id = '47dd801f-f765-45cd-a756-b867d8500058';