In some exceptional case, we only have a RAW image with a shortages-storage and need to extend it.
To resolve this problem, I searched internet and found someone said that the linux's internal command "dd" could do it.
I haven't verified the "dd" way but I tried a more smart and more flexible way like below:
first, create a sparse image ( qcow2 ) base on the RAW image:
eg: qemu-img create -b [base.RAW] -f qcow2 [sparse.qcow2]
second, use qemu-img's resize command to resize the sparse image's size:
eg: qemu-img resize [sparse.qcow2] +10G
third, boot and login this sparse image , actually, because of the qcow2 format's feature which called Copy-on-Write,
this image will conserve the additional date of the RAW image.
fourth, use linux's internal command "fdisk" to create a new partition, and use command "partprobe" to refresh the partition table.
fifth, use command "df -T" to check the using file system type and then use command "mkfs.[FileSystemType]" to create filesystem for the new partition,
if you finished them above all, now you can mount the new partition to a specified directory.
with this, now you've extend a RAW image's storage, but the operation of new partition's mount is not permanent,
maybe you need type "blkid" or "ls -l /dev/disk/by-uuid" to find the new partition's UUID and write it in the fstab,
maybe you're just extend the storage for temporary using, so , it's enough.
ps: actually, in my opinion, this way also can be worked for the QCOW2 type image.
thanks.