Bitcoin Forum
April 26, 2024, 09:03:28 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Trouble pruning Bitcoin Core when installing to a USB drive  (Read 168 times)
BTCapsule (OP)
Member
**
Offline Offline

Activity: 72
Merit: 78


View Profile
October 14, 2022, 08:07:13 PM
 #1

I’m installing Bitcoin Core to a 32Gb thumb drive. These are the steps I took:

1. Choose my thumb drive “D:\” as the installer location

2. Refuse to let Bitcoin Core start automatically after setup

3. Create a shortcut and set “Target” to “D:\Bitcoin\bitcoin-qt.exe -datadir=D:\Bitcoin”

4. Open Bitcoin Core from shortcut and choose Settings>Options>Open Configuration File
 
5.bitcoin.conf:

Quote
server=1
 rpcallowip=127.0.0.1
 rpcuser=user
 rpcpassword=pass
 prune=550

When I closed Bitcoin Core, my debug.log file would say it’s checking D:\Bitcoin, but “bitcoin.conf not found, (skipping)”. Now my debug.log doesn’t offer any clues. It just shows the different blocks.

If I choose Settings>Options in Bitcoin Core Shortcut, it shows that prune is set to prune=550, so it must see the bitcoin.conf file.

However, my thumb drive has now used about 20Gb of storage and continues to fill up.
1714122208
Hero Member
*
Offline Offline

Posts: 1714122208

View Profile Personal Message (Offline)

Ignore
1714122208
Reply with quote  #2

1714122208
Report to moderator
1714122208
Hero Member
*
Offline Offline

Posts: 1714122208

View Profile Personal Message (Offline)

Ignore
1714122208
Reply with quote  #2

1714122208
Report to moderator
If you see garbage posts (off-topic, trolling, spam, no point, etc.), use the "report to moderator" links. All reports are investigated, though you will rarely be contacted about your reports.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714122208
Hero Member
*
Offline Offline

Posts: 1714122208

View Profile Personal Message (Offline)

Ignore
1714122208
Reply with quote  #2

1714122208
Report to moderator
1714122208
Hero Member
*
Offline Offline

Posts: 1714122208

View Profile Personal Message (Offline)

Ignore
1714122208
Reply with quote  #2

1714122208
Report to moderator
1714122208
Hero Member
*
Offline Offline

Posts: 1714122208

View Profile Personal Message (Offline)

Ignore
1714122208
Reply with quote  #2

1714122208
Report to moderator
LoyceV
Legendary
*
Online Online

Activity: 3290
Merit: 16550


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
October 14, 2022, 08:15:21 PM
 #2

3. Create a shortcut and set “Target” to “D:\Bitcoin\bitcoin-qt.exe -datadir=D:\Bitcoin”
Why don't you add -prune=550 to the command line?
Code:
  -prune=<n>
       blocks. This allows the pruneblockchain RPC to be called to
       manual pruning via RPC, >=550 = automatically prune block files
       ipc, leveldb, libevent, mempool, mempoolrej, net, proxy, prune,

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BTCapsule (OP)
Member
**
Offline Offline

Activity: 72
Merit: 78


View Profile
October 14, 2022, 10:23:02 PM
 #3

3. Create a shortcut and set “Target” to “D:\Bitcoin\bitcoin-qt.exe -datadir=D:\Bitcoin”
Why don't you add -prune=550 to the command line?
Code:
  -prune=<n>
       blocks. This allows the pruneblockchain RPC to be called to
       manual pruning via RPC, >=550 = automatically prune block files
       ipc, leveldb, libevent, mempool, mempoolrej, net, proxy, prune,

Thank you. I added -prune=500, restarted Bitcoin Core, and I’ve been waiting to see what happens. It fluctuates, but I’ve lost about 4Gb of storage, so it doesn’t appear to be working. So far it’s taking about 20Gb of storage.
BitMaxz
Legendary
*
Offline Offline

Activity: 3234
Merit: 2942


Block halving is coming.


View Profile WWW
October 14, 2022, 11:30:25 PM
 #4

I never heard of someone's success in using a Bitcoin core in a USB flash drive.
If your purpose is to use a Bitcoin core wallet for making transactions send and receive when needed then you need to make a bootable USB with OS and install bitcoin core there.
Or you can switch to Electrum portable one and put them into your USB thumb drive it's a lightweight wallet that doesn't need to download the blockchain.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BTCapsule (OP)
Member
**
Offline Offline

Activity: 72
Merit: 78


View Profile
October 15, 2022, 01:37:04 AM
 #5

I never heard of someone's success in using a Bitcoin core in a USB flash drive.
If your purpose is to use a Bitcoin core wallet for making transactions send and receive when needed then you need to make a bootable USB with OS and install bitcoin core there.
Or you can switch to Electrum portable one and put them into your USB thumb drive it's a lightweight wallet that doesn't need to download the blockchain.

Actually I’m just needing the smallest updated Bitcoin blockchain I can install for data and building applications. I intend to periodically plug in the USB and update the blockchain.

Everything else works fine. It has to see my bitcoin.conf file because the username and password work for bitcoinrpc.
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
October 15, 2022, 03:46:44 AM
 #6



Thank you. I added -prune=500, restarted Bitcoin Core, and I’ve been waiting to see what happens. It fluctuates, but I’ve lost about 4Gb of storage, so it doesn’t appear to be working. So far it’s taking about 20Gb of storage.

Afaik pruning just removes old blocks after it's enabled, your chainstate directory will not be pruned and will continue to grow as the chain syncs (though it might not grow at the same rate as it already has). You should be able to confirm if this is the case by checking the size of both your blocks and chainstate folder on the USB drive. It's possible to split the data directory across multiple drives if you need too but if you want the speed of USB 3.0+ then you're probably going to need a bigger USB stick (I can't find accurate figures of how big both are at the moment though).
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5538


Self-proclaimed Genius


View Profile
October 15, 2022, 04:47:03 AM
 #7

-snip-
I added -prune=500, restarted Bitcoin Core, and I’ve been waiting to see what happens. It fluctuates, but I’ve lost about 4Gb of storage, so it doesn’t appear to be working. So far it’s taking about 20Gb of storage.
Bitcoin Core shouldn't launch with that parameter since it's below the minimum size, are you sure that you're using the correct shortcut?
At least set it to the minimum which is what you've originally set in your bitcoin.conf file.

BTW, it's already in effect if it says -prune=n under "Options set in this dialogue are overridden by the command line or in the configuration file:"

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
LoyceV
Legendary
*
Online Online

Activity: 3290
Merit: 16550


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
October 15, 2022, 07:29:36 AM
 #8

I never heard of someone's success in using a Bitcoin core in a USB flash drive.
It shouldn't be a problem, I've seen many people use an external hard drive for their blockchain. It works as long as the USB port can provide enough power and doesn't accidentally gets unplugged.
I've successfully downloaded a pruned Bitcoin Core to /dev/shm, which has less space than most USB sticks.

your chainstate directory will not be pruned and will continue to grow as the chain syncs
~
(I can't find accurate figures of how big both are at the moment though).
My chainstate directly is currently 4.8 GB.

Bitcoin Core shouldn't launch with that parameter since it's below the minimum size, are you sure that you're using the correct shortcut?
I checked, and it doesn't just ignore the setting:
Code:
Error: Prune configured below the minimum of 550 MiB.  Please use a higher number.

On Linux, this works just as expected:
Code:
bitcoin-qt -datadir=/tmp/bitcoin -prune=550
I'm not a Windows user, so I can't really tell you what goes wrong. I'm curious though: why use a USB stick instead of just normal storage on your system? Pruning to local storage is going to be a lot faster than a USB stick.
All you need is 6 GB of storage, preferrably on SSD.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5538


Self-proclaimed Genius


View Profile
October 15, 2022, 07:52:38 AM
 #9

Bitcoin Core shouldn't launch with that parameter since it's below the minimum size, are you sure that you're using the correct shortcut?
I checked, and it doesn't just ignore the setting:
Code:
Error: Prune configured below the minimum of 550 MiB.  Please use a higher number.

On Linux, this works just as expected:
Code:
bitcoin-qt -datadir=/tmp/bitcoin -prune=550
I'm not a Windows user, so I can't really tell you what goes wrong.
It's not because of the OS but the size set in prune setting.
In Linux you set 550MiB which is the minimum, in the first reply, it's only 500MiB which is below the minimum.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
LoyceV
Legendary
*
Online Online

Activity: 3290
Merit: 16550


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
October 15, 2022, 08:10:50 AM
 #10

It's not because of the OS but the size set in prune setting.
In Linux you set 550MiB which is the minimum, in the first reply, it's only 500MiB which is below the minimum.
I assumed OP made a mistake typing 500 here, because his data directory kept growing so he didn't get an error.
It doesn't make sense the -prune=550 setting gets ignored though.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BTCapsule (OP)
Member
**
Offline Offline

Activity: 72
Merit: 78


View Profile
October 15, 2022, 12:19:23 PM
 #11

It's not because of the OS but the size set in prune setting.
In Linux you set 550MiB which is the minimum, in the first reply, it's only 500MiB which is below the minimum.
I assumed OP made a mistake typing 500 here, because his data directory kept growing so he didn't get an error.
It doesn't make sense the -prune=550 setting gets ignored though.

Yes, that was a mistake I made here, but my settings on the shortcut are correct. I’m wondering if the problem is my thumb drive is formatted to exFAT. I would have to delete everything and reformat the drive to see, but at this point, I think it would be easier to just install Bitcoin Core on the machine.

The reason I’m doing this is because it makes my program easier to use, but a little more difficult to setup. However, I think I might be introducing user and compatibility errors that are unnecessary, so I’m going to reevaluate.
BTCapsule (OP)
Member
**
Offline Offline

Activity: 72
Merit: 78


View Profile
October 16, 2022, 11:39:18 PM
 #12

--snip--
Yes, that was a mistake I made here, but my settings on the shortcut are correct. I’m wondering if the problem is my thumb drive is formatted to exFAT. I would have to delete everything and reformat the drive to see, but at this point, I think it would be easier to just install Bitcoin Core on the machine.

Bitcoin Core don't care about file system, so i doubt exFAT is the problem here. I've seen some people use FAT32 or exFAT on their external drive to store Bitcoin Core files without problem.

The reason I’m doing this is because it makes my program easier to use, but a little more difficult to setup. However, I think I might be introducing user and compatibility errors that are unnecessary, so I’m going to reevaluate.

Have you consider you might fell into XY problem? For example, if you just need to get recent block and your user don't care about privacy, you could just use few free API offered by block explorer rather than obtaining data from pruned Bitcoin Core.

I wanted Bitcoin Core to be stored on a USB with BTCapsule, but I changed my mind. It wouldn’t make sense to have an old version of the software, and it was causing way more problems than it solved. I don’t think asking someone to install Bitcoin Core themselves and add a few lines to the bitcoin.conf file is too complicated. Hopefully it will lead to more people running a full node. This is what I’ve been working on:

https://bitcointalk.org/index.php?topic=5417348.0
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!