Incorrect operation with the hard disk #2909

issue mezrin opened this issue on August 19, 2013
  1. mezrin commented at 10:24 AM on August 19, 2013: none

    If you run bitcoind under the Ubuntu VMWare virtual machine - size of the virtual machine's hard drive will be enormous large.

    How to reproduce:

    1. Make a new VMWare virtual machine with Ubuntu (I used Ubuntu 12.10)
    2. Install bitcoind, launch it as the server and daemon
    3. Wait until the bitcoind will load all the blocks
    4. Check via any linux tool how much space on the hard drive is used (about 10 Gb at all in my case)
    5. Stop the virtual machine
    6. Check via host machine tools how big is the folder with the Bitcoind virtual machine - it will be about 70-90 Gb!!!
    7. VMware tools, that help to compact/defragment virtual machine hard drive can't help

    I've never seen any software that has such specific bug. Something very strange

  2. luke-jr commented at 10:41 AM on August 19, 2013: member

    Pretty sure this is to be expected, except for 7. A bug in the tools?

  3. mx4 commented at 11:10 AM on August 19, 2013: none

    It sounds like you're using a sparse/growable vmdk virtual disk and for some reasons the guest OS keeps using new disk blocks. What's the capacity of your virtual disk btw?

    wrt the compact/defragment function in the tools: the first step of this process is to write 0s to the disks but if you run out of space on the host the app may be unable to subsequently reclaim this unused free space. You may want to try playing with the option -k of vmware-vdiskmanager and see if that helps. Please ping me privately if you have any other question.

  4. jgarzik commented at 11:57 AM on August 19, 2013: contributor

    This is expected behavior -- the block chain is very large.

  5. jgarzik closed this on Aug 19, 2013

  6. sipa commented at 12:02 PM on August 19, 2013: member

    @jgarzik That is correct, but irrelevant. The block chain is only 11 GB and is only written once, and he complains about much larger usage.

    My guess for the reason is that the chainstate database is continuously being updated, and in total a much larger amount of data is being written for this. Assuming the size of the virtual disk is large enough, then depending on the file system, the data may end up scattered over the virtual block device, making every sector dirty and require space.

  7. mezrin commented at 12:17 PM on August 19, 2013: none

    I use growable disk (tried single and split in 2GB files). Capacity - 200Gb I think if i will use smaller disk - I will get error. But it need to be verified.

    I alsoI think this is due to the constant creation and deletion of chainstate files. Size of the blockchain is irrelevenat. So big virtual disk is a very strange result. I use different apps inside virtual machines, some of them uses hard drive much-much-much more then bitcoind. I've never had such problems

  8. sipa commented at 12:18 PM on August 19, 2013: member

    Still this explains it perfectly. The virtual block device does not know which parts of it are used by the file system, so every area ever written to requires disk space. This has nothing to do with Bitcoin.

  9. mezrin commented at 12:28 PM on August 19, 2013: none

    I think that vmware should know which part of the filesystem is currently used and which is not. This is the only way that would allow vmware utilities to work If you make virtual machine, create and then delete very big file, launch vmware tool - drive will be reduced on the size of of the file. I made it a lot of times - software creates files, I manually delete them

  10. mezrin commented at 12:41 PM on August 19, 2013: none

    tried to use "vmware-vdiskmanager.exe -k" as maxime01 advised - disk size absolutely not changed.

  11. mx4 commented at 12:54 PM on August 19, 2013: none

    Most of your blocks are dirtied. You need to either:

    1. vmware-mount your guest partition on your host and use vmware-vdiskmanager -p,
    2. do something like "dd if=/dev/zero of=/mnt/foo && rm -f /mnt/foo" from within the guest before running vmware-vdiskmanager -k.
  12. IntegralTeam referenced this in commit 4dc5c0e9ed on Jun 4, 2019
  13. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me