I've been trying to figure this out for quite some time. Most people say it is snapshots or metadata maybe, but this can't really be the case here.
For reference, I have a Windows 7 VM which has a ZVOL for storage. The ZVOL is sized at 100GB. The ZVOLs are all presented to the VM over virtIO. The actual data on the VM is about 8GB. I noticed that this ZVOL was slowly but surely getting bigger and bigger each day even though there is nothing on the disk, so the obvious question is, what is going wrong here. Here's how it all looks like if I run
I understand that the snapshots are over 90.8GB that is clear to me, even that I find quite pushing it for a windows machine, but the USEDDS size is stil 212GB which is extreme compared to what it should be and also compared to the other disks that are atached to this vm. For example disk-1 on the same VM which is a 1GB ZVOL seems far more reasonable:
I think something went terribly wrong with this zvol and I don't want to lose any data if possible. Worth mentioning that I turned off pagefile inside the VM thinking that it might be swapping to disk. What can I do here or does anyone have any ideea what might be causing this issue?
Later Edit: had another look at it right now, a full backup on the VM is 17,9GB, so that's the entire data spread on 3 ZVOLs. Second, rechecked the vblocksize and got the following:
and on the other disk
I still find it quite extreme that 18GB of data can grow to in excess of 200gb that is over 1000% . I also find it hard to believe that this is only the blocksize that does this. Maybe there should be a big Warning in the tutorials and recomandations for Windows VMs. Also surprising that the 16K ones work.
so my question obviously now is, how can I best move/change that ZVOL for a 16K ZVOL without losing any data and if possible with minimal downtime on the VM?
For reference, I have a Windows 7 VM which has a ZVOL for storage. The ZVOL is sized at 100GB. The ZVOLs are all presented to the VM over virtIO. The actual data on the VM is about 8GB. I noticed that this ZVOL was slowly but surely getting bigger and bigger each day even though there is nothing on the disk, so the obvious question is, what is going wrong here. Here's how it all looks like if I run
zfs list -ro space -t all rpool/data/ZVOLs/vm-102-disk-0
Code:
NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV USEDCHILD rpool/data/ZVOLs/vm-102-disk-0 228G 303G 90.8G 212G 0B 0B rpool/data/ZVOLs/vm-102-disk-0@zfs-auto-snap_weekly-2018-08-26-0447 - 695M - - - - rpool/data/ZVOLs/vm-102-disk-0@zfs-auto-snap_weekly-2018-08-26-2159 - 611M - - - - ...followed by many many snapshots
I understand that the snapshots are over 90.8GB that is clear to me, even that I find quite pushing it for a windows machine, but the USEDDS size is stil 212GB which is extreme compared to what it should be and also compared to the other disks that are atached to this vm. For example disk-1 on the same VM which is a 1GB ZVOL seems far more reasonable:
Code:
NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV USEDCHILD rpool/data/ZVOLs/vm-102-disk-1 246G 812M 407M 405M 0B 0B rpool/data/ZVOLs/vm-102-disk-1@auto-20180615.0900-1m - 232K - - - - rpool/data/ZVOLs/vm-102-disk-1@auto-20180616.0900-1m - 232K - - - - ....snapshots
I think something went terribly wrong with this zvol and I don't want to lose any data if possible. Worth mentioning that I turned off pagefile inside the VM thinking that it might be swapping to disk. What can I do here or does anyone have any ideea what might be causing this issue?
Later Edit: had another look at it right now, a full backup on the VM is 17,9GB, so that's the entire data spread on 3 ZVOLs. Second, rechecked the vblocksize and got the following:
Code:
rpool/data/ZVOLs/vm-102-disk-0 volblocksize 512 -
and on the other disk
Code:
rpool/data/ZVOLs/vm-102-disk-2 volblocksize 16K -
I still find it quite extreme that 18GB of data can grow to in excess of 200gb that is over 1000% . I also find it hard to believe that this is only the blocksize that does this. Maybe there should be a big Warning in the tutorials and recomandations for Windows VMs. Also surprising that the 16K ones work.
so my question obviously now is, how can I best move/change that ZVOL for a 16K ZVOL without losing any data and if possible with minimal downtime on the VM?
Last edited: