Bitcoin Forum
May 02, 2024, 02:31:54 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: MyNode + Raspberry Pi 4 how to pause initial sync  (Read 138 times)
apogio (OP)
Sr. Member
****
Offline Offline

Activity: 420
Merit: 960



View Profile WWW
May 17, 2023, 07:11:52 PM
 #1

Hello! finally, after waiting a long time to get my hands on a cheap raspberry pi, I have managed to buy one. I am so happy right now!

I have started the initial syncing process, but I want to pause it and restart tomorrow, because I know there will be a 2hrs electricity break for maintenance during the night. Is it possible to turn it off and start tomorrow from where I left it? I don't want to ruin my progress so far. I also haven't been able to find a similar topic on the web.

1714617114
Hero Member
*
Offline Offline

Posts: 1714617114

View Profile Personal Message (Offline)

Ignore
1714617114
Reply with quote  #2

1714617114
Report to moderator
1714617114
Hero Member
*
Offline Offline

Posts: 1714617114

View Profile Personal Message (Offline)

Ignore
1714617114
Reply with quote  #2

1714617114
Report to moderator
"In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714617114
Hero Member
*
Offline Offline

Posts: 1714617114

View Profile Personal Message (Offline)

Ignore
1714617114
Reply with quote  #2

1714617114
Report to moderator
LoyceV
Legendary
*
Offline Offline

Activity: 3304
Merit: 16582


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
May 17, 2023, 08:57:35 PM
 #2

It's the same as "normally" turning it off. On my server, I just kill bitcoind, it closes gracefully that way.

apogio (OP)
Sr. Member
****
Offline Offline

Activity: 420
Merit: 960



View Profile WWW
May 17, 2023, 09:44:50 PM
 #3

It's the same as "normally" turning it off. On my server, I just kill bitcoind, it closes gracefully that way.

When using bitcoin core, I can just close it. However here, it seems like it's running multiple processes and that's why I am worried. So you suggest just turning it off using the power button on the cable?

LoyceV
Legendary
*
Offline Offline

Activity: 3304
Merit: 16582


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
May 18, 2023, 07:57:18 AM
Merited by paid2 (1)
 #4

It's the same as "normally" turning it off. On my server, I just kill bitcoind, it closes gracefully that way.

When using bitcoin core, I can just close it. However here, it seems like it's running multiple processes and that's why I am worried.
I do this:
Code:
ps aux | grep bitcoind
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
bitcoin   804968  8.0  7.9 4945476 1301560 ?     SLl  May08 1132:26 /home/bitcoin/bitcoin-24.0.1/bin/bitcoind -maxuploadtarget=500G -dbcache=2048
Then:
Code:
 kill 804968
This can take a few seconds to complete.

Quote
So you suggest just turning it off using the power button on the cable?
No! That's not graceful at all.

nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5578


Self-proclaimed Genius


View Profile
May 18, 2023, 12:06:28 PM
Merited by LoyceV (4)
 #5

I don't want to ruin my progress so far. I also haven't been able to find a similar topic on the web.
There's also a "stop" rpc command that you can use with bitcoin-cli to stop bitcoind.
Use it like any other RPC commands, e.g.: bitcoin-cli stop

Just make sure that you'll call it with bitcoin-cli since it wont work with bitcoind like in the very old versions.

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

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

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

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

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

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











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











▄▄▄▄█
apogio (OP)
Sr. Member
****
Offline Offline

Activity: 420
Merit: 960



View Profile WWW
May 18, 2023, 03:12:48 PM
 #6

I do this:
Code:
ps aux | grep bitcoind
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
bitcoin   804968  8.0  7.9 4945476 1301560 ?     SLl  May08 1132:26 /home/bitcoin/bitcoin-24.0.1/bin/bitcoind -maxuploadtarget=500G -dbcache=2048
Then:
Code:
 kill 804968
This can take a few seconds to complete.

Quote
So you suggest just turning it off using the power button on the cable?
No! That's not graceful at all.

I briefly read myDocs guide and found out there's script to stop Bitcoin and other services[1]. I don't know if the guide is up to date though.

Code:
# Stop Bitcoin and other services
sudo /usr/bin/mynode_stop_critical_services.sh

[1] https://mynodebtc.github.io/bitcoin/data-from-other-node.html

There's also a "stop" rpc command that you can use with bitcoin-cli to stop bitcoind.
Use it like any other RPC commands, e.g.: bitcoin-cli stop

Just make sure that you'll call it with bitcoin-cli since it wont work with bitcoind like in the very old versions.

Thanks, I totally agree, but I don't have a terminal since I am on the initial blockchain sync

nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5578


Self-proclaimed Genius


View Profile
May 19, 2023, 09:40:29 AM
 #7

-snip-
Thanks, I totally agree, but I don't have a terminal since I am on the initial blockchain sync
You can still use bitcoin-cli stop command even during IBD.
Perhaps the issue is not having access to multiple terminals or something else?

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

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

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

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

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

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











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











▄▄▄▄█
LoyceV
Legendary
*
Offline Offline

Activity: 3304
Merit: 16582


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
May 19, 2023, 09:43:58 AM
 #8

I don't have a terminal since I am on the initial blockchain sync
Can you explain this? Even when running Linux without GUI, you have 6 terminals by default (CTRL-ALT-F1-6). Or just CTRL-Z or CTRL-C your sync.

I'm saying this based on generic Linux usage, I've never touched a "MyNode".

ABCbits
Legendary
*
Offline Offline

Activity: 2856
Merit: 7436


Crypto Swap Exchange


View Profile
May 19, 2023, 09:44:11 AM
Merited by apogio (1)
 #9

--snip--

Thanks, I totally agree, but I don't have a terminal since I am on the initial blockchain sync

Last time i tried myNode on Virtual Machine i can access OS desktop and terminal easily. Anyway, myNode also provide guide to access terminal anytime you want. Check https://mynodebtc.github.io/advanced/linux-terminal.html.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
apogio (OP)
Sr. Member
****
Offline Offline

Activity: 420
Merit: 960



View Profile WWW
May 19, 2023, 10:17:58 AM
 #10

Can you explain this? Even when running Linux without GUI, you have 6 terminals by default (CTRL-ALT-F1-6). Or just CTRL-Z or CTRL-C your sync.

I'm saying this based on generic Linux usage, I've never touched a "MyNode".

Actually when syncing the initial blockchain using MyNode, there is no option to use a terminal. Please though check my following answer to @ETFBitcoin, because it seems like I am wrong.

Last time i tried myNode on Virtual Machine i can access OS desktop and terminal easily. Anyway, myNode also provide guide to access terminal anytime you want. Check https://mynodebtc.github.io/advanced/linux-terminal.html.

This is exactly what I needed. Unfortunately I get an error opening this tab, but I guess I will figure out why! Thanks!

Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3071



View Profile
May 21, 2023, 10:54:03 PM
Merited by LoyceV (4), ABCbits (3)
 #11

Then:
Code:
 kill 804968
This can take a few seconds to complete.

hmmm, one ought to be careful doing that.

these node-in-a-box systems could have a bitcoin service that's configured to recognize when bitcoind dies and restart it ASAP. the user might see the bitcoind process successfully go down, confidently sends poweroff, and meanwhile bitcoind is restarting (or even fully started) before the machine completes poweroff.

bitcoin is more resilient to being unexpectedly killed than it used to be, but there are still no guarantees against corrupted data (which means resyncing the whole chain in the worst case). although I'm not sure what linux does to kill processes on poweroff, if it's standard kill [pid] (as you've written above) then it would actually do the right thing and wait for bitcoind to finish correctly before poweroff completes (kill sends SIGTERM by default, which is at least one of the signals bitcoind catches to do an orderly shutdown)

so check what the OS actually does, and preferably use the in-house command for shutting bitcoind down before poweroff

and yes, definitely never just turn the computer off at the wall, you're asking for problems that way

Vires in numeris
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!