[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt-users] storage volume's size change



I have a question regarding storage volumes. I have uploaded a sparsed raw disk file to a storage volume, where virtual/max. size of the raw disk file is larger than size of the initial libvirt volume. Following is an example of commands: 

# Create storage volume of capacity 9G
$ virsh-sys vol-create-as --pool pool-01 --name saturn.img --capacity 9G

# Display volume info
$ virsh-sys vol-info saturn.img --pool pool-01
Name:           saturn.img
Type:           file
Capacity:       9.00 GB
Allocation:     36.11 MB


# Upload raw disk file to the volume
$ virsh-sys vol-upload --vol saturn.img --file /lustre/scratch/shantanup/saturn-disk.img --pool pool-01


# qemu-img info on disk file which was uploaded
$  qemu-img info /lustre/scratch/shantanup/saturn-disk.img
file format: raw
virtual size: 20G (21474836480 bytes)
disk size: 5.7G


# vol-info after uploading the raw disk image
$ virsh-sys vol-info saturn.img --pool pool-01
Name:           saturn.img
Type:           file
Capacity:       20.00 GB
Allocation:     20.00 GB

The vol-info command indicates that volume size has changed after uploading the raw disk image to it. So has the volume size really changed to 20G or will the system experience any problem after actual disk size (currently 5.7G) hits 9G limit? I can't directly poke into the storage pool mount to run ls or qemu-img commands on underlying volumes, so I don't have that information. Any help?

--
Thanks,
Shantanu




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]