How prune data now ?
how prune data now ? prune-state no longer works on the latest version and when I run the command "./geth snapshot prune-block --datadir ./node --datadir.ancient ./chaindata/ancient" it deleted all my ancient folder, I had to start on a new snapshot. What is the new command to prune the data now ?
Old prune-state is working for me with 1.1.8. Command: ./geth --config ./config.toml --datadir ./node snapshot prune-state --bloomfilter.size 20000 But with new prune block ./geth snapshot prune-block --datadir ./node --datadir.ancient ./chaindata/ancient - same issue, it deleted all ancient blocks, and the error was "File is currently in use". System - Windows 10.
how prune data now ? prune-state no longer works on the latest version and when I run the command "./geth snapshot prune-block --datadir ./node --datadir.ancient ./chaindata/ancient" it deleted all my ancient folder, I had to start on a new snapshot. What is the new command to prune the data now ?
Yes same problem issued for me my ancient data all is gone just for 1.2 sec. now its running infinite loop like this.
t=2022-02-07T06:10:31+0000 lvl=info msg="Allocated trie memory caches" clean="2.20 GiB" dirty="3.66 GiB"
t=2022-02-07T06:10:31+0000 lvl=info msg="Allocated cache and file handles" database=/home/disk/geth/mainnet/geth/chaindata cache="5.86 GiB" handles=262,144
t=2022-02-07T06:10:38+0000 lvl=info msg="Snap sync requested, enabling --snapshot"
t=2022-02-07T06:10:38+0000 lvl=info msg="Set global gas cap" cap=25,000,000
t=2022-02-07T06:10:38+0000 lvl=info msg="Allocated trie memory caches" clean="2.20 GiB" dirty="3.66 GiB"
t=2022-02-07T06:10:38+0000 lvl=info msg="Allocated cache and file handles" database=/home/disk/geth/mainnet/geth/chaindata cache="5.86 GiB" handles=262,144
t=2022-02-07T06:10:44+0000 lvl=info msg="Snap sync requested, enabling --snapshot"
t=2022-02-07T06:10:44+0000 lvl=info msg="Set global gas cap" cap=25,000,000
t=2022-02-07T06:10:44+0000 lvl=info msg="Allocated trie memory caches" clean="2.20 GiB" dirty="3.66 GiB"
t=2022-02-07T06:10:44+0000 lvl=info msg="Allocated cache and file handles" database=/home/disk/geth/mainnet/geth/chaindata cache="5.86 GiB" handles=262,144
t=2022-02-07T06:11:41+0000 lvl=info msg="Snap sync requested, enabling --snapshot"
t=2022-02-07T06:11:41+0000 lvl=info msg="Set global gas cap" cap=25,000,000
t=2022-02-07T06:11:41+0000 lvl=info msg="Allocated trie memory caches" clean="2.20 GiB" dirty="3.66 GiB"
t=2022-02-07T06:11:41+0000 lvl=info msg="Allocated cache and file handles" database=/home/disk/geth/mainnet/geth/chaindata cache="5.86 GiB" handles=262,144
t=2022-02-07T06:11:47+0000 lvl=info msg="Snap sync requested, enabling --snapshot"
t=2022-02-07T06:11:47+0000 lvl=info msg="Set global gas cap" cap=25,000,000
t=2022-02-07T06:11:47+0000 lvl=info msg="Allocated trie memory caches" clean="2.20 GiB" dirty="3.66 GiB"
t=2022-02-07T06:11:47+0000 lvl=info msg="Allocated cache and file handles" database=/home/disk/geth/mainnet/geth/chaindata cache="5.86 GiB" handles=262,144
t=2022-02-07T06:11:55+0000 lvl=info msg="Snap sync requested, enabling --snapshot"
t=2022-02-07T06:11:55+0000 lvl=info msg="Set global gas cap" cap=25,000,000
t=2022-02-07T06:11:55+0000 lvl=info msg="Allocated trie memory caches" clean="2.20 GiB" dirty="3.66 GiB"
t=2022-02-07T06:11:55+0000 lvl=info msg="Allocated cache and file handles" database=/home/disk/geth/mainnet/geth/chaindata cache="5.86 GiB" handles=262,144
@yo31400 @serfiraz21
Hi guys, please make sure you are running prune state or pruning block data, they are totally two different scenarios.
For prune blocks, the complete command was like: ./geth snapshot prune-block --datadir ./node --datadir.ancient ./chaindata/ancient --block-amount-reserved [amount of blocks to reserve]
@yo31400 @serfiraz21 Hi guys, please make sure you are running prune state or pruning block data, they are totally two different scenarios. For prune blocks, the complete command was like:
./geth snapshot prune-block --datadir ./node --datadir.ancient ./chaindata/ancient --block-amount-reserved [amount of blocks to reserve]
With this command same error: Failed to remove old ancient directory %v LOG15_ERROR= LOG15_ERROR="Normalized odd number of arguments by adding nil" remove C:\node\geth\chaindata\ancient\PRUNEFLOCK: The process cannot access the file because it is being used by another process.
And deleted all ancient blocks
@Vladis432 Have you stopped the geth process? And have you specified the amount for arg --block-amount-reserved?
@Mercybudda of course. And before that - restarted the PC, to be sure. Is it working for you?
You can follow the guide here to fix this issue: https://github.com/binance-chain/bsc/releases/tag/v1.1.8
- Stop The node.
- Upgrade the binary to the latest release.
- Start the node with --snapshot=false
- Wait for a few minutes(it depends on how fast the node is), until the block height is 128 higher than where it stopped.
- Restart the node with --snapshot=true
- The node will continue to sync and repair the corrupt data.
Please proceed to join our Discord channel for more discussion at https://discord.com/invite/buildnbuild