Mr_Jay84 Posted July 13, 2020 Posted July 13, 2020 Hello all I have a number of VMs that I originally setup as thick provisioned (raw .img). I would like to convert these to thin volumes if possible. How would I go about doing this? Quote
JonathanM Posted July 13, 2020 Posted July 13, 2020 Are you sure? The default I believe for raw is sparse, unless you copied the vdisk file using something that un-sparsified it. You should be able to use cp --sparse=always to make the file sparse again. Quote
Mr_Jay84 Posted July 13, 2020 Author Posted July 13, 2020 16 minutes ago, jonathanm said: Are you sure? The default I believe for raw is sparse, unless you copied the vdisk file using something that un-sparsified it. You should be able to use cp --sparse=always to make the file sparse again. That is possible, I can't remember to be honest. Ill give this a go and post back. Thanks for responding! Quote
Mr_Jay84 Posted July 13, 2020 Author Posted July 13, 2020 Okay so I ran the command and created new vdisks. No change in sizes as they still eat up 60G when in they're actually only half full. I'll just rebuild the VMs using qcow2. Quote
JorgeB Posted July 13, 2020 Posted July 13, 2020 9 minutes ago, Mr_Jay84 said: No change in sizes as they still eat up 60G when in they're actually only half full. That's the allocated size, not the actually used space, you can check with ls: root@Tower1:~# ls -lskh /mnt/cache/VMs/Win10/ total 27G 27G -rw-rw-rw- 1 root users 60G Jul 13 15:52 vdisk1.img 27GB used, 60GB allocated Quote
Mr_Jay84 Posted July 13, 2020 Author Posted July 13, 2020 (edited) 3 hours ago, johnnie.black said: That's the allocated size, not the actually used space, you can check with ls: root@Tower1:~# ls -lskh /mnt/cache/VMs/Win10/ total 27G 27G -rw-rw-rw- 1 root users 60G Jul 13 15:52 vdisk1.img 27GB used, 60GB allocated I ran the command you specified and got a similar return however other VMs created with qcow2 show correctly, also when copying to my NAS for backup the vdisk1 & vdisk2 takes up the full 60G Fedora shows correctly which was created with qcow2 and has 30G allocated. Windows 7 Game Server with vdisk1 being an offender, vdisk2 was created using qcow2 and has 60G allocated. Windows 10 with vdisk1 & vdisk2 showing the full 60G despite the below.... Edited July 13, 2020 by Mr_Jay84 Quote
JorgeB Posted July 13, 2020 Posted July 13, 2020 2 minutes ago, Mr_Jay84 said: also when copying to my NAS for backup the vdisk1 & vdisk2 takes up the full 60G You'd need to copy with the --sparse-always flag, assuming the NAS filesystem supports that. QCOW2 are compressed images, so they compress the zeros, i.e., all the blank space. Quote
Mr_Jay84 Posted July 13, 2020 Author Posted July 13, 2020 (edited) I see Johnnie. Okay thanks for the help mate. The original vdisks were copied to the nas and back again so maybe thats where the issue came from. Edited July 13, 2020 by Mr_Jay84 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.