Author

Topic: MyNode + Raspberry Pi 4 how to pause initial sync (Read 138 times)

legendary
Activity: 3430
Merit: 3071
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
sr. member
Activity: 406
Merit: 896
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!
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
--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.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
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".
legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
-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?
sr. member
Activity: 406
Merit: 896
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
legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
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.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
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.
sr. member
Activity: 406
Merit: 896
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?
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
It's the same as "normally" turning it off. On my server, I just kill bitcoind, it closes gracefully that way.
sr. member
Activity: 406
Merit: 896
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.
Jump to: