On 07/12/2012 01:25 PM, Deepak C Shetty wrote:
Hello,
I am working on a VDSM standalone script that is using PosixFS
inteface to mount gluster volume
& trying to create a volume (file) inside the storage domain.
Snip of the code is below...
==============================================================
sizeGiB = 4
tid = vdsOK(s.createVolume(sdUUID, spUUID, imgUUID, sizeGiB,
RAW_FORMAT, PREALLOCATED_VOL, LEAF_VOL,
volUUID, "glustervol",
BLANK_UUID, BLANK_UUID))['uuid']
waitTask(s, tid)
==============================================================
But the file size created is not 4G, its 8K as seen below...
qemu-img info
/rhev/data-center/mnt/kvmfs01-hs22:dpkvol/f0443ec4-3c94-49c9-a239-797562ee4926/images/073b3309-e4cd-4b6c-978e-5744a9afb8b7/c8c4f92e-818d-433a-b013-b0060cd7cc87
image:
/rhev/data-center/mnt/kvmfs01-hs22:dpkvol/f0443ec4-3c94-49c9-a239-797562ee4926/images/073b3309-e4cd-4b6c-978e-5744a9afb8b7/c8c4f92e-818d-433a-b013-b0060cd7cc87
file format: raw
virtual size: 2.0K (2048 bytes)
disk size: 8.0K
It should have created a raw file of size 4G, but its not.
Wondering if the sizeGiB argument is not in GB but somethign else ?
Isn't this argument actually the number of sectors?
vdsm/storage/fileVolume.py
119 def create(cls, repoPath, sdUUID, imgUUID, size, volFormat,
preallocate,
120 diskType, volUUID, desc, srcImgUUID, srcVolUUID):
121 """
122 Create a new volume with given size or snapshot
123 'size' - in sectors
124 'volFormat' - volume format COW / RAW
125 'preallocate' - Preallocate / Sparse
126 'diskType' - enum (API.Image.DiskTypes)
127 'srcImgUUID' - source image UUID
128 'srcVolUUID' - source volume UUID
129 """
Lee
thanx,
deepak
_______________________________________________
vdsm-devel mailing list
vdsm-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/vdsm-devel
--
Lee Yarwood
Software Maintenance Engineer
Red Hat UK Ltd
200 Fowler Avenue IQ Farnborough, Farnborough, Hants GU14 7JP
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham (USA), Brendan Lane (Ireland), Matt
Parson(USA), Charlie Peters (USA)
GPG fingerprint : A5D1 9385 88CB 7E5F BE64 6618 BCA6 6E33 F672 2D76