I have a qcow2 file on my filesystem and I am trying to find the size of that file.
For this, when I do a ls -l
in the location where the file is stored, I get 13041664, which means the file size is around 13 MB and when I do a file <filename>
, I get:
disk: QEMU QCOW Image (v2), has backing file (path
/var/lib/nova/instances/_base/035db99541e92b5cca93bf18a997d626f), 21474836480 bytes
which, I presume, says the filesize is around 21 GB.
Is this my misinterpretation of the command output or is something else going on inside the filesystem(thin provisioning kind of thing)?
UPDATE: When I do a ls -l on var/lib/nova/instances/_base/035db99541e92b5cca93bf18a997d626f
, I get a ls: cannot access /var/lib/nova/instances/_base/035db99541e92b5cca93bf18a997d626f: No such file or directory
and its correct that I have no file there
UPDATE 2: The output of qemu-img info <filename>
is as follows:
image: disk
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 12M
cluster_size: 65536
backing file: /var/lib/nova/instances/_base/035db99541e92b5cca93bf18a997d626f512b73d (actual path: /var/lib/nova/instances/_base/035db99541e92b5cca93bf18a997d626f512b73d)