So a little background, I have a Proxmox VE 6.4-13 server at OVH. I chose default partitioning when I set it up, only to realize the hard way that they only allocated 20GB to the / partition.
I made a /localdata/vms/ folder to set as my VM store and quickly ran out of space while building my VM which caused some corruption and other issues.
I ended up finding out via "df" command when checking disk space that they allocated everything to some odd ball folder in /var
So I moved the VM there but the disk space was not being freed on /. A reboot ended up fixing that. Needless to say after all of that I ended up with lot of corruption such as no longer being able to start/stop VMs etc and the whole server is basically broke.
Now the VM file. It's just a qcow2 file, about 17GB. But here is the weird part, if I try to copy that file anywhere, it just keeps copying past 17GB. Basically it will keep copying until it fills up the destination. I am trying to get the file over to another server so I can format the host and then pull the file back and restore the VM. But no luck.
In "dir" and stat it also shows the file is much bigger but in DU it shows the proper size. I've never seen anything like this before, this is the weirdest thing.
At this point I'm probably going to cut my losses and format the box without saving the VM but I still want to understand what is going on, and I also want to ensure that I never run into this again. Is this something specific to Proxmox and how it handles qcow2 files? What would be the beset way to avoid this sort of weirdness when I setup the server again? I want to ensure that my files are normal and that I can easily back them up or copy them if needed.
I made a /localdata/vms/ folder to set as my VM store and quickly ran out of space while building my VM which caused some corruption and other issues.
I ended up finding out via "df" command when checking disk space that they allocated everything to some odd ball folder in /var
So I moved the VM there but the disk space was not being freed on /. A reboot ended up fixing that. Needless to say after all of that I ended up with lot of corruption such as no longer being able to start/stop VMs etc and the whole server is basically broke.
Now the VM file. It's just a qcow2 file, about 17GB. But here is the weird part, if I try to copy that file anywhere, it just keeps copying past 17GB. Basically it will keep copying until it fills up the destination. I am trying to get the file over to another server so I can format the host and then pull the file back and restore the VM. But no luck.
In "dir" and stat it also shows the file is much bigger but in DU it shows the proper size. I've never seen anything like this before, this is the weirdest thing.
root@server04:100# du -h vm-100-disk-0.qcow2
17G vm-100-disk-0.qcow2
root@server04:100# stat vm-100-disk-0.qcow2
File: vm-100-disk-0.qcow2
Size: 3221717254144 Blocks: 33723240 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 179961860 Links: 1
Access: (0640/-rw-r-----) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2022-01-25 13:07:43.003980187 +0000
Modify: 2022-01-24 02:40:04.772365413 +0000
Change: 2022-01-24 02:40:04.772365413 +0000
Birth: -
root@server04:100# dir -h
total 17G <--- here it's normal
0 -rw-r--r-- 1 root root 0 Jan 24 21:45 test
17G -rw-r----- 1 root root 3.0T Jan 24 02:40 vm-100-disk-0.qcow2 <--- but here it's not?
At this point I'm probably going to cut my losses and format the box without saving the VM but I still want to understand what is going on, and I also want to ensure that I never run into this again. Is this something specific to Proxmox and how it handles qcow2 files? What would be the beset way to avoid this sort of weirdness when I setup the server again? I want to ensure that my files are normal and that I can easily back them up or copy them if needed.